aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jj@sunsite.ms.mff.cuni.cz>1998-09-24 18:16:58 +0200
committerDavid S. Miller <davem@gcc.gnu.org>1998-09-24 09:16:58 -0700
commit3c6088d24f6b5a92950a9a4bd52dfce50671a2f2 (patch)
tree04ca1d40b795e0cc928794af22372e57b566a53c
parent711878702f49c6b81c3959feb85c9a84b8cb1f1e (diff)
downloadgcc-3c6088d24f6b5a92950a9a4bd52dfce50671a2f2.zip
gcc-3c6088d24f6b5a92950a9a4bd52dfce50671a2f2.tar.gz
gcc-3c6088d24f6b5a92950a9a4bd52dfce50671a2f2.tar.bz2
sparc.c (function_value): Perform the equivalent of PROMOTE_MODE for ARCH64.
Thu Sep 24 15:08:08 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz> * config/sparc/sparc.c (function_value): Perform the equivalent of PROMOTE_MODE for ARCH64. (eligible_for_epilogue_delay): Allow DImode operations in delay slot of a return for ARCH64. From-SVN: r22573
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/sparc/sparc.c15
2 files changed, 20 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index afd9981..900fedd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Thu Sep 24 15:08:08 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
+
+ * config/sparc/sparc.c (function_value): Perform the equivalent of
+ PROMOTE_MODE for ARCH64.
+ (eligible_for_epilogue_delay): Allow DImode operations in delay
+ slot of a return for ARCH64.
+
Thu Sep 24 22:17:54 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.md (sqrtsf2): Fix mode of sqrt.
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 180666b..16fd6b7 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -2259,9 +2259,14 @@ eligible_for_epilogue_delay (trial, slot)
src = SET_SRC (pat);
- /* This matches "*return_[qhs]i". */
+ /* This matches "*return_[qhs]i" or even "*return_di" on TARGET_ARCH64. */
if (arith_operand (src, GET_MODE (src)))
- return GET_MODE_SIZE (GET_MODE (src)) <= GET_MODE_SIZE (SImode);
+ {
+ if (TARGET_ARCH64)
+ return GET_MODE_SIZE (GET_MODE (src)) <= GET_MODE_SIZE (DImode);
+ else
+ return GET_MODE_SIZE (GET_MODE (src)) <= GET_MODE_SIZE (SImode);
+ }
/* This matches "*return_di". */
else if (arith_double_operand (src, GET_MODE (src)))
@@ -4232,6 +4237,12 @@ function_value (type, mode, incoming_p)
mode = mode_for_size (bytes * BITS_PER_UNIT, MODE_INT, 0);
}
}
+
+ if (TARGET_ARCH64
+ && GET_MODE_CLASS (mode) == MODE_INT
+ && GET_MODE_SIZE (mode) < UNITS_PER_WORD
+ && type && TREE_CODE (type) != UNION_TYPE)
+ mode = DImode;
if (incoming_p)
regno = BASE_RETURN_VALUE_REG (mode);