diff options
author | Dale Johannesen <dalej@apple.com> | 2009-05-06 19:04:30 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-05-06 19:04:30 +0000 |
commit | 1a51cffc395b4ffee6f9a036b91ed948d2db43d8 (patch) | |
tree | 68d2853e22167a84c4a3a3461abba00a1c72f9b9 /lib/Target/X86 | |
parent | 427a8cc209def787169e2b2d7f54cdbdfab2d8ee (diff) | |
download | external_llvm-1a51cffc395b4ffee6f9a036b91ed948d2db43d8.zip external_llvm-1a51cffc395b4ffee6f9a036b91ed948d2db43d8.tar.gz external_llvm-1a51cffc395b4ffee6f9a036b91ed948d2db43d8.tar.bz2 |
Use X86AddrNumOperands instead of magic constant one
more place. This fixes a bunch of x86-64 JIT regressions.
(Introduced when the value of the magic constant changed
in 68645. At the time apparently nobody noticed; failures
were hidden in 70343-70439 by an unrelated bug, so showed
up again as "new" failures in 70440.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r-- | lib/Target/X86/X86CodeEmitter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp index c54a996..c21eacc 100644 --- a/lib/Target/X86/X86CodeEmitter.cpp +++ b/lib/Target/X86/X86CodeEmitter.cpp @@ -709,7 +709,8 @@ void Emitter::emitInstruction(const MachineInstr &MI, case X86II::MRM4m: case X86II::MRM5m: case X86II::MRM6m: case X86II::MRM7m: { intptr_t PCAdj = (CurOp + X86AddrNumOperands != NumOps) ? - (MI.getOperand(CurOp+4).isImm() ? X86InstrInfo::sizeOfImm(Desc) : 4) : 0; + (MI.getOperand(CurOp+X86AddrNumOperands).isImm() ? + X86InstrInfo::sizeOfImm(Desc) : 4) : 0; MCE.emitByte(BaseOpcode); emitMemModRMByte(MI, CurOp, (Desc->TSFlags & X86II::FormMask)-X86II::MRM0m, |