mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[ewasm] Add i32.select/i64.select
This commit is contained in:
@@ -156,6 +156,8 @@ Opcode constOpcodeFor(ValueType _type)
|
||||
}
|
||||
|
||||
static map<string, uint8_t> const builtins = {
|
||||
{"i32.select", 0x1b},
|
||||
{"i64.select", 0x1b},
|
||||
{"i32.load", 0x28},
|
||||
{"i64.load", 0x29},
|
||||
{"i32.load8_s", 0x2c},
|
||||
|
||||
@@ -120,6 +120,10 @@ WasmDialect::WasmDialect()
|
||||
addFunction("i32.drop", {i32}, {});
|
||||
addFunction("i64.drop", {i64}, {});
|
||||
|
||||
// Select is also overloaded.
|
||||
addFunction("i32.select", {i32, i32, i32}, {i32});
|
||||
addFunction("i64.select", {i64, i64, i32}, {i64});
|
||||
|
||||
addFunction("nop", {}, {});
|
||||
addFunction("unreachable", {}, {}, false);
|
||||
m_functions["unreachable"_yulstring].sideEffects.storage = SideEffects::None;
|
||||
|
||||
Reference in New Issue
Block a user