mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-30 08:24:12 +00:00
Fix code size computation on x86-64, patch by Zoltan Varga!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68690 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
56946ed5bb
commit
a1cd83a258
@ -2732,7 +2732,7 @@ static unsigned getMemModRMByteSize(const MachineInstr &MI, unsigned Op,
|
||||
unsigned BaseReg = Base.getReg();
|
||||
|
||||
// Is a SIB byte needed?
|
||||
if (IndexReg.getReg() == 0 &&
|
||||
if ((!Is64BitMode || DispForReloc) && IndexReg.getReg() == 0 &&
|
||||
(BaseReg == 0 || X86RegisterInfo::getX86RegNum(BaseReg) != N86::ESP)) {
|
||||
if (BaseReg == 0) { // Just a displacement?
|
||||
// Emit special case [disp32] encoding
|
||||
|
Loading…
Reference in New Issue
Block a user