<div dir="ltr">Sounds good to me. Thanks for looking into it more.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 25, 2015 at 2:08 PM, Ahmed Bougacha <span dir="ltr"><<a href="mailto:ahmed.bougacha@gmail.com" target="_blank">ahmed.bougacha@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Jun 24, 2015 at 12:59 PM, Ahmed Bougacha<br>
<<a href="mailto:ahmed.bougacha@gmail.com">ahmed.bougacha@gmail.com</a>> wrote:<br>
> On Tue, Jun 23, 2015 at 8:19 PM, Craig Topper <<a href="mailto:craig.topper@gmail.com">craig.topper@gmail.com</a>> wrote:<br>
>> I don't believe current versions of gas add a rex.w prefix for   extractps<br>
>> $7, %xmm0, %rcx   so I think current behavior is consistent. I don't have<br>
>> access to any other assemblers to test.<br>
><br>
> True, it doesn't.  I also tried inline-asm given to icc, it doesn't<br>
> either. However, the OS X as(1) (-v says based on "GNU assembler<br>
> version 1.38") does.<br>
<br>
</span>I gave this some more thought, and tried xed (which also drops REX.W,<br>
and in fact flat out refuses stuff like "pmovmskb rax xmm0").<br>
<br>
Abandoning the change; let's stick with the current behavior.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Ahmed<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> -Ahmed<br>
><br>
>> On Tue, Jun 23, 2015 at 2:20 PM, Ahmed Bougacha <<a href="mailto:ahmed.bougacha@gmail.com">ahmed.bougacha@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> How about something like the attached patch?<br>
>>> I'd personally prefer having separate instructions: it's simpler with<br>
>>> less special cases, and it makes the operand types a little easier to<br>
>>> work with (admittedly not a concern for in-tree code, only stuff like<br>
>>> "smart" disassemblers would use that).<br>
>>><br>
>>> -Ahmed<br>
>>><br>
>>> On Tue, Jun 23, 2015 at 11:45 AM, Ahmed Bougacha<br>
>>> <<a href="mailto:ahmed.bougacha@gmail.com">ahmed.bougacha@gmail.com</a>> wrote:<br>
>>> > On Mon, Jun 22, 2015 at 11:29 PM, Craig Topper <<a href="mailto:craig.topper@gmail.com">craig.topper@gmail.com</a>><br>
>>> > wrote:<br>
>>> >> I think I agree, but I'd like to find a way to do this without<br>
>>> >> duplicating<br>
>>> >> the instructions again. Maybe we can keep the register encodings<br>
>>> >> unmodified<br>
>>> >> instead of calling getGR32FromGR64, then detect whether we need REX.W<br>
>>> >> in the<br>
>>> >> encoder? May need a new TSFlag to enable this behavior.<br>
>>> ><br>
>>> > Yes, that might work; I'll have a look.<br>
>>> ><br>
>>> > Thanks!<br>
>>> > -Ahmed<br>
>>> ><br>
>>> >> On Mon, Jun 22, 2015 at 5:40 PM, Ahmed Bougacha<br>
>>> >> <<a href="mailto:ahmed.bougacha@gmail.com">ahmed.bougacha@gmail.com</a>><br>
>>> >> wrote:<br>
>>> >>><br>
>>> >>> Hi Craig,<br>
>>> >>><br>
>>> >>> Forgive the necromancy, but I'm wondering if this is the right thing:<br>
>>> >>> we remove users' freedom to pick encodings (used by some, for padding<br>
>>> >>> and such), for no good reason: with this commit, generated code uses<br>
>>> >>> GR32 encodings, even if the assembly explicitly specified a GR64<br>
>>> >>> register.<br>
>>> >>><br>
>>> >>> Of course, that's starting from assembly;  if the compiler generates<br>
>>> >>> the larger equivalent encoding that should be fixed, but I don't think<br>
>>> >>> that's ever the case, as AFAICT GR32 is preferred by the various<br>
>>> >>> patterns.<br>
>>> >>><br>
>>> >>> What do you think about restoring the previous behavior?<br>
>>> >>> -Ahmed<br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> ~Craig<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">~Craig</div>
</div>