mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
LibWasm: Implement data.drop instruction
This commit is contained in:
parent
a2f42512c2
commit
53ebe607f8
1 changed files with 7 additions and 1 deletions
|
@ -696,6 +696,13 @@ void BytecodeInterpreter::interpret(Configuration& configuration, InstructionPoi
|
|||
}
|
||||
return;
|
||||
}
|
||||
// https://webassembly.github.io/spec/core/bikeshed/#exec-data-drop
|
||||
case Instructions::data_drop.value(): {
|
||||
auto data_index = instruction.arguments().get<DataIndex>();
|
||||
auto data_address = configuration.frame().module().datas()[data_index.value()];
|
||||
*configuration.store().get(data_address) = DataInstance({});
|
||||
return;
|
||||
}
|
||||
case Instructions::table_get.value():
|
||||
case Instructions::table_set.value():
|
||||
goto unimplemented;
|
||||
|
@ -1006,7 +1013,6 @@ void BytecodeInterpreter::interpret(Configuration& configuration, InstructionPoi
|
|||
return unary_operation<double, i64, Operators::SaturatingTruncate<i64>>(configuration);
|
||||
case Instructions::i64_trunc_sat_f64_u.value():
|
||||
return unary_operation<double, i64, Operators::SaturatingTruncate<u64>>(configuration);
|
||||
case Instructions::data_drop.value():
|
||||
case Instructions::table_init.value():
|
||||
case Instructions::elem_drop.value():
|
||||
case Instructions::table_copy.value():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue