diff options
| author | JF Bastien <jfb@google.com> | 2015-08-10 22:36:48 +0000 |
|---|---|---|
| committer | JF Bastien <jfb@google.com> | 2015-08-10 22:36:48 +0000 |
| commit | 4a6422562d797fd2d860800992620a4a16021872 (patch) | |
| tree | 533f3c34b3ac56a211f6bdb055220a18f6ff4c0c /llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td | |
| parent | 6dce129051d849509727fdb953416a5c0fdbdc7c (diff) | |
| download | bcm5719-llvm-4a6422562d797fd2d860800992620a4a16021872.tar.gz bcm5719-llvm-4a6422562d797fd2d860800992620a4a16021872.zip | |
WebAssembly: print immediates
Summary:
For now output using C99's hexadecimal floating-point representation.
This patch also cleans up how machine operands are printed: instead of special-casing per type of machine instruction, the code now handles operands generically.
Reviewers: sunfish
Subscribers: llvm-commits, jfb
Differential Revision: http://reviews.llvm.org/D11914
llvm-svn: 244520
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td index e88a93a63ae..c6335723b4c 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td @@ -64,6 +64,16 @@ defm : ARGUMENT<Int64>; defm : ARGUMENT<Float32>; defm : ARGUMENT<Float64>; + +def Immediate_I32 : I<(outs Int32:$res), (ins i32imm:$imm), + [(set Int32:$res, imm:$imm)]>; +def Immediate_I64 : I<(outs Int64:$res), (ins i64imm:$imm), + [(set Int64:$res, imm:$imm)]>; +def Immediate_F32 : I<(outs Float32:$res), (ins f32imm:$imm), + [(set Float32:$res, fpimm:$imm)]>; +def Immediate_F64 : I<(outs Float64:$res), (ins f64imm:$imm), + [(set Float64:$res, fpimm:$imm)]>; + //===----------------------------------------------------------------------===// // Additional sets of instructions. //===----------------------------------------------------------------------===// |

