From: Richard Henderson Date: Wed, 14 Jul 2004 17:51:18 +0000 (-0700) Subject: arm-protos.h (arm_va_arg): Remove. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ac5ea7c80dd6f688952560fc425c6b06d6c3c94;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b24e2245dc9..59ee70e7dd1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-07-14 Richard Henderson + + * 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 * pa.c (fix_range): New function to mark a range(s) of registers as @@ -178,7 +185,7 @@ (mips_pass_by_reference): Rename from function_arg_pass_by_reference. Handle mode sizes correctly. * config/mips/mips.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. - (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. + (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mmix/mmix-protos.h (mmix_function_arg_pass_by_reference): Kill. * config/mmix/mmix.c (TARGET_PASS_BY_REFERENCE): New. (mmix_pass_by_reference): Rename from @@ -192,7 +199,7 @@ * config/pa/pa.c (pa_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/pa/pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. - (FUNCTION_ARG_CALLEE_COPIES): True. + (FUNCTION_ARG_CALLEE_COPIES): True. * config/rs6000/rs6000-protos.h (function_arg_pass_by_reference): Kill. * config/rs6000/rs6000.c (TARGET_PASS_BY_REFERENCE): New. (rs6000_pass_by_reference): Rename from function_arg_pass_by_reference. @@ -297,14 +304,14 @@ side-effect of having a length greater or equal to 3. 2004-07-13 Eric Botcazou - Lloyd Parkes + Lloyd Parkes PR target/15186 * config/sparc/sol2-bi.h (LINK_ARCH64_SPEC_BASE): Pass /usr/ucblib/sparcv9 as -R path when -compat-bsd is specified. 2004-07-13 Eric Botcazou - Martin Sebor + Martin Sebor PR target/12602 * doc/invoke.texi (SPARC options): Document -threads @@ -732,9 +739,9 @@ * config/darwin.h (LINK_COMMAND_SPEC): Don't call c++filt. 2004-07-10 Steve Kargl - James Morrison + James Morrison - * doc/contrib.texi (Contributors): Add gfortran contributors and + * doc/contrib.texi (Contributors): Add gfortran contributors and fix a couple of typos. 2004-07-10 Zdenek Dvorak diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h index ce3ff6aff69..291f6d78f01 100644 --- a/gcc/config/arm/arm-protos.h +++ b/gcc/config/arm/arm-protos.h @@ -155,7 +155,6 @@ extern const char *vfp_output_fstmx (rtx *); #if defined TREE_CODE extern rtx arm_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int); 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 rtx arm_function_value(tree, tree); #endif diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index a94b82bbec5..1de284e1d62 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -2407,44 +2407,6 @@ arm_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED, { 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. */ typedef enum @@ -13159,6 +13121,12 @@ arm_init_expanders (void) { /* Arrange to initialize and mark the machine per-function 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); } diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index ad006c555b0..0f195672af4 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -1733,10 +1733,6 @@ typedef struct || (TARGET_IWMMXT_ABI \ && 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 underscore, you may wish to re-define this to prevent any conflicts.