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

David Kreitzer david.l.kreitzer at intel.com
Wed Jul 1 11:42:44 PDT 2015


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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10878.28887.patch
Type: text/x-patch
Size: 11622 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150701/16961620/attachment.bin>


More information about the llvm-commits mailing list