sparc.h (ASM_OUTPUT_MI_THUNK): On sparc64 we need to adjust %o1, not %o0 if the retur...
authorJakub Jelinek <jakub@redhat.com>
Mon, 6 Nov 2000 10:36:33 +0000 (11:36 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 6 Nov 2000 10:36:33 +0000 (11:36 +0100)
* config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): On sparc64 we need to
adjust %o1, not %o0 if the return type is large structure.

From-SVN: r37273

gcc/ChangeLog
gcc/config/sparc/sparc.h

index c728088bae3843793307ebc0ccce53d08981b161..e7d8a0e05ca14e4202baf4f03431c93b1dae97c0 100644 (file)
@@ -1,3 +1,8 @@
+2000-11-06  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): On sparc64 we need to
+       adjust %o1, not %o0 if the return type is large structure.
+
 2000-11-06  Jakub Jelinek  <jakub@redhat.com>
 
        * config/sparc/sparc.md (smulsi3_highpart_v8plus, ashldi3_v8plus+1,
index ee3660f9dfe819ca24840610a2f1153ebd5700f9..3fa2a6db3842bc2c5e98784e43af9e4d8a0c68b0 100644 (file)
@@ -3231,10 +3231,16 @@ do {                                                                    \
    Used for C++ multiple inheritance.  */
 #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION)       \
 do {                                                                   \
+  int reg = 0;                                                         \
+                                                                       \
+  if (TARGET_ARCH64                                                    \
+      && aggregate_value_p (TREE_TYPE (TREE_TYPE (FUNCTION))))         \
+    reg = 1;                                                           \
   if ((DELTA) >= 4096 || (DELTA) < -4096)                              \
-    fprintf (FILE, "\tset\t%d, %%g1\n\tadd\t%%o0, %%g1, %%o0\n", (DELTA));\
+    fprintf (FILE, "\tset\t%d, %%g1\n\tadd\t%%o%d, %%g1, %%o%d\n",     \
+            (DELTA), reg, reg);                                        \
   else                                                                 \
-    fprintf (FILE, "\tadd\t%%o0, %d, %%o0\n", DELTA);                  \
+    fprintf (FILE, "\tadd\t%%o%d, %d, %%o%d\n", reg, (DELTA), reg);    \
   fprintf (FILE, "\tor\t%%o7, %%g0, %%g1\n");                          \
   fprintf (FILE, "\tcall\t");                                          \
   assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0));       \