From: Chris Lattner Date: Wed, 28 Mar 2007 00:58:40 +0000 (+0000) Subject: Fix a problem building llvm-gcc on amd64-unknown-freebsd6.2, due to the X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f2177b89a12f9e5977d317aedb598b674b328d08;p=oota-llvm.git 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". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35393 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp index cd783f3cf8b..aa15723c46e 100644 --- a/lib/Target/X86/X86InstrInfo.cpp +++ b/lib/Target/X86/X86InstrInfo.cpp @@ -158,7 +158,9 @@ X86InstrInfo::convertToThreeAddress(MachineFunction::iterator &MFI, unsigned ShAmt = MI->getOperand(2).getImm(); if (ShAmt == 0 || ShAmt >= 4) return 0; - NewMI = BuildMI(get(X86::LEA32r), Dest) + unsigned Opc = TM.getSubtarget().is64Bit() ? + X86::LEA64_32r : X86::LEA32r; + NewMI = BuildMI(get(Opc), Dest) .addReg(0).addImm(1 << ShAmt).addReg(Src).addImm(0); break; }