diff options
author | Kresten Krab Thorup <krab@gcc.gnu.org> | 1993-08-24 09:53:21 +0000 |
---|---|---|
committer | Kresten Krab Thorup <krab@gcc.gnu.org> | 1993-08-24 09:53:21 +0000 |
commit | fb2ca25a9d578674144a76548fc4f90187a5ca03 (patch) | |
tree | c07260788568dae808d319fab2be926a19a16166 | |
parent | 87881feba59b9b87f8ad970b3cdb1deeb0e20b21 (diff) | |
download | gcc-fb2ca25a9d578674144a76548fc4f90187a5ca03.zip gcc-fb2ca25a9d578674144a76548fc4f90187a5ca03.tar.gz gcc-fb2ca25a9d578674144a76548fc4f90187a5ca03.tar.bz2 |
(apply_args_register_offset): New function
(apply_args_register_offset): New function
(apply_args_register_offset): New function
(apply_args_reg_offset): New variable
(apply_args_size): Added initialization of apply_args_reg_offset.
From-SVN: r5198
-rw-r--r-- | gcc/expr.c | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -6507,6 +6507,28 @@ static enum machine_mode apply_args_mode[FIRST_PSEUDO_REGISTER]; INCOMING_REGNO gives the corresponding inbound register. */ static enum machine_mode apply_result_mode[FIRST_PSEUDO_REGISTER]; +/* For each register that may be used for calling a function, this + gives the offset of that register into the block returned by + __bultin_apply_args. 0 indicates that the register is not + used for calling a function. */ +static int apply_args_reg_offset[FIRST_PSEUDO_REGISTER]; + +/* Return the offset of register REGNO into the block returned by + __builtin_apply_args. This is not declared static, since it is + needed in objc-act.c. */ +int +apply_args_register_offset (int regno) +{ + apply_args_size (); + + /* Arguments are always put in outgoing registers (in the argument + block) if such make sense. */ +#ifdef OUTGOING_REGNO + regno = OUTGOING_REGNO(regno); +#endif + return apply_args_reg_offset[regno]; +} + /* Return the size required for the block returned by __builtin_apply_args, and initialize apply_args_mode. */ static int @@ -6557,11 +6579,15 @@ apply_args_size () align = GET_MODE_ALIGNMENT (mode) / BITS_PER_UNIT; if (size % align != 0) size = CEIL (size, align) * align; + apply_args_reg_offset[regno] = size; size += GET_MODE_SIZE (mode); apply_args_mode[regno] = mode; } else - apply_args_mode[regno] = VOIDmode; + { + apply_args_mode[regno] = VOIDmode; + apply_args_reg_offset[regno] = 0; + } } return size; } |