projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56946ed
)
Fix code size computation on x86-64, patch by Zoltan Varga!
author
Chris Lattner
<sabre@nondot.org>
Thu, 9 Apr 2009 06:10:51 +0000
(06:10 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 9 Apr 2009 06:10:51 +0000
(06:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68690
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/X86/X86InstrInfo.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/X86/X86InstrInfo.cpp
b/lib/Target/X86/X86InstrInfo.cpp
index 4d9e2bef7422907cea175caea1f6e88bff5846c5..a47dee3aeeb19c1393fab286b62adc4841397917 100644
(file)
--- a/
lib/Target/X86/X86InstrInfo.cpp
+++ b/
lib/Target/X86/X86InstrInfo.cpp
@@
-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