This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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--
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:
--cut here--

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]