Re: [PATCH] x32: Encode %esp as %rsp to avoid 0x67 prefix

2017-09-26 Thread Uros Bizjak
On Tue, Sep 26, 2017 at 2:19 PM, Jakub Jelinek wrote: > On Sun, Sep 24, 2017 at 11:25:34AM +0200, Uros Bizjak wrote: >> We can use 'q' modifier just before register output part (plus a small >> simplification). >> >> Can you try the attached (untested) patch? >> >> Uros. > >>

Re: [PATCH] x32: Encode %esp as %rsp to avoid 0x67 prefix

2017-09-26 Thread Jakub Jelinek
On Sun, Sep 24, 2017 at 11:25:34AM +0200, Uros Bizjak wrote: > We can use 'q' modifier just before register output part (plus a small > simplification). > > Can you try the attached (untested) patch? > > Uros. > Index: i386.c > ===

Re: [PATCH] x32: Encode %esp as %rsp to avoid 0x67 prefix

2017-09-24 Thread H.J. Lu
On 9/24/17, Uros Bizjak wrote: > On Sat, Sep 23, 2017 at 11:16 PM, H.J. Lu wrote: >> Since the upper 32 bits of stack register are always zero for x32, we >> can encode %esp as %rsp to avoid 0x67 prefix in address if there is no >> index or base register.

Re: [PATCH] x32: Encode %esp as %rsp to avoid 0x67 prefix

2017-09-24 Thread Uros Bizjak
On Sat, Sep 23, 2017 at 11:16 PM, H.J. Lu wrote: > Since the upper 32 bits of stack register are always zero for x32, we > can encode %esp as %rsp to avoid 0x67 prefix in address if there is no > index or base register. > > Tested on x86-64. OK for trunk? > > H.J. > >

[PATCH] x32: Encode %esp as %rsp to avoid 0x67 prefix

2017-09-23 Thread H.J. Lu
Since the upper 32 bits of stack register are always zero for x32, we can encode %esp as %rsp to avoid 0x67 prefix in address if there is no index or base register. Tested on x86-64. OK for trunk? H.J. gcc/ PR target/82267 * config/i386/i386.c