c4x.c (c4x_init_builtins): Remove builtin support for 'abs', 'labs', and 'fabs'.

* config/c4x/c4x.c (c4x_init_builtins): Remove builtin support
	for 'abs', 'labs', and 'fabs'.
	(c4x_expand_builtin): Likewise.
	* config/c4x/c4x.h (enum c4x_builtins): Likewise.

From-SVN: r38702
This commit is contained in:
Michael Hayes 2001-01-05 03:58:12 +00:00 committed by Michael Hayes
parent 99e87c1003
commit 06dd70c652
3 changed files with 11 additions and 50 deletions

View File

@ -1,3 +1,10 @@
2001-01-05 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* config/c4x/c4x.c (c4x_init_builtins): Remove builtin support
for 'abs', 'labs', and 'fabs'.
(c4x_expand_builtin): Likewise.
* config/c4x/c4x.h (enum c4x_builtins): Likewise.
2001-01-05 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (prget, prset): New insn types.

View File

@ -829,11 +829,11 @@ c4x_expand_prologue ()
/* FIXME: Assume ISR doesn't require more than 32767 words
of local variables. */
if (size > 32767)
error ("ISR %s requires %d words of local variables, "
"maximum is 32767.", current_function_name, size);
error ("ISR %s requires %d words of local vars, max is 32767.",
current_function_name, size);
insn = emit_insn (gen_addqi3 (gen_rtx_REG (QImode, SP_REGNO),
gen_rtx_REG (QImode, SP_REGNO),
GEN_INT(size)));
GEN_INT (size)));
RTX_FRAME_RELATED_P (insn) = 1;
}
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
@ -4867,22 +4867,6 @@ void
c4x_init_builtins (endlink)
tree endlink;
{
builtin_function ("abs",
build_function_type
(integer_type_node,
tree_cons (NULL_TREE, integer_type_node, endlink)),
C4X_BUILTIN_ABS, BUILT_IN_MD, NULL_PTR);
builtin_function ("fabs",
build_function_type
(double_type_node,
tree_cons (NULL_TREE, double_type_node, endlink)),
C4X_BUILTIN_FABS, BUILT_IN_MD, NULL_PTR);
builtin_function ("labs",
build_function_type
(long_integer_type_node,
tree_cons (NULL_TREE, long_integer_type_node, endlink)),
C4X_BUILTIN_LABS, BUILT_IN_MD, NULL_PTR);
builtin_function ("fast_ftoi",
build_function_type
(integer_type_node,
@ -4938,33 +4922,6 @@ c4x_expand_builtin (exp, target, subtarget, mode, ignore)
switch (fcode)
{
case C4X_BUILTIN_ABS:
arg0 = TREE_VALUE (arglist);
r0 = expand_expr (arg0, NULL_RTX, QImode, 0);
r0 = protect_from_queue (r0, 0);
if (! target || ! register_operand (target, QImode))
target = gen_reg_rtx (QImode);
emit_insn (gen_absqi2 (target, r0));
return target;
case C4X_BUILTIN_FABS:
arg0 = TREE_VALUE (arglist);
r0 = expand_expr (arg0, NULL_RTX, QFmode, 0);
r0 = protect_from_queue (r0, 0);
if (! target || ! register_operand (target, QFmode))
target = gen_reg_rtx (QFmode);
emit_insn (gen_absqf2 (target, r0));
return target;
case C4X_BUILTIN_LABS:
arg0 = TREE_VALUE (arglist);
r0 = expand_expr (arg0, NULL_RTX, QImode, 0);
r0 = protect_from_queue (r0, 0);
if (! target || ! register_operand (target, QImode))
target = gen_reg_rtx (QImode);
emit_insn (gen_absqi2 (target, r0));
return target;
case C4X_BUILTIN_FIX:
arg0 = TREE_VALUE (arglist);
r0 = expand_expr (arg0, NULL_RTX, QFmode, 0);

View File

@ -2711,9 +2711,6 @@ if (final_sequence != NULL_RTX) \
enum c4x_builtins
{
/* intrinsic name */
C4X_BUILTIN_ABS, /* abs */
C4X_BUILTIN_FABS, /* fabs */
C4X_BUILTIN_LABS, /* labs */
C4X_BUILTIN_FIX, /* fast_ftoi */
C4X_BUILTIN_FIX_ANSI, /* ansi_ftoi */
C4X_BUILTIN_MPYI, /* fast_imult (only C3x) */