diff mbox

[i386] : Fix gcc.c-torture/compile/pr41634.c FAIL

Message ID CAFULd4b3Vg-ao3HV7jaT5h6dfbzK-7eCD9YL4oGiTnxZbLJKpg@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Nov. 10, 2015, 6:24 p.m. UTC
On Tue, Nov 10, 2015 at 7:14 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Tue, Nov 10, 2015 at 7:00 PM, Richard Henderson <rth@redhat.com> wrote:
>> On 11/10/2015 06:54 PM, Uros Bizjak wrote:
>>>
>>> -      return "movabs{<imodesuffix>}\t{%1, %0|%0, %1}";
>>> +      return "movabs{<imodesuffix>}\t{%1, %P0|[%P0], %1}";
>>
>>
>> The thing that's missing from this, that's present in the patch that I sent
>> you off-list, is the <iptrsize> thing for Intel syntax.
>>
>> Would you prefer to just add that back here via <iptrsize>, rather than
>> using a new %v specifier like in my patch?
>
> I have opted for the same assembly code as it was generated
> previously. But, since we have macroized pattern and already available
> mode attribute, I'd prefer to use <iptrsize> PTR [...]. There are
> already a couple of examples using this approach in i386.md.
>
> BTW: gas is able to determine pointer size from register name, so
> having PTR prefix does not change generated object code.

I'm testing following patch:

--cut here--
--cut here--

Uros.
diff mbox

Patch

Index: i386.md
===================================================================
--- i386.md     (revision 230117)
+++ i386.md     (working copy)
@@ -2601,7 +2601,7 @@ 
   switch (which_alternative)
     {
     case 0:
-      return "movabs{<imodesuffix>}\t{%1, %P0|[%P0], %1}";
+      return "movabs{<imodesuffix>}\t{%1, %P0|<iptrsize> PTR [%P0], %1}";
     case 1:
       return "mov{<imodesuffix>}\t{%1, %0|%0, %1}";
     default:
@@ -2625,7 +2625,7 @@ 
   switch (which_alternative)
     {
     case 0:
-      return "movabs{<imodesuffix>}\t{%P1, %0|%0, [%P1]}";
+      return "movabs{<imodesuffix>}\t{%P1, %0|%0, <iptrsize> PTR [%P1]}";
     case 1:
       return "mov{<imodesuffix>}\t{%1, %0|%0, %1}";
     default: