[PATCH] Fix for bug 23996 - Fix incorrect/inefficient pushw encodings for x86-64 targets

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Jul 2 05:16:39 PDT 2015


Change to use llvm-objdump LGTM. Please do that first so that the rest
of the patch is easier to read.

Checking the patch itself now.

On 1 July 2015 at 14:42, David Kreitzer <david.l.kreitzer at intel.com> wrote:
> Hi rafael, mkuper, nadav,
>
> The main problem that this patch fixes is that the "pushw imm8" instruction form is not currently supported for x86_64 targets.
>
> In the process of fixing that bug I did some minor cleanup:
>
> (1) Re-grouped the "push imm" opcodes so that the pushw (supported on both 32- and 64-bit), pushl (32-bit only), and pushq (64-bit only) opcodes are together.
>
> (2) Consolidated PUSHi16 and PUSH64i16. These two opcodes currently do the same thing, but for 32-bit only and 64-bit only, respectively. I enabled PUSHi16 for 64-bit, at which point PUSH64i16 became redundant. Thanks to Michael Kuperstein for noticing this opportunity.
>
> (3) Retooled the relax-arith.s test to use llvm-objdump -d instead of llvm-readobj.
>
> http://reviews.llvm.org/D10878
>
> Files:
>   lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
>   lib/Target/X86/X86InstrInfo.td
>   test/MC/ELF/relax-arith.s
>   test/MC/ELF/relax-arith2.s
>   test/MC/ELF/relax-arith4.s
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/




More information about the llvm-commits mailing list