t-mmix (TARGET_LIBGCC2_CFLAGS): Don't -Dinhibit_libc here.

* config/mmix/t-mmix (TARGET_LIBGCC2_CFLAGS): Don't -Dinhibit_libc
	here.

	* config/mmix/mmix.h (INITIAL_ELIMINATION_OFFSET): Remove spurious
	semicolon.

	* config/mmix/mmix.c (mmix_expand_builtin_va_arg): Variable-size
	types come in by-reference.  Fix typo in comment.

From-SVN: r51946
This commit is contained in:
Hans-Peter Nilsson 2002-04-06 08:20:35 +00:00 committed by Hans-Peter Nilsson
parent 36e408e6ca
commit 392fc5b068
4 changed files with 45 additions and 26 deletions

View File

@ -1,3 +1,14 @@
2002-04-06 Hans-Peter Nilsson <hp@bitrange.com>
* config/mmix/t-mmix (TARGET_LIBGCC2_CFLAGS): Don't -Dinhibit_libc
here.
* config/mmix/mmix.h (INITIAL_ELIMINATION_OFFSET): Remove spurious
semicolon.
* config/mmix/mmix.c (mmix_expand_builtin_va_arg): Variable-size
types come in by-reference. Fix typo in comment.
2002-04-05 David S. Miller <davem@redhat.com> 2002-04-05 David S. Miller <davem@redhat.com>
* config/sparc/freebsd.h (ENDFILE_SPEC): Add crtfastmath bits. * config/sparc/freebsd.h (ENDFILE_SPEC): Add crtfastmath bits.

View File

@ -1273,7 +1273,7 @@ mmix_expand_builtin_va_arg (valist, type)
if (type == error_mark_node if (type == error_mark_node
|| (type_size = TYPE_SIZE_UNIT (TYPE_MAIN_VARIANT (type))) == NULL || (type_size = TYPE_SIZE_UNIT (TYPE_MAIN_VARIANT (type))) == NULL
|| TREE_OVERFLOW (type_size)) || TREE_OVERFLOW (type_size))
/* Presumable an error; the size isn't computable. A message has /* Presumably an error; the size isn't computable. A message has
supposedly been emitted elsewhere. */ supposedly been emitted elsewhere. */
rounded_size = size_zero_node; rounded_size = size_zero_node;
else else
@ -1302,30 +1302,38 @@ mmix_expand_builtin_va_arg (valist, type)
} }
else if (!integer_zerop (rounded_size)) else if (!integer_zerop (rounded_size))
{ {
/* If the size is less than a register, the we need to pad the if (!really_constant_p (type_size))
address by adding the difference. */ /* Varying-size types come in by reference. */
tree addend addr_tree
= fold (build (COND_EXPR, sizetype, = build1 (INDIRECT_REF, build_pointer_type (type), addr_tree);
fold (build (GT_EXPR, sizetype, else
rounded_size, {
align)), /* If the size is less than a register, then we need to pad the
size_zero_node, address by adding the difference. */
fold (build (MINUS_EXPR, sizetype, tree addend
rounded_size, = fold (build (COND_EXPR, sizetype,
type_size)))); fold (build (GT_EXPR, sizetype,
tree addr_tree1 rounded_size,
= fold (build (PLUS_EXPR, TREE_TYPE (addr_tree), addr_tree, addend)); align)),
size_zero_node,
fold (build (MINUS_EXPR, sizetype,
rounded_size,
type_size))));
tree addr_tree1
= fold (build (PLUS_EXPR, TREE_TYPE (addr_tree), addr_tree,
addend));
/* If this type is larger than what fits in a register, then it is /* If this type is larger than what fits in a register, then it
passed by reference. */ is passed by reference. */
addr_tree addr_tree
= fold (build (COND_EXPR, TREE_TYPE (addr_tree1), = fold (build (COND_EXPR, TREE_TYPE (addr_tree1),
fold (build (GT_EXPR, sizetype, fold (build (GT_EXPR, sizetype,
rounded_size, rounded_size,
ptr_size)), ptr_size)),
build1 (INDIRECT_REF, build_pointer_type (type), build1 (INDIRECT_REF, build_pointer_type (type),
addr_tree1), addr_tree1),
addr_tree1)); addr_tree1));
}
} }
addr = expand_expr (addr_tree, NULL_RTX, Pmode, EXPAND_NORMAL); addr = expand_expr (addr_tree, NULL_RTX, Pmode, EXPAND_NORMAL);

View File

@ -695,7 +695,7 @@ enum reg_class
#define CAN_ELIMINATE(FROM, TO) 1 #define CAN_ELIMINATE(FROM, TO) 1
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
(OFFSET) = mmix_initial_elimination_offset (FROM, TO); (OFFSET) = mmix_initial_elimination_offset (FROM, TO)
/* Node: Stack Arguments */ /* Node: Stack Arguments */

View File

@ -6,7 +6,7 @@ LIBGCC1 =
LIBGCC1_TEST = LIBGCC1_TEST =
CROSS_LIBGCC1 = CROSS_LIBGCC1 =
TARGET_LIBGCC2_CFLAGS = -mlibfuncs -Dinhibit_libc -O2 TARGET_LIBGCC2_CFLAGS = -mlibfuncs -O2
EXTRA_MULTILIB_PARTS = crti.o crtn.o crtbegin.o crtend.o EXTRA_MULTILIB_PARTS = crti.o crtn.o crtbegin.o crtend.o