[llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.cpp
Chris Lattner
sabre at nondot.org
Tue Mar 27 17:58:57 PDT 2007
Changes in directory llvm/lib/Target/X86:
X86InstrInfo.cpp updated: 1.79 -> 1.80
---
Log message:
Fix a problem building llvm-gcc on amd64-unknown-freebsd6.2, due to the
system assembler not groking legal instructions like "leal (,%esi,8), %ecx".
---
Diffs of the changes: (+3 -1)
X86InstrInfo.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/lib/Target/X86/X86InstrInfo.cpp
diff -u llvm/lib/Target/X86/X86InstrInfo.cpp:1.79 llvm/lib/Target/X86/X86InstrInfo.cpp:1.80
--- llvm/lib/Target/X86/X86InstrInfo.cpp:1.79 Tue Mar 20 01:08:29 2007
+++ llvm/lib/Target/X86/X86InstrInfo.cpp Tue Mar 27 19:58:40 2007
@@ -158,7 +158,9 @@
unsigned ShAmt = MI->getOperand(2).getImm();
if (ShAmt == 0 || ShAmt >= 4) return 0;
- NewMI = BuildMI(get(X86::LEA32r), Dest)
+ unsigned Opc = TM.getSubtarget<X86Subtarget>().is64Bit() ?
+ X86::LEA64_32r : X86::LEA32r;
+ NewMI = BuildMI(get(Opc), Dest)
.addReg(0).addImm(1 << ShAmt).addReg(Src).addImm(0);
break;
}
More information about the llvm-commits
mailing list