Commit 3ac5ea7c by Richard Henderson

arm-protos.h (arm_va_arg): Remove.

        * config/arm/arm-protos.h (arm_va_arg): Remove.
        * config/arm/arm.c (arm_va_arg): Remove.
        (arm_init_expanders): Fix alignment of arg_pointer_rtx.
        * config/arm/arm.h (EXPAND_BUILTIN_VA_ARG): Remove.

From-SVN: r84695
parent a2017852
2004-07-14 Richard Henderson <rth@redhat.com>
* config/arm/arm-protos.h (arm_va_arg): Remove.
* config/arm/arm.c (arm_va_arg): Remove.
(arm_init_expanders): Fix alignment of arg_pointer_rtx.
* config/arm/arm.h (EXPAND_BUILTIN_VA_ARG): Remove.
2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.c (fix_range): New function to mark a range(s) of registers as * pa.c (fix_range): New function to mark a range(s) of registers as
......
...@@ -155,7 +155,6 @@ extern const char *vfp_output_fstmx (rtx *); ...@@ -155,7 +155,6 @@ extern const char *vfp_output_fstmx (rtx *);
#if defined TREE_CODE #if defined TREE_CODE
extern rtx arm_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int); extern rtx arm_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
extern void arm_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree); extern void arm_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
extern rtx arm_va_arg (tree, tree);
extern bool arm_needs_doubleword_align (enum machine_mode, tree); extern bool arm_needs_doubleword_align (enum machine_mode, tree);
extern rtx arm_function_value(tree, tree); extern rtx arm_function_value(tree, tree);
#endif #endif
......
...@@ -2408,44 +2408,6 @@ arm_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED, ...@@ -2408,44 +2408,6 @@ arm_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
return type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST; return type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST;
} }
/* Implement va_arg. */
rtx
arm_va_arg (tree valist, tree type)
{
int align;
/* Variable sized types are passed by reference. */
if (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
{
rtx addr = std_expand_builtin_va_arg (valist, build_pointer_type (type));
return gen_rtx_MEM (ptr_mode, force_reg (Pmode, addr));
}
align = FUNCTION_ARG_BOUNDARY (TYPE_MODE (type), type);
if (align > PARM_BOUNDARY)
{
tree mask;
tree t;
/* Maintain 64-bit alignment of the valist pointer by
constructing: valist = ((valist + (8 - 1)) & -8). */
mask = build_int_2 (- (align / BITS_PER_UNIT), -1);
t = build_int_2 ((align / BITS_PER_UNIT) - 1, 0);
t = build (PLUS_EXPR, TREE_TYPE (valist), valist, t);
t = build (BIT_AND_EXPR, TREE_TYPE (t), t, mask);
t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, t);
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
/* This is to stop the combine pass optimizing
away the alignment adjustment. */
mark_reg_pointer (arg_pointer_rtx, PARM_BOUNDARY);
}
return std_expand_builtin_va_arg (valist, type);
}
/* Encode the current state of the #pragma [no_]long_calls. */ /* Encode the current state of the #pragma [no_]long_calls. */
typedef enum typedef enum
{ {
...@@ -13159,6 +13121,12 @@ arm_init_expanders (void) ...@@ -13159,6 +13121,12 @@ arm_init_expanders (void)
{ {
/* Arrange to initialize and mark the machine per-function status. */ /* Arrange to initialize and mark the machine per-function status. */
init_machine_status = arm_init_machine_status; init_machine_status = arm_init_machine_status;
/* This is to stop the combine pass optimizing away the alignment
adjustment of va_arg. */
/* ??? It is claimed that this should not be necessary. */
if (cfun)
mark_reg_pointer (arg_pointer_rtx, PARM_BOUNDARY);
} }
......
...@@ -1733,10 +1733,6 @@ typedef struct ...@@ -1733,10 +1733,6 @@ typedef struct
|| (TARGET_IWMMXT_ABI \ || (TARGET_IWMMXT_ABI \
&& IN_RANGE ((REGNO), FIRST_IWMMXT_REGNUM, FIRST_IWMMXT_REGNUM + 9))) && IN_RANGE ((REGNO), FIRST_IWMMXT_REGNUM, FIRST_IWMMXT_REGNUM + 9)))
/* Implement `va_arg'. */
#define EXPAND_BUILTIN_VA_ARG(valist, type) \
arm_va_arg (valist, type)
/* If your target environment doesn't prefix user functions with an /* If your target environment doesn't prefix user functions with an
underscore, you may wish to re-define this to prevent any conflicts. underscore, you may wish to re-define this to prevent any conflicts.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment