diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1995-02-10 16:06:02 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1995-02-10 16:06:02 +0000 |
commit | 8b236af9f9005ebde5dd0d0f5dc2a064626d4bb4 (patch) | |
tree | bd117486466858a14475ae9fa656ef5d37fe6ab5 | |
parent | b1e74255f30eac7fe367933c80bb9b5208c8ea4e (diff) | |
download | gcc-8b236af9f9005ebde5dd0d0f5dc2a064626d4bb4.zip gcc-8b236af9f9005ebde5dd0d0f5dc2a064626d4bb4.tar.gz gcc-8b236af9f9005ebde5dd0d0f5dc2a064626d4bb4.tar.bz2 |
Define RETURN_ADDR_RTX
From-SVN: r8899
-rw-r--r-- | gcc/config/rs6000/rs6000.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index d848450..9c70815 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -1131,6 +1131,26 @@ struct rs6000_args {int words, fregno, nargs_prototype; }; force_reg (SImode, (CXT))); \ } +/* Definitions for __builtin_return_address and __builtin_frame_address. */ +/* __builtin_return_address (0) should give $lr, enable this. */ +/* This should be uncommented, so that the link register is used, but + currently this would result in unmatched insns and spilling fixed + registers so we'll leave it for another day. When these problems are taken + care of one additional fetch will be necessary in RETURN_ADDR_RTX. (mrs) */ +/* #define RETURN_ADDR_IN_PREVIOUS_FRAME */ + +/* The current return address is in $lr (65). The return address of anything + farther back is accessed normally at [[%fp]+8]. */ +#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))))) + + /* Definitions for register eliminations. We have two registers that can be eliminated on the RS/6000. First, the |