[llvm-branch-commits] [llvm-branch] r73432 - in /llvm/branches/Apple/Bender/lib/Target/X86: X86CodeEmitter.cpp X86InstrInfo.cpp

Bill Wendling isanbard at gmail.com
Mon Jun 15 15:21:00 PDT 2009


Author: void
Date: Mon Jun 15 17:21:00 2009
New Revision: 73432

URL: http://llvm.org/viewvc/llvm-project?rev=73432&view=rev
Log:
Back out accidental commit from r72877.

Modified:
    llvm/branches/Apple/Bender/lib/Target/X86/X86CodeEmitter.cpp
    llvm/branches/Apple/Bender/lib/Target/X86/X86InstrInfo.cpp

Modified: llvm/branches/Apple/Bender/lib/Target/X86/X86CodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Bender/lib/Target/X86/X86CodeEmitter.cpp?rev=73432&r1=73431&r2=73432&view=diff

==============================================================================
--- llvm/branches/Apple/Bender/lib/Target/X86/X86CodeEmitter.cpp (original)
+++ llvm/branches/Apple/Bender/lib/Target/X86/X86CodeEmitter.cpp Mon Jun 15 17:21:00 2009
@@ -338,8 +338,8 @@
   unsigned BaseReg = Base.getReg();
 
   // Is a SIB byte needed?
-  if (IndexReg.getReg() == 0 && (!Is64BitMode || BaseReg != 0) && 
-      (BaseReg == 0 || getX86RegNum(BaseReg) != N86::ESP)) {      
+  if ((!Is64BitMode || DispForReloc) && IndexReg.getReg() == 0 &&
+      (BaseReg == 0 || getX86RegNum(BaseReg) != N86::ESP)) {
     if (BaseReg == 0) {  // Just a displacement?
       // Emit special case [disp32] encoding
       MCE.emitByte(ModRMByte(0, RegOpcodeField, 5));

Modified: llvm/branches/Apple/Bender/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Bender/lib/Target/X86/X86InstrInfo.cpp?rev=73432&r1=73431&r2=73432&view=diff

==============================================================================
--- llvm/branches/Apple/Bender/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/branches/Apple/Bender/lib/Target/X86/X86InstrInfo.cpp Mon Jun 15 17:21:00 2009
@@ -2811,8 +2811,8 @@
   unsigned BaseReg = Base.getReg();
 
   // Is a SIB byte needed?
-  if (IndexReg.getReg() == 0 && (!Is64BitMode || BaseReg != 0) && 
-      (BaseReg == 0 || X86RegisterInfo::getX86RegNum(BaseReg) != N86::ESP)) {      
+  if ((!Is64BitMode || DispForReloc) && IndexReg.getReg() == 0 &&
+      (BaseReg == 0 || X86RegisterInfo::getX86RegNum(BaseReg) != N86::ESP)) {
     if (BaseReg == 0) {  // Just a displacement?
       // Emit special case [disp32] encoding
       ++FinalSize; 





More information about the llvm-branch-commits mailing list