diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-06-29 12:18:36 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2010-06-29 12:18:36 +0000 |
commit | 079e7538c0259b82dc4fd0b71c05ef918725a321 (patch) | |
tree | 2ea3f022499b2b52e578f958001d178d596536d8 /gcc/config/vax | |
parent | ea184343e7fff4b72434947715374498eafa55f9 (diff) | |
download | gcc-079e7538c0259b82dc4fd0b71c05ef918725a321.zip gcc-079e7538c0259b82dc4fd0b71c05ef918725a321.tar.gz gcc-079e7538c0259b82dc4fd0b71c05ef918725a321.tar.bz2 |
reginfo.c (init_reg_sets_1): Adjust comments.
* reginfo.c (init_reg_sets_1): Adjust comments.
* combine-stack-adj.c (rest_of_handle_stack_adjustments): Likewise.
* calls.c (prepare_call_address): Likewise.
(emit_call_1): Use targetm.calls.return_pops_args.
(expand_call): Likewise.
* function.c (assign_parms): Likewise.
* system.h (RETURN_POPS_ARGS): Add to #pragma poison list.
* target.h (struct gcc_target) [struct calls]: Add
return_pops_args field.
* targhooks.h (default_return_pops_args): Declare.
* targhooks.c (default_return_pops_args): Define.
* target-def.h (TARGET_RETURN_POPS_ARGS): Define.
(TARGET_CALLS): Add TARGET_RETURN_POPS_ARGS.
* doc/tm.texi (RETURN_POPS_ARGS): Rename to...
(TARGET_RETURN_POPS_ARGS): ...this. Use deftypefn. Adjust
documentation.
* config/alpha/alpha.h (RETURN_POPS_ARGS): Delete.
* config/arc/arc.h (RETURN_POPS_ARGS): Likewise.
* config/arm/arm.h (RETURN_POPS_ARGS): Likewise.
* config/avr/avr.h (RETURN_POPS_ARGS): Likewise.
* config/bfin/bfin.h (RETURN_POPS_ARGS): Likewise.
* config/cris/cris.h (RETURN_POPS_ARGS): Likewise.
* config/crx/crx.h (RETURN_POPS_ARGS): Likewise.
* config/fr30/fr30.h (RETURN_POPS_ARGS): Likewise.
* config/frv/frv.h (RETURN_POPS_ARGS): Likewise.
* config/h8300/h8300.h (RETURN_POPS_ARGS): Likewise.
* config/ia64/ia64.h (RETURN_POPS_ARGS): Likewise.
* config/iq2000/iq2000.h (RETURN_POPS_ARGS): Likewise.
* config/lm32/lm32.h (RETURN_POPS_ARGS): Likewise.
* config/m32c/m32c.h (RETURN_POPS_ARGS): Likewise.
* config/m32r/m32r.h (RETURN_POPS_ARGS): Likewise.
* config/m68hc11/m68hc11.h (RETURN_POPS_ARGS): Likewise.
* config/mcore/mcore.h (RETURN_POPS_ARGS): Likewise.
* config/mep/mep.h (RETURN_POPS_ARGS): Likewise.
* config/mips/mips.h (RETURN_POPS_ARGS): Likewise.
* config/mmix/mmix.h (RETURN_POPS_ARGS): Likewise.
* config/mn10300/mn10300.h (RETURN_POPS_ARGS): Likewise.
* config/moxie/moxie.h (RETURN_POPS_ARGS): Likewise.
* config/pa/pa.h (RETURN_POPS_ARGS): Likewise.
* config/pdp11/pdp11.h (RETURN_POPS_ARGS): Likewise.
* config/picochip/picochip.h (RETURN_POPS_ARGS): Likewise.
* config/rs6000/rs6000.h (RETURN_POPS_ARGS): Likewise.
* config/rx/rx.h (RETURN_POPS_ARGS): Likewise.
* config/s390/s390.h (RETURN_POPS_ARGS): Likewise.
* config/score/score.h (RETURN_POPS_ARGS): Likewise.
* config/sh/sh.h (RETURN_POPS_ARGS): Likewise.
* config/sparc/sparc.h (RETURN_POPS_ARGS): Likewise.
* config/spu/spu.h (RETURN_POPS_ARGS): Likewise.
* config/stormy16/stormy16.h (RETURN_POPS_ARGS): Likewise.
* config/v850/v850.h (RETURN_POPS_ARGS): Likewise.
* config/xtensa/xtensa.h (RETURN_POPS_ARGS): Likewise.
* config/i386/i386-protos.h (ix86_return_pops_args): Delete.
* config/i386/i386.h (RETURN_POPS_ARGS): Delete.
* config/i386/i386.c (ix86_return_pops_args): Make static.
Constify arguments.
(TARGET_RETURN_POPS_ARGS): Define.
* config/m68k/m68k.h (RETURN_POPS_ARGS): Move to...
* config/m68k/m68k.c (m68k_return_pops_args): ...here. New function.
(TARGET_RETURN_POPS_ARGS): Define.
* config/vax/vax.h (RETURN_POPS_ARGS): Move to...
* config/vax/vax.c (vax_return_pops_args): ...here. New function.
(TARGET_RETURN_POPS_ARGS): Define.
From-SVN: r161528
Diffstat (limited to 'gcc/config/vax')
-rw-r--r-- | gcc/config/vax/vax.c | 18 | ||||
-rw-r--r-- | gcc/config/vax/vax.h | 12 |
2 files changed, 18 insertions, 12 deletions
diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c index 5d547fe..b3dfcb1e 100644 --- a/gcc/config/vax/vax.c +++ b/gcc/config/vax/vax.c @@ -58,6 +58,7 @@ static rtx vax_struct_value_rtx (tree, int); static rtx vax_builtin_setjmp_frame_value (void); static void vax_asm_trampoline_template (FILE *); static void vax_trampoline_init (rtx, tree, rtx); +static int vax_return_pops_args (tree, tree, int); /* Initialize the GCC target structure. */ #undef TARGET_ASM_ALIGNED_HI_OP @@ -106,6 +107,8 @@ static void vax_trampoline_init (rtx, tree, rtx); #define TARGET_ASM_TRAMPOLINE_TEMPLATE vax_asm_trampoline_template #undef TARGET_TRAMPOLINE_INIT #define TARGET_TRAMPOLINE_INIT vax_trampoline_init +#undef TARGET_RETURN_POPS_ARGS +#define TARGET_RETURN_POPS_ARGS vax_return_pops_args struct gcc_target targetm = TARGET_INITIALIZER; @@ -2068,3 +2071,18 @@ vax_trampoline_init (rtx m_tramp, tree fndecl, rtx cxt) emit_insn (gen_sync_istream ()); } +/* 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 pops a maximum of 255 args for any function. */ + +static int +vax_return_pops_args (tree fundecl ATTRIBUTE_UNUSED, + tree funtype ATTRIBUTE_UNUSED, int size) +{ + return size > 255 * 4 ? 0 : size; +} diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h index e85ce01..88a8f1c 100644 --- a/gcc/config/vax/vax.h +++ b/gcc/config/vax/vax.h @@ -305,18 +305,6 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES }; /* Offset of first parameter from the argument pointer register value. */ #define FIRST_PARM_OFFSET(FNDECL) 4 -/* 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 pops a maximum of 255 args for any function. */ - -#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ - ((SIZE) > 255 * 4 ? 0 : (SIZE)) - /* Define how to find the value returned by a function. VALTYPE is the data type of the value (as a tree). If the precise function being called is known, FUNC is its FUNCTION_DECL; |