aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKresten Krab Thorup <krab@gcc.gnu.org>1993-08-24 09:53:21 +0000
committerKresten Krab Thorup <krab@gcc.gnu.org>1993-08-24 09:53:21 +0000
commitfb2ca25a9d578674144a76548fc4f90187a5ca03 (patch)
treec07260788568dae808d319fab2be926a19a16166
parent87881feba59b9b87f8ad970b3cdb1deeb0e20b21 (diff)
downloadgcc-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.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index a2f5c43..f7e1c67 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -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;
}