--- gcc/config/vax/vax.h 2018/04/24 18:22:18 1.1.1.3 +++ gcc/config/vax/vax.h 2018/04/24 18:35:23 1.1.1.5 @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler. Vax version. - Copyright (C) 1987, 1988, 1991, 1993, 1994 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 91, 93, 94, 95 Free Software Foundation, Inc. This file is part of GNU CC. @@ -15,7 +15,8 @@ GNU General Public License for more deta You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ /* Names to predefine in the preprocessor for this target machine. */ @@ -352,13 +353,14 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CO /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), FUNTYPE is the data type of the function (as a tree), or for a library call it is an identifier node for the subroutine name. SIZE is the number of bytes of arguments passed on the stack. On the Vax, the RET insn always pops all the args for any function. */ -#define RETURN_POPS_ARGS(FUNTYPE,SIZE) (SIZE) +#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) (SIZE) /* Define how to find the value returned by a function. VALTYPE is the data type of the value (as a tree). @@ -549,6 +551,20 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CO emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 11)), \ plus_constant (FNADDR, 2)); \ } + +/* Byte offset of return address in a stack frame. The "saved PC" field + is in element [4] when treating the frame as an array of longwords. */ + +#define RETURN_ADDRESS_OFFSET (4 * UNITS_PER_WORD) /* 16 */ + +/* A C expression whose value is RTL representing the value of the return + address for the frame COUNT steps up from the current frame. + FRAMEADDR is already the frame pointer of the COUNT frame, so we + can ignore COUNT. */ + +#define RETURN_ADDR_RTX(COUNT, FRAME) \ + gen_rtx (MEM, Pmode, plus_constant (FRAME, RETURN_ADDRESS_OFFSET)) + /* Addressing modes, and classification of registers for them. */ @@ -947,7 +963,8 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CO { if (GET_CODE (EXP) == SET) \ { if (GET_CODE (SET_SRC (EXP)) == CALL) \ CC_STATUS_INIT; \ - else if (GET_CODE (SET_DEST (EXP)) != PC) \ + else if (GET_CODE (SET_DEST (EXP)) != ZERO_EXTRACT \ + && GET_CODE (SET_DEST (EXP)) != PC) \ { cc_status.flags = 0; \ cc_status.value1 = SET_DEST (EXP); \ cc_status.value2 = SET_SRC (EXP); } } \ @@ -955,13 +972,15 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CO && GET_CODE (XVECEXP (EXP, 0, 0)) == SET) \ { \ if (GET_CODE (SET_SRC (XVECEXP (EXP, 0, 0))) == CALL) \ - CC_STATUS_INIT; \ + CC_STATUS_INIT; \ else if (GET_CODE (SET_DEST (XVECEXP (EXP, 0, 0))) != PC) \ { cc_status.flags = 0; \ cc_status.value1 = SET_DEST (XVECEXP (EXP, 0, 0)); \ - cc_status.value2 = SET_SRC (XVECEXP (EXP, 0, 0)); } } \ - /* PARALLELs whose first element sets the PC are aob, sob insns. \ - They do change the cc's. So drop through and forget the cc's. */ \ + cc_status.value2 = SET_SRC (XVECEXP (EXP, 0, 0)); } \ + else \ + /* PARALLELs whose first element sets the PC are aob, \ + sob insns. They do change the cc's. */ \ + CC_STATUS_INIT; } \ else CC_STATUS_INIT; \ if (cc_status.value1 && GET_CODE (cc_status.value1) == REG \ && cc_status.value2 \