[llvm] r252204 - [WebAssembly] Rename Immediate instructions to Const.

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 5 12:44:29 PST 2015


Author: djg
Date: Thu Nov  5 14:44:29 2015
New Revision: 252204

URL: http://llvm.org/viewvc/llvm-project?rev=252204&view=rev
Log:
[WebAssembly] Rename Immediate instructions to Const.

This more closely reflects the naming convention in the spec.

Modified:
    llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
    llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.td

Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp?rev=252204&r1=252203&r2=252204&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp Thu Nov  5 14:44:29 2015
@@ -281,16 +281,16 @@ void WebAssemblyAsmPrinter::EmitInstruct
   case WebAssembly::ARGUMENT_F64:
     OS << "get_local " << argToString(MI->getOperand(1));
     break;
-  case WebAssembly::Immediate_I32:
+  case WebAssembly::Const_I32:
     OS << "i32.const " << MI->getOperand(1).getImm();
     break;
-  case WebAssembly::Immediate_I64:
+  case WebAssembly::Const_I64:
     OS << "i64.const " << MI->getOperand(1).getImm();
     break;
-  case WebAssembly::Immediate_F32:
+  case WebAssembly::Const_F32:
     OS << "f32.const " << toString(MI->getOperand(1).getFPImm()->getValueAPF());
     break;
-  case WebAssembly::Immediate_F64:
+  case WebAssembly::Const_F64:
     OS << "f64.const " << toString(MI->getOperand(1).getFPImm()->getValueAPF());
     break;
   default: {

Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.td?rev=252204&r1=252203&r2=252204&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.td (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.td Thu Nov  5 14:44:29 2015
@@ -93,18 +93,18 @@ defm : ARGUMENT<F32>;
 defm : ARGUMENT<F64>;
 
 
-def Immediate_I32 : I<(outs I32:$res), (ins i32imm:$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)],
-                      "i64.const $res, $imm">;
-def Immediate_F32 : I<(outs F32:$res), (ins f32imm:$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)],
-                      "f64.const $res, $imm">;
+def Const_I32 : I<(outs I32:$res), (ins i32imm:$imm),
+                  [(set I32:$res, imm:$imm)],
+                  "i32.const $res, $imm">;
+def Const_I64 : I<(outs I64:$res), (ins i64imm:$imm),
+                  [(set I64:$res, imm:$imm)],
+                  "i64.const $res, $imm">;
+def Const_F32 : I<(outs F32:$res), (ins f32imm:$imm),
+                  [(set F32:$res, fpimm:$imm)],
+                  "f32.const $res, $imm">;
+def Const_F64 : I<(outs F64:$res), (ins f64imm:$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),




More information about the llvm-commits mailing list