Commit e414ab29 by Richard Henderson Committed by Jim Wilson

Patch from Richard Henderson to make __builtin_return_address(0) work.

	* i386.h (RETURN_ADDR_RTX): New definition that works for
	__builtin_return_address(0) and -fomit-frame-pointer.

From-SVN: r15835
parent 808d0b10
Thu Oct 2 21:15:03 1997 Richard Henderson <rth@cygnus.com>
* i386.h (RETURN_ADDR_RTX): New definition that works for
__builtin_return_address(0) and -fomit-frame-pointer.
Wed Oct 1 13:43:53 1997 Jim Wilson <wilson@cygnus.com> Wed Oct 1 13:43:53 1997 Jim Wilson <wilson@cygnus.com>
Bring over from FSF. Bring over from FSF.
......
...@@ -2370,6 +2370,12 @@ number as al, and ax. ...@@ -2370,6 +2370,12 @@ number as al, and ax.
#define INCOMING_RETURN_ADDR_RTX \ #define INCOMING_RETURN_ADDR_RTX \
gen_rtx (MEM, VOIDmode, gen_rtx (REG, VOIDmode, STACK_POINTER_REGNUM)) gen_rtx (MEM, VOIDmode, gen_rtx (REG, VOIDmode, STACK_POINTER_REGNUM))
/* After the prologue, RA is at -4(AP) in the current frame. */
#define RETURN_ADDR_RTX(COUNT, FRAME) \
((COUNT) == 0 \
? gen_rtx (MEM, Pmode, gen_rtx (PLUS, Pmode, arg_pointer_rtx, GEN_INT(-4)))\
: gen_rtx (MEM, Pmode, gen_rtx (PLUS, Pmode, (FRAME), GEN_INT(4))))
/* PC is dbx register 8; let's use that column for RA. */ /* PC is dbx register 8; let's use that column for RA. */
#define DWARF_FRAME_RETURN_COLUMN 8 #define DWARF_FRAME_RETURN_COLUMN 8
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment