aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/alpha
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2004-06-11 14:41:47 -0400
committerJason Merrill <jason@gcc.gnu.org>2004-06-11 14:41:47 -0400
commit67c605a553faab6244a1b1d987059798e6c1f9aa (patch)
tree53b714fbb57b9a4edc2c059014d88e351591041f /gcc/config/alpha
parent67fc0c0f596944a4bc88cb8d8061bf4c8753c03f (diff)
downloadgcc-67c605a553faab6244a1b1d987059798e6c1f9aa.zip
gcc-67c605a553faab6244a1b1d987059798e6c1f9aa.tar.gz
gcc-67c605a553faab6244a1b1d987059798e6c1f9aa.tar.bz2
i386.h (EXPAND_BUILTIN_VA_ARG): Just abort.
* config/i386/i386.h (EXPAND_BUILTIN_VA_ARG): Just abort. * config/i386/i386.c (ix86_va_arg): Remove. * config/rs6000/rs6000.h (EXPAND_BUILTIN_VA_ARG): Just abort. * config/rs6000/rs6000.c (rs6000_va_arg): Remove. * config/alpha/alpha.h (EXPAND_BUILTIN_VA_ARG): Just abort. * config/alpha/alpha.c (alpha_va_arg): Remove. * config/sparc/sparc.h (EXPAND_BUILTIN_VA_ARG): Just abort. * config/sparc/sparc.c (sparc_va_arg): Remove. * tree-ssa-operands.c (get_stmt_operands): Use a V_MAY_DEF if the assignment might throw. * tree-eh.c (tree_could_throw_p): Support non-call exceptions in expressions. From-SVN: r82992
Diffstat (limited to 'gcc/config/alpha')
-rw-r--r--gcc/config/alpha/alpha.c109
-rw-r--r--gcc/config/alpha/alpha.h3
2 files changed, 1 insertions, 111 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 7c9d67d..d4b78d3 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -6291,115 +6291,6 @@ alpha_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
}
}
-rtx
-alpha_va_arg (tree valist, tree type)
-{
- rtx addr;
- tree t, type_size, rounded_size;
- tree offset_field, base_field, addr_tree, addend;
- tree wide_type, wide_ofs;
- int indirect = 0;
-
- if (TARGET_ABI_OPEN_VMS || TARGET_ABI_UNICOSMK)
- return std_expand_builtin_va_arg (valist, type);
-
- if (type == error_mark_node
- || (type_size = TYPE_SIZE_UNIT (TYPE_MAIN_VARIANT (type))) == NULL
- || TREE_OVERFLOW (type_size))
- rounded_size = size_zero_node;
- else
- rounded_size = fold (build (MULT_EXPR, sizetype,
- fold (build (TRUNC_DIV_EXPR, sizetype,
- fold (build (PLUS_EXPR, sizetype,
- type_size,
- size_int (7))),
- size_int (8))),
- size_int (8)));
-
- base_field = TYPE_FIELDS (TREE_TYPE (valist));
- offset_field = TREE_CHAIN (base_field);
-
- base_field = build (COMPONENT_REF, TREE_TYPE (base_field),
- valist, base_field);
- offset_field = build (COMPONENT_REF, TREE_TYPE (offset_field),
- valist, offset_field);
-
- /* If the type could not be passed in registers, skip the block
- reserved for the registers. */
- if (MUST_PASS_IN_STACK (TYPE_MODE (type), type))
- {
- t = build (MODIFY_EXPR, TREE_TYPE (offset_field), offset_field,
- build (MAX_EXPR, TREE_TYPE (offset_field),
- offset_field, build_int_2 (6*8, 0)));
- TREE_SIDE_EFFECTS (t) = 1;
- expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
- }
-
- wide_type = make_signed_type (64);
- wide_ofs = save_expr (build1 (CONVERT_EXPR, wide_type, offset_field));
-
- addend = wide_ofs;
-
- if (TYPE_MODE (type) == TFmode || TYPE_MODE (type) == TCmode)
- {
- indirect = 1;
- rounded_size = size_int (UNITS_PER_WORD);
- }
- else if (TREE_CODE (type) == COMPLEX_TYPE)
- {
- rtx real_part, imag_part, value, tmp;
-
- real_part = alpha_va_arg (valist, TREE_TYPE (type));
- imag_part = alpha_va_arg (valist, TREE_TYPE (type));
-
- /* ??? Most irritatingly, we're not returning the value here,
- but the address. Since real_part and imag_part are not
- necessarily contiguous, we must copy to local storage. */
-
- real_part = gen_rtx_MEM (TYPE_MODE (TREE_TYPE (type)), real_part);
- imag_part = gen_rtx_MEM (TYPE_MODE (TREE_TYPE (type)), imag_part);
- value = gen_rtx_CONCAT (TYPE_MODE (type), real_part, imag_part);
-
- tmp = assign_temp (type, 0, 1, 0);
- emit_move_insn (tmp, value);
-
- return XEXP (tmp, 0);
- }
- else if (TREE_CODE (type) == REAL_TYPE)
- {
- tree fpaddend, cond;
-
- fpaddend = fold (build (PLUS_EXPR, TREE_TYPE (addend),
- addend, build_int_2 (-6*8, 0)));
-
- cond = fold (build (LT_EXPR, integer_type_node,
- wide_ofs, build_int_2 (6*8, 0)));
-
- addend = fold (build (COND_EXPR, TREE_TYPE (addend), cond,
- fpaddend, addend));
- }
-
- addr_tree = build (PLUS_EXPR, TREE_TYPE (base_field),
- base_field, addend);
-
- addr = expand_expr (addr_tree, NULL_RTX, Pmode, EXPAND_NORMAL);
- addr = copy_to_reg (addr);
-
- t = build (MODIFY_EXPR, TREE_TYPE (offset_field), offset_field,
- build (PLUS_EXPR, TREE_TYPE (offset_field),
- offset_field, rounded_size));
- TREE_SIDE_EFFECTS (t) = 1;
- expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
-
- if (indirect)
- {
- addr = force_reg (Pmode, addr);
- addr = gen_rtx_MEM (Pmode, addr);
- }
-
- return addr;
-}
-
static tree
alpha_gimplify_va_arg_1 (tree type, tree base, tree offset,
tree *pre_p, tree *post_p)
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index d59797c..8cc22ca 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -1687,8 +1687,7 @@ do { \
alpha_va_start (valist, nextarg)
/* Implement `va_arg'. */
-#define EXPAND_BUILTIN_VA_ARG(valist, type) \
- alpha_va_arg (valist, type)
+#define EXPAND_BUILTIN_VA_ARG(valist, type) (abort (), NULL_RTX)
/* Tell collect that the object format is ECOFF. */
#define OBJECT_FORMAT_COFF