]> gcc.gnu.org Git - gcc.git/commitdiff
i386.c (x86_this_parameter): Handle aggregate for __thiscall convention.
authorKai Tietz <kai.tietz@onevision.com>
Mon, 12 Apr 2010 18:04:44 +0000 (18:04 +0000)
committerKai Tietz <ktietz@gcc.gnu.org>
Mon, 12 Apr 2010 18:04:44 +0000 (20:04 +0200)
2010-04-12  Kai Tietz  <kai.tietz@onevision.com>

        PR/43702
        * config/i386/i386.c (x86_this_parameter): Handle aggregate for
        __thiscall convention.

From-SVN: r158232

gcc/ChangeLog
gcc/config/i386/i386.c

index e46891f60bec4b2bb19270f303ad1fe7d2419c6e..0c7cb7fdccfefc45f472e7dbce6b96df09fbd8b7 100644 (file)
@@ -1,3 +1,9 @@
+2010-04-12  Kai Tietz  <kai.tietz@onevision.com>
+
+       PR/43702
+       * config/i386/i386.c (x86_this_parameter): Handle aggregate for
+       __thiscall convention.
+
 2010-04-12  Steve Ellcey  <sje@cup.hp.com>
 
        * config/pa/pa.c (hppa_legitimize_address): Remove unused variable
index 2c6a09cad0c027e7a81c09385b746f330c59ac80..b99fe2ae34573363a97576e6c2a82b1990aee3ea 100644 (file)
@@ -26232,11 +26232,13 @@ x86_this_parameter (tree function)
 
       if (lookup_attribute ("fastcall", TYPE_ATTRIBUTES (type)))
        regno = aggr ? DX_REG : CX_REG;
-      /* ???: To be verified. It is not absolutely clear how aggregates
-         have to be treated for thiscall.  We assume that they are
-        identical to fastcall.  */
       else if (lookup_attribute ("thiscall", TYPE_ATTRIBUTES (type)))
-       regno = aggr ? DX_REG : CX_REG;
+        {
+         regno = CX_REG;
+         if (aggr)
+           return gen_rtx_MEM (SImode,
+                               plus_constant (stack_pointer_rtx, 4));
+       }
       else
         {
          regno = AX_REG;
This page took 0.122669 seconds and 5 git commands to generate.