aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMAddressingModes.h
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-10-11 23:16:21 +0000
committerJim Grosbach <grosbach@apple.com>2010-10-11 23:16:21 +0000
commit42fac8ee3bc02e18a5887800e812af762b45b9eb (patch)
tree9134a0864ec487abbca6c9a52294b3b952539c27 /lib/Target/ARM/ARMAddressingModes.h
parent17b443df4368acfad853d09858c033c45c468d5c (diff)
MC machine encoding for simple aritmetic instructions that use a shifted
register operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMAddressingModes.h')
-rw-r--r--lib/Target/ARM/ARMAddressingModes.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMAddressingModes.h b/lib/Target/ARM/ARMAddressingModes.h
index db481005b3..7f68c81094 100644
--- a/lib/Target/ARM/ARMAddressingModes.h
+++ b/lib/Target/ARM/ARMAddressingModes.h
@@ -50,6 +50,16 @@ namespace ARM_AM {
}
}
+ static inline unsigned getShiftOpcEncoding(ShiftOpc Op) {
+ switch (Op) {
+ default: assert(0 && "Unknown shift opc!");
+ case ARM_AM::asr: return 2;
+ case ARM_AM::lsl: return 0;
+ case ARM_AM::lsr: return 1;
+ case ARM_AM::ror: return 3;
+ }
+ }
+
static inline ShiftOpc getShiftOpcForNode(SDValue N) {
switch (N.getOpcode()) {
default: return ARM_AM::no_shift;