aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-04-13 15:04:25 +0000
committerDan Gohman <gohman@apple.com>2009-04-13 15:04:25 +0000
commit8cc632f7052de02ca270284fa672e7ceda261355 (patch)
tree85724dedef3ffbdf48bafd7b7582c0935a2a421a
parent7ff5bff45eaa1fabf8bb910daf2907cf981cbf3d (diff)
Fix another hard-coded constant to use X86AddrNumOperands.
This unbreaks the JIT on x86-64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68948 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86InstrInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp
index a47dee3aee..77320587cb 100644
--- a/lib/Target/X86/X86InstrInfo.cpp
+++ b/lib/Target/X86/X86InstrInfo.cpp
@@ -2602,7 +2602,7 @@ unsigned X86InstrInfo::determineREX(const MachineInstr &MI) {
case X86II::MRM4m: case X86II::MRM5m:
case X86II::MRM6m: case X86II::MRM7m:
case X86II::MRMDestMem: {
- unsigned e = isTwoAddr ? 5 : 4;
+ unsigned e = (isTwoAddr ? X86AddrNumOperands+1 : X86AddrNumOperands);
i = isTwoAddr ? 1 : 0;
if (NumOps > e && isX86_64ExtendedReg(MI.getOperand(e)))
REX |= 1 << 2;