OSDN Git Service

2010-04-12 Kai Tietz <kai.tietz@onevision.com>
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Apr 2010 18:04:44 +0000 (18:04 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:31:43 +0000 (14:31 +0900)
        PR/43702
        * config/i386/i386.c (x86_this_parameter): Handle aggregate for
        __thiscall convention.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158232 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 6d0c44c..d5b6a05 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 8c4f088..a54651d 100644 (file)
@@ -26395,11 +26395,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;