OSDN Git Service

2010-04-09 Kai Tietz <kai.tietz@onevision.com>
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Apr 2010 08:58:00 +0000 (08:58 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:30:41 +0000 (14:30 +0900)
        * config/i386/cygming.h (TARGET_OS_CPP_BUILTINS): Add
        __thiscall and _thiscall as predefined macros.
        * config/i386/i386.c (ix86_handle_cconv_attribute): Add
        thiscall attribute handling.
        (ix86_comp_type_attributes): Likewise.
        (ix86_function_regparm): Likewise.
        (ix86_return_pops_args): Likewise.
        (init_cumulative_args): Likewise.
        (find_drap_reg): Likewise.
        (ix86_static_chain): Likewise.
        (x86_this_parameter): Likewise.
        (x86_output_mi_thunk): Likewise.
        (ix86_attribute_table): Add description for thiscall attribute.
        * config/i386/i386.h (ix86_args): Adjust comment for member
        fastcall.
        * doc/extend.texi: Add documentation for thiscall.

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

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

index 57f9f2a..74d541e 100644 (file)
@@ -1,3 +1,22 @@
+2010-04-09  Kai Tietz  <kai.tietz@onevision.com>
+
+       * config/i386/cygming.h (TARGET_OS_CPP_BUILTINS): Add
+       __thiscall and _thiscall as predefined macros.
+       * config/i386/i386.c (ix86_handle_cconv_attribute): Add
+       thiscall attribute handling.
+       (ix86_comp_type_attributes): Likewise.
+       (ix86_function_regparm): Likewise.
+       (ix86_return_pops_args): Likewise.
+       (init_cumulative_args): Likewise.
+       (find_drap_reg): Likewise.
+       (ix86_static_chain): Likewise.
+       (x86_this_parameter): Likewise.
+       (x86_output_mi_thunk): Likewise.
+       (ix86_attribute_table): Add description for thiscall attribute.
+       * config/i386/i386.h (ix86_args): Adjust comment for member
+       fastcall.
+       * doc/extend.texi: Add documentation for thiscall.
+       
 2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
 
        PR c++/28584
 2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
 
        PR c++/28584
index a54651d..8c4f088 100644 (file)
@@ -26395,13 +26395,11 @@ x86_this_parameter (tree function)
 
       if (lookup_attribute ("fastcall", TYPE_ATTRIBUTES (type)))
        regno = aggr ? DX_REG : CX_REG;
 
       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)))
       else if (lookup_attribute ("thiscall", TYPE_ATTRIBUTES (type)))
-        {
-         regno = CX_REG;
-         if (aggr)
-           return gen_rtx_MEM (SImode,
-                               plus_constant (stack_pointer_rtx, 4));
-       }
+       regno = aggr ? DX_REG : CX_REG;
       else
         {
          regno = AX_REG;
       else
         {
          regno = AX_REG;