<div dir="ltr">I don't believe current versions of gas add a rex.w prefix for   extractps $7, %xmm0, %rcx   so I think current behavior is consistent. I don't have access to any other assemblers to test.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 23, 2015 at 2:20 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">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>
<span class="HOEnZb"><font color="#888888"><br>
-Ahmed<br>
</font></span><div class="HOEnZb"><div class="h5"><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>> wrote:<br>
>> I think I agree, but I'd like to find a way to do this without duplicating<br>
>> the instructions again. Maybe we can keep the register encodings unmodified<br>
>> instead of calling getGR32FromGR64, then detect whether we need REX.W 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 <<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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">~Craig</div>
</div>