diff options
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td index e9a16cec33a..52e0bd6e97f 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td @@ -81,6 +81,7 @@ include "WebAssemblyInstrFormats.td" //===----------------------------------------------------------------------===// multiclass ARGUMENT<WebAssemblyRegClass vt> { + let hasSideEffects = 1, Uses = [ARGUMENTS] in def ARGUMENT_#vt : I<(outs vt:$res), (ins i32imm:$argno), [(set vt:$res, (WebAssemblyargument timm:$argno))]>; } @@ -89,6 +90,8 @@ defm : ARGUMENT<I64>; defm : ARGUMENT<F32>; defm : ARGUMENT<F64>; +let Defs = [ARGUMENTS] in { + // get_local and set_local are not generated by instruction selection; they // are implied by virtual register uses and defs in most contexts. However, // they are explicitly emitted for special purposes. @@ -125,11 +128,15 @@ def CONST_F64 : I<(outs F64:$res), (ins f64imm:$imm), [(set F64:$res, fpimm:$imm)], "f64.const\t$res, $imm">; +} // Defs = [ARGUMENTS] + def : Pat<(i32 (WebAssemblywrapper tglobaladdr:$dst)), (CONST_I32 tglobaladdr:$dst)>; def : Pat<(i32 (WebAssemblywrapper texternalsym:$dst)), (CONST_I32 texternalsym:$dst)>; +let Defs = [ARGUMENTS] in { + def JUMP_TABLE : I<(outs I32:$dst), (ins tjumptable_op:$addr), [(set I32:$dst, (WebAssemblywrapper tjumptable:$addr))], "jump_table\t$dst, $addr">; @@ -139,6 +146,8 @@ def PARAM : I<(outs), (ins variable_ops), [], ".param \t">; def RESULT : I<(outs), (ins variable_ops), [], ".result \t">; def LOCAL : I<(outs), (ins variable_ops), [], ".local \t">; +} // Defs = [ARGUMENTS] + //===----------------------------------------------------------------------===// // Additional sets of instructions. //===----------------------------------------------------------------------===// |