diff options
| author | Dan Gohman <dan433584@gmail.com> | 2015-11-05 20:42:30 +0000 |
|---|---|---|
| committer | Dan Gohman <dan433584@gmail.com> | 2015-11-05 20:42:30 +0000 |
| commit | af29bd4fd43d2a64844c99f4da3ba97d0d7d2402 (patch) | |
| tree | 9de46133cd93d831531519aafdb190b0c38baf97 /llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td | |
| parent | d7ffb919c13a14ac370833cbb5732da0427efeab (diff) | |
| download | bcm5719-llvm-af29bd4fd43d2a64844c99f4da3ba97d0d7d2402.tar.gz bcm5719-llvm-af29bd4fd43d2a64844c99f4da3ba97d0d7d2402.zip | |
[WebAssembly] Add AsmString strings for most instructions.
Mangling type information into MachineInstr opcode names was a temporary
measure, and it's starting to get hairy. At the same time, the MC instruction
printer wants to use AsmString strings for printing. This patch takes the
first step, starting the process of adding AsmStrings for instructions.
llvm-svn: 252203
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td index f3564b53a67..32f7923edbe 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td @@ -94,19 +94,25 @@ defm : ARGUMENT<F64>; def Immediate_I32 : I<(outs I32:$res), (ins i32imm:$imm), - [(set I32:$res, imm:$imm)]>; + [(set I32:$res, imm:$imm)], + "i32.const $res, $imm">; def Immediate_I64 : I<(outs I64:$res), (ins i64imm:$imm), - [(set I64:$res, imm:$imm)]>; + [(set I64:$res, imm:$imm)], + "i64.const $res, $imm">; def Immediate_F32 : I<(outs F32:$res), (ins f32imm:$imm), - [(set F32:$res, fpimm:$imm)]>; + [(set F32:$res, fpimm:$imm)], + "f32.const $res, $imm">; def Immediate_F64 : I<(outs F64:$res), (ins f64imm:$imm), - [(set F64:$res, fpimm:$imm)]>; + [(set F64:$res, fpimm:$imm)], + "f64.const $res, $imm">; // Special types of immediates. FIXME: Hard-coded as 32-bit for now. def GLOBAL : I<(outs I32:$dst), (ins global:$addr), - [(set I32:$dst, (WebAssemblywrapper tglobaladdr:$addr))]>; + [(set I32:$dst, (WebAssemblywrapper tglobaladdr:$addr))], + "global $dst, $addr">; def JUMP_TABLE : I<(outs I32:$dst), (ins tjumptable_op:$addr), - [(set I32:$dst, (WebAssemblywrapper tjumptable:$addr))]>; + [(set I32:$dst, (WebAssemblywrapper tjumptable:$addr))], + "jump_table $dst, $addr">; //===----------------------------------------------------------------------===// // Additional sets of instructions. |

