aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sparc/sparc.md
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2005-04-12 23:07:47 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2005-04-12 21:07:47 +0000
commitd24088cce67917f848210dbb1259ef0d98a748a6 (patch)
tree73429c0c636619f8b503728c14b81dd12a2ab71d /gcc/config/sparc/sparc.md
parentca11b3fb997da7fc100bebcbfb2b2928dc6b1949 (diff)
downloadgcc-d24088cce67917f848210dbb1259ef0d98a748a6.zip
gcc-d24088cce67917f848210dbb1259ef0d98a748a6.tar.gz
gcc-d24088cce67917f848210dbb1259ef0d98a748a6.tar.bz2
sparc.h (APPLY_RESULT_SIZE): Set to 24 in 64-bit mode.
* config/sparc/sparc.h (APPLY_RESULT_SIZE): Set to 24 in 64-bit mode. * config/sparc/sparc.md (untyped_call): Save the registers manually. * config/sparc/sparc.c (legitimate_address_p): Use TARGET_ARCH32. From-SVN: r98044
Diffstat (limited to 'gcc/config/sparc/sparc.md')
-rw-r--r--gcc/config/sparc/sparc.md15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index 88c474c..2073e68 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -7621,21 +7621,22 @@
(define_expand "untyped_call"
[(parallel [(call (match_operand 0 "" "")
(const_int 0))
- (match_operand 1 "" "")
+ (match_operand:BLK 1 "memory_operand" "")
(match_operand 2 "" "")])]
""
{
- int i;
+ rtx valreg1 = gen_rtx_REG (DImode, 8);
+ rtx valreg2 = gen_rtx_REG (TARGET_ARCH64 ? TFmode : DFmode, 32);
+ rtx result = operands[1];
/* Pass constm1 to indicate that it may expect a structure value, but
we don't know what size it is. */
emit_call_insn (GEN_CALL (operands[0], const0_rtx, NULL, constm1_rtx));
- for (i = 0; i < XVECLEN (operands[2], 0); i++)
- {
- rtx set = XVECEXP (operands[2], 0, i);
- emit_move_insn (SET_DEST (set), SET_SRC (set));
- }
+ /* Save the function value registers. */
+ emit_move_insn (adjust_address (result, DImode, 0), valreg1);
+ emit_move_insn (adjust_address (result, TARGET_ARCH64 ? TFmode : DFmode, 8),
+ valreg2);
/* The optimizer does not know that the call sets the function value
registers we stored in the result block. We avoid problems by