aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/rs6000
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-10-03 11:49:16 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-10-03 11:49:16 -0400
commitf09d4c33098a3172b5816f63694479e10fd1a234 (patch)
tree76bc0e7604398500acdc52601fd0f723899c87a0 /gcc/config/rs6000
parent2bbf216f5ecb8c1fed98a09778541778fca672d7 (diff)
downloadgcc-f09d4c33098a3172b5816f63694479e10fd1a234.zip
gcc-f09d4c33098a3172b5816f63694479e10fd1a234.tar.gz
gcc-f09d4c33098a3172b5816f63694479e10fd1a234.tar.bz2
(RETURN_ADDR_RTX): Remove call to copy_to_reg.
(RETURN_ADDR_RTX): Remove call to copy_to_reg. Offset to return address is 4 when !TARGET_64BIT and v4_call_p, 8 otherwise. From-SVN: r10419
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r--gcc/config/rs6000/rs6000.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 823ebca..5e7a6e6 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -1246,17 +1246,21 @@ typedef struct rs6000_args
taken care of one additional fetch will be necessary in RETURN_ADDR_RTX.
(mrs) */
/* #define RETURN_ADDR_IN_PREVIOUS_FRAME */
+
+/* Number of bytes into the frame return addresses can be found. */
+#define RETURN_ADDRESS_OFFSET (v4_call_p ? (TARGET_64BIT ? 8 : 4) : 8)
+
/* The current return address is in link register (65). The return address
of anything farther back is accessed normally at an offset of 8 from the
frame pointer. */
#define RETURN_ADDR_RTX(count, frame) \
((count == -1) \
? gen_rtx (REG, Pmode, 65) \
- : copy_to_reg (gen_rtx (MEM, Pmode, \
- memory_address (Pmode, \
- plus_constant (copy_to_reg (gen_rtx (MEM, Pmode, \
- memory_address (Pmode, frame))), \
- 8)))))
+ : gen_rtx (MEM, Pmode, \
+ memory_address (Pmode, \
+ plus_constant (copy_to_reg (gen_rtx (MEM, Pmode, \
+ memory_address (Pmode, frame))), \
+ RETURN_ADDRESS_OFFSET))))
/* Definitions for register eliminations.