This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC PATCH] Fix decoding of superfluous data32 prefix before superfluous rex.W prefix before push.
On Fri, Aug 3, 2012 at 3:59 PM, Roland McGrath <mcgrathr@google.com> wrote:
> I noticed that since you used #pass in the .d files, one could add more
> cases to the end of x86-64-stack.s and not notice if one failed to update
> all the .d files appropriately. So I added a nop at the end, to make sure
> that's matched last.
>
> What I was hoping is that you could tell me how to change:
>
> 0: 66 48 6a ff data32 pushq $0xffffffffffffffff
> 4: 66 48 68 01 02 03 04 data32 pushq $0x4030201
>
> into:
>
> 0: 66 48 6a ff data32 rex.W pushq $0xffffffffffffffff
> 4: 66 48 68 01 02 03 04 data32 rex.W pushq $0x4030201
>
> i.e., recognize that the rex.W prefix was not used, as it already
> does when there is no data32 prefix before it. Do you have an idea
> to fix that?
>
There are
/* Bits of REX we've already used. */
static int rex_used;
Please make sure that it isn't set for push.
--
H.J.