aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMInstrFormats.td
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-03-07 23:38:41 +0000
committerBill Wendling <isanbard@gmail.com>2011-03-07 23:38:41 +0000
commit3116dce33840a115130c5f8ffcb9679d023496d6 (patch)
tree5785ba082080308e283bebd9de4006abfd756360 /lib/Target/ARM/ARMInstrFormats.td
parent0d8ccaa5c8db820b5b93f37e51563148c57ba6b8 (diff)
downloadexternal_llvm-3116dce33840a115130c5f8ffcb9679d023496d6.zip
external_llvm-3116dce33840a115130c5f8ffcb9679d023496d6.tar.gz
external_llvm-3116dce33840a115130c5f8ffcb9679d023496d6.tar.bz2
Rename the narrow shift right immediate operands to "shr_imm*" operands. Also
expand the testing of the narrowing shift right instructions. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMInstrFormats.td')
-rw-r--r--lib/Target/ARM/ARMInstrFormats.td31
1 files changed, 18 insertions, 13 deletions
diff --git a/lib/Target/ARM/ARMInstrFormats.td b/lib/Target/ARM/ARMInstrFormats.td
index cf8c472..1c3476c 100644
--- a/lib/Target/ARM/ARMInstrFormats.td
+++ b/lib/Target/ARM/ARMInstrFormats.td
@@ -221,20 +221,25 @@ def neg_zero : Operand<i32> {
let PrintMethod = "printNegZeroOperand";
}
-// Narrow Shift Right Immediate - A narrow shift right immediate is encoded
-// differently from other shift immediates. The imm6 field is encoded like so:
+// Shift Right Immediate - A shift right immediate is encoded differently from
+// other shift immediates. The imm6 field is encoded like so:
//
-// 16-bit: imm6<5:3> = '001', 8 - <imm> is encded in imm6<2:0>
-// 32-bit: imm6<5:4> = '01',16 - <imm> is encded in imm6<3:0>
-// 64-bit: imm6<5> = '1', 32 - <imm> is encded in imm6<4:0>
-def nsr16_imm : Operand<i32> {
- let EncoderMethod = "getNarrowShiftRight16Imm";
-}
-def nsr32_imm : Operand<i32> {
- let EncoderMethod = "getNarrowShiftRight32Imm";
-}
-def nsr64_imm : Operand<i32> {
- let EncoderMethod = "getNarrowShiftRight64Imm";
+// Offset Encoding
+// 8 imm6<5:3> = '001', 8 - <imm> is encoded in imm6<2:0>
+// 16 imm6<5:4> = '01', 16 - <imm> is encoded in imm6<3:0>
+// 32 imm6<5> = '1', 32 - <imm> is encoded in imm6<4:0>
+// 64 64 - <imm> is encoded in imm6<5:0>
+def shr_imm8 : Operand<i32> {
+ let EncoderMethod = "getShiftRight8Imm";
+}
+def shr_imm16 : Operand<i32> {
+ let EncoderMethod = "getShiftRight16Imm";
+}
+def shr_imm32 : Operand<i32> {
+ let EncoderMethod = "getShiftRight32Imm";
+}
+def shr_imm64 : Operand<i32> {
+ let EncoderMethod = "getShiftRight64Imm";
}
//===----------------------------------------------------------------------===//