[llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.cpp
Jeff Cohen
jeffc at jolt-lang.org
Tue Mar 27 18:04:18 PDT 2007
FWIW, the system assembler is GNU assembler 2.15.
Chris Lattner wrote:
> 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;
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
>
More information about the llvm-commits
mailing list