This is an archive of the discontinued LLVM Phabricator instance.

Fix for bug 23996 - Fix incorrect/inefficient pushw encodings for x86-64 targets
ClosedPublic

Authored by DavidKreitzer on Jul 1 2015, 11:42 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

DavidKreitzer retitled this revision from to Fix for bug 23996 - Fix incorrect/inefficient pushw encodings for x86-64 targets.
DavidKreitzer updated this object.
DavidKreitzer edited the test plan for this revision. (Show Details)
DavidKreitzer added reviewers: rafael, mkuper, nadav.
DavidKreitzer added a subscriber: Unknown Object (MLST).
rafael edited edge metadata.Jul 2 2015, 5:34 AM
rafael added a subscriber: rafael.

LGTM, but please do commit as two patches, where the first one just
converts the tests to use llvm-objdump.

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.

This revision was automatically updated to reflect the committed changes.