diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-02-16 12:42:34 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-02-16 12:42:34 -0800 |
commit | 29587b1c562162ec7f706aadb9805d05089e1987 (patch) | |
tree | 9fd8154ee1697a34df88871f8a55ead981099bfe /gcc/config/alpha | |
parent | 81fe0dbc99a48b3e8efa5c3ed972514961e32705 (diff) | |
download | gcc-29587b1c562162ec7f706aadb9805d05089e1987.zip gcc-29587b1c562162ec7f706aadb9805d05089e1987.tar.gz gcc-29587b1c562162ec7f706aadb9805d05089e1987.tar.bz2 |
(alpha_builtin_saveregs): Don't include current_function_arg_offset_rtx in argsize.
(alpha_builtin_saveregs): Don't include
current_function_arg_offset_rtx in argsize. Subtract 48 from arg
base address when no int registers stored on the stack.
From-SVN: r6576
Diffstat (limited to 'gcc/config/alpha')
-rw-r--r-- | gcc/config/alpha/alpha.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 923c5f4..00ca472 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -1056,10 +1056,23 @@ alpha_builtin_saveregs (arglist) != void_type_node)); /* Compute the current position into the args, taking into account - both registers and memory. */ + both registers and memory. Both of these are already included in + current_function_args_info. */ - argsize = plus_constant (current_function_arg_offset_rtx, - current_function_args_info * UNITS_PER_WORD); + argsize = GEN_INT (current_function_args_info * UNITS_PER_WORD); + + /* SETUP_INCOMING_VARARGS moves the starting address base up by 48, + storing fp arg registers in the first 48 bytes, and the integer arg + registers in the next 48 bytes. This is only done, however, if any + integer registers need to be stored. + + If no integer registers need be stored, then we must subtract 48 in + order to account for the integer arg registers which are counted in + argsize above, but which are not actually stored on the stack. */ + + addr = (current_function_args_info < 6 + ? plus_constant (virtual_incoming_args_rtx, 6 * UNITS_PER_WORD) + : plus_constant (virtual_incoming_args_rtx, - (6 * UNITS_PER_WORD))); /* Allocate the va_list constructor */ block = assign_stack_local (BLKmode, 2 * UNITS_PER_WORD, BITS_PER_WORD); @@ -1067,12 +1080,9 @@ alpha_builtin_saveregs (arglist) RTX_UNCHANGING_P (XEXP (block, 0)) = 1; /* Store the address of the first integer register in the - __va_base member. */ - - emit_move_insn (change_address (block, DImode, XEXP (block, 0)), - force_operand (plus_constant (virtual_incoming_args_rtx, - 6 * UNITS_PER_WORD), - NULL_RTX)); + __va_base member. */ + emit_move_insn (change_address (block, Pmode, XEXP (block, 0)), + force_operand (addr, NULL_RTX)); /* Store the argsize as the __va_offset member. */ emit_move_insn (change_address (block, Pmode, |