]> granicus.if.org Git - llvm/commitdiff
[WebAssembly] Rename OPERAND_FP32IMM to OPERAND_F32IMM.
authorDan Gohman <dan433584@gmail.com>
Mon, 3 Oct 2016 21:31:31 +0000 (21:31 +0000)
committerDan Gohman <dan433584@gmail.com>
Mon, 3 Oct 2016 21:31:31 +0000 (21:31 +0000)
WebAssembly documentation consistently says "f32" rather than "fp32" to
describe 32-bit floating-point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283146 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
lib/Target/WebAssembly/WebAssemblyInstrInfo.td

index c0355aef0b35cdaa76b8610b18cfe2d745f300f1..4a9b93f7016de11827f819e364798b61c29af402 100644 (file)
@@ -110,8 +110,8 @@ MCDisassembler::DecodeStatus WebAssemblyDisassembler::getInstruction(
       MI.addOperand(MCOperand::createReg(Reg));
       break;
     }
-    case WebAssembly::OPERAND_FP32IMM:
-    case WebAssembly::OPERAND_FP64IMM: {
+    case WebAssembly::OPERAND_F32IMM:
+    case WebAssembly::OPERAND_F64IMM: {
       // TODO: MC converts all floating point immediate operands to double.
       // This is fine for numeric values, but may cause NaNs to change bits.
       if (Pos + sizeof(uint64_t) > Bytes.size())
index aadbf33123debfb63c20d71229b0fd893e652aaf..7fbca7e272cf238f742bbda2f09dbb72f83b9096 100644 (file)
@@ -171,12 +171,12 @@ void WebAssemblyInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
     assert(Desc.TSFlags == 0 &&
            "WebAssembly variable_ops floating point ops don't use TSFlags");
     const MCOperandInfo &Info = Desc.OpInfo[OpNo];
-    if (Info.OperandType == WebAssembly::OPERAND_FP32IMM) {
+    if (Info.OperandType == WebAssembly::OPERAND_F32IMM) {
       // TODO: MC converts all floating point immediate operands to double.
       // This is fine for numeric values, but may cause NaNs to change bits.
       O << toString(APFloat(float(Op.getFPImm())));
     } else {
-      assert(Info.OperandType == WebAssembly::OPERAND_FP64IMM);
+      assert(Info.OperandType == WebAssembly::OPERAND_F64IMM);
       O << toString(APFloat(Op.getFPImm()));
     }
   } else {
index 7a32ddd5793e2ed2afcdf706baad22a53ece98b3..0f185638ff9150c90f1733c30aff26bb75032971 100644 (file)
@@ -45,9 +45,9 @@ enum OperandType {
   /// Basic block label in a branch construct.
   OPERAND_BASIC_BLOCK = MCOI::OPERAND_FIRST_TARGET,
   /// 32-bit floating-point immediates.
-  OPERAND_FP32IMM,
+  OPERAND_F32IMM,
   /// 64-bit floating-point immediates.
-  OPERAND_FP64IMM,
+  OPERAND_F64IMM,
   /// p2align immediate for load and store address alignment.
   OPERAND_P2ALIGN
 };
index 922279d77422014595aabc6d2bfa56689de4fdd4..0a6de2a52f589f149395932aa782cfc738399474 100644 (file)
@@ -71,10 +71,10 @@ let OperandNamespace = "WebAssembly" in {
 let OperandType = "OPERAND_BASIC_BLOCK" in
 def bb_op : Operand<OtherVT>;
 
-let OperandType = "OPERAND_FP32IMM" in
+let OperandType = "OPERAND_F32IMM" in
 def f32imm_op : Operand<f32>;
 
-let OperandType = "OPERAND_FP64IMM" in
+let OperandType = "OPERAND_F64IMM" in
 def f64imm_op : Operand<f64>;
 
 let OperandType = "OPERAND_P2ALIGN" in {