[llvm-commits] [llvm] r135066 - in /llvm/trunk: lib/Target/ARM/ARMInstrInfo.td utils/TableGen/EDEmitter.cpp

Jim Grosbach grosbach at apple.com
Wed Jul 13 12:24:09 PDT 2011


Author: grosbach
Date: Wed Jul 13 14:24:09 2011
New Revision: 135066

URL: http://llvm.org/viewvc/llvm-project?rev=135066&view=rev
Log:
Give the ARM BKPT instruction the right operand type.

The immediate is of limited range and the operand type should reflect that.

Modified:
    llvm/trunk/lib/Target/ARM/ARMInstrInfo.td
    llvm/trunk/utils/TableGen/EDEmitter.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=135066&r1=135065&r2=135066&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Wed Jul 13 14:24:09 2011
@@ -255,9 +255,8 @@
   return (((uint32_t)N->getZExtValue()) & 0xFFFFUL) == 0;
 }], hi16>;
 
-/// imm0_65535 predicate - True if the 32-bit immediate is in the range
-/// [0.65535].
-def imm0_65535 : ImmLeaf<i32, [{
+/// imm0_65535 - An immediate is in the range [0.65535].
+def imm0_65535 : Operand<i32>, ImmLeaf<i32, [{
   return Imm >= 0 && Imm < 65536;
 }]>;
 
@@ -1174,8 +1173,8 @@
 
 // The i32imm operand $val can be used by a debugger to store more information
 // about the breakpoint.
-def BKPT : AI<(outs), (ins i32imm:$val), MiscFrm, NoItinerary, "bkpt", "\t$val",
-              []>, Requires<[IsARM]> {
+def BKPT : AI<(outs), (ins imm0_65535:$val), MiscFrm, NoItinerary,
+              "bkpt", "\t$val", []>, Requires<[IsARM]> {
   bits<16> val;
   let Inst{3-0} = val{3-0};
   let Inst{19-8} = val{15-4};

Modified: llvm/trunk/utils/TableGen/EDEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/EDEmitter.cpp?rev=135066&r1=135065&r2=135066&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/EDEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/EDEmitter.cpp Wed Jul 13 14:24:09 2011
@@ -590,6 +590,7 @@
   IMM("nModImm");
   IMM("imm0_255");
   IMM("imm0_4095");
+  IMM("imm0_65535");
   IMM("jt2block_operand");
   IMM("t_imm_s4");
   IMM("pclabel");





More information about the llvm-commits mailing list