* 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
+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>
* pa.c (fix_range): New function to mark a range(s) of registers as
(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
* 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.
side-effect of having a length greater or equal to 3.
2004-07-13 Eric Botcazou <ebotcazou@libertysurf.fr>
- Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
+ Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
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 <ebotcazou@libertysurf.fr>
- Martin Sebor <sebor@roguewave.com>
+ Martin Sebor <sebor@roguewave.com>
PR target/12602
* doc/invoke.texi (SPARC options): Document -threads
* config/darwin.h (LINK_COMMAND_SPEC): Don't call c++filt.
2004-07-10 Steve Kargl <sgk@troutmask.apl.washington.edu>
- James Morrison <phython@gcc.gnu.org>
+ James Morrison <phython@gcc.gnu.org>
- * 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 <rakdver@atrey.karlin.mff.cuni.cz>
#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
{
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);
-}
\f
/* Encode the current state of the #pragma [no_]long_calls. */
typedef enum
{
/* 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);
}
|| (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)
-
\f
/* If your target environment doesn't prefix user functions with an
underscore, you may wish to re-define this to prevent any conflicts.