optabs.c: Use SCALAR_FLOAT_MODE_P instead of explicitly testing GET_MODE_CLASS (x) ==...
* optabs.c: Use SCALAR_FLOAT_MODE_P instead of explicitly testing GET_MODE_CLASS (x) == MODE_FLOAT. * config/i386/i386.c: Likewise. * config/rs6000/xcoff.h: Likewise. * config/rs6000/linux64.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rs6000/rs6000.h: Likewise. * config/rs6000/predicates.md: Likewise. * config/rs6000/sysv4.h: Likewise. From-SVN: r107348
This commit is contained in:
parent
3d119f8fec
commit
ebb109add8
9 changed files with 37 additions and 25 deletions
|
@ -1,3 +1,15 @@
|
|||
2005-11-22 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* optabs.c: Use SCALAR_FLOAT_MODE_P instead of explicitly testing
|
||||
GET_MODE_CLASS (x) == MODE_FLOAT.
|
||||
* config/i386/i386.c: Likewise.
|
||||
* config/rs6000/xcoff.h: Likewise.
|
||||
* config/rs6000/linux64.h: Likewise.
|
||||
* config/rs6000/rs6000.c: Likewise.
|
||||
* config/rs6000/rs6000.h: Likewise.
|
||||
* config/rs6000/predicates.md: Likewise.
|
||||
* config/rs6000/sysv4.h: Likewise.
|
||||
|
||||
2005-11-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* c-cppbuiltin.c (c_cpp_builtins): Define __pic__ and __PIC__ when
|
||||
|
|
|
@ -3615,7 +3615,7 @@ ix86_value_regno (enum machine_mode mode, tree func, tree fntype)
|
|||
return FIRST_SSE_REG;
|
||||
|
||||
/* Most things go in %eax, except (unless -mno-fp-ret-in-387) fp values. */
|
||||
if (GET_MODE_CLASS (mode) != MODE_FLOAT || !TARGET_FLOAT_RETURNS_IN_80387)
|
||||
if (!SCALAR_FLOAT_MODE_P (mode) || !TARGET_FLOAT_RETURNS_IN_80387)
|
||||
return 0;
|
||||
|
||||
/* Floating point return values in %st(0), except for local functions when
|
||||
|
@ -9103,7 +9103,7 @@ ix86_fp_compare_mode (enum rtx_code code ATTRIBUTE_UNUSED)
|
|||
enum machine_mode
|
||||
ix86_cc_mode (enum rtx_code code, rtx op0, rtx op1)
|
||||
{
|
||||
if (GET_MODE_CLASS (GET_MODE (op0)) == MODE_FLOAT)
|
||||
if (SCALAR_FLOAT_MODE_P (GET_MODE (op0)))
|
||||
return ix86_fp_compare_mode (code);
|
||||
switch (code)
|
||||
{
|
||||
|
@ -9684,7 +9684,7 @@ ix86_expand_compare (enum rtx_code code, rtx *second_test, rtx *bypass_test)
|
|||
ret = gen_rtx_fmt_ee (code, VOIDmode, ix86_compare_emitted, const0_rtx);
|
||||
ix86_compare_emitted = NULL_RTX;
|
||||
}
|
||||
else if (GET_MODE_CLASS (GET_MODE (op0)) == MODE_FLOAT)
|
||||
else if (SCALAR_FLOAT_MODE_P (GET_MODE (op0)))
|
||||
ret = ix86_expand_fp_compare (code, op0, op1, NULL_RTX,
|
||||
second_test, bypass_test);
|
||||
else
|
||||
|
|
|
@ -457,12 +457,12 @@ extern int dot_symbols;
|
|||
&& ((TARGET_64BIT \
|
||||
&& (TARGET_POWERPC64 \
|
||||
|| TARGET_MINIMAL_TOC \
|
||||
|| (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
|
||||
|| (SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
|
||||
&& ! TARGET_NO_FP_IN_TOC))) \
|
||||
|| (!TARGET_64BIT \
|
||||
&& !TARGET_NO_FP_IN_TOC \
|
||||
&& !TARGET_RELOCATABLE \
|
||||
&& GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
|
||||
&& SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
|
||||
&& BITS_PER_WORD == HOST_BITS_PER_INT)))))
|
||||
|
||||
/* This ABI cannot use DBX_LINES_FUNCTION_RELATIVE, nor can it use
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
REAL_VALUE_TYPE rv;
|
||||
|
||||
if (GET_MODE (op) != mode
|
||||
|| (GET_MODE_CLASS (mode) != MODE_FLOAT && mode != DImode))
|
||||
|| (!SCALAR_FLOAT_MODE_P (mode) && mode != DImode))
|
||||
return 0;
|
||||
|
||||
/* Consider all constants with -msoft-float to be easy. */
|
||||
|
@ -330,7 +330,7 @@
|
|||
;; or non-special register register field no cr0
|
||||
(define_predicate "zero_fp_constant"
|
||||
(and (match_code "const_double")
|
||||
(match_test "GET_MODE_CLASS (mode) == MODE_FLOAT
|
||||
(match_test "SCALAR_FLOAT_MODE_P (mode)
|
||||
&& op == CONST0_RTX (mode)")))
|
||||
|
||||
;; Return 1 if the operand is in volatile memory. Note that during the
|
||||
|
@ -707,7 +707,7 @@
|
|||
return 1;
|
||||
|
||||
/* For floating-point, easy constants are valid. */
|
||||
if (GET_MODE_CLASS (mode) == MODE_FLOAT
|
||||
if (SCALAR_FLOAT_MODE_P (mode)
|
||||
&& CONSTANT_P (op)
|
||||
&& easy_fp_constant (op, mode))
|
||||
return 1;
|
||||
|
@ -725,7 +725,7 @@
|
|||
|
||||
/* For floating-point or multi-word mode, the only remaining valid type
|
||||
is a register. */
|
||||
if (GET_MODE_CLASS (mode) == MODE_FLOAT
|
||||
if (SCALAR_FLOAT_MODE_P (mode)
|
||||
|| GET_MODE_SIZE (mode) > UNITS_PER_WORD)
|
||||
return register_operand (op, mode);
|
||||
|
||||
|
|
|
@ -1028,7 +1028,7 @@ rs6000_hard_regno_mode_ok (int regno, enum machine_mode mode)
|
|||
/* The float registers can only hold floating modes and DImode. */
|
||||
if (FP_REGNO_P (regno))
|
||||
return
|
||||
(GET_MODE_CLASS (mode) == MODE_FLOAT
|
||||
(SCALAR_FLOAT_MODE_P (mode)
|
||||
&& FP_REGNO_P (regno + HARD_REGNO_NREGS (regno, mode) - 1))
|
||||
|| (GET_MODE_CLASS (mode) == MODE_INT
|
||||
&& GET_MODE_SIZE (mode) == UNITS_PER_FP_WORD);
|
||||
|
@ -4126,7 +4126,7 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
|
|||
|
||||
/* Nonzero if we can use a floating-point register to pass this arg. */
|
||||
#define USE_FP_FOR_ARG_P(CUM,MODE,TYPE) \
|
||||
(GET_MODE_CLASS (MODE) == MODE_FLOAT \
|
||||
(SCALAR_FLOAT_MODE_P (MODE) \
|
||||
&& (CUM)->fregno <= FP_ARG_MAX_REG \
|
||||
&& TARGET_HARD_FLOAT && TARGET_FPRS)
|
||||
|
||||
|
@ -4650,7 +4650,7 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
|
|||
|
||||
cum->words = align_words + n_words;
|
||||
|
||||
if (GET_MODE_CLASS (mode) == MODE_FLOAT
|
||||
if (SCALAR_FLOAT_MODE_P (mode)
|
||||
&& TARGET_HARD_FLOAT && TARGET_FPRS)
|
||||
cum->fregno += (GET_MODE_SIZE (mode) + 7) >> 3;
|
||||
|
||||
|
@ -11698,7 +11698,7 @@ rs6000_emit_cmove (rtx dest, rtx op, rtx true_cond, rtx false_cond)
|
|||
return 0;
|
||||
}
|
||||
else if (TARGET_E500 && TARGET_HARD_FLOAT && !TARGET_FPRS
|
||||
&& GET_MODE_CLASS (compare_mode) == MODE_FLOAT)
|
||||
&& SCALAR_FLOAT_MODE_P (compare_mode))
|
||||
return 0;
|
||||
|
||||
is_against_zero = op1 == CONST0_RTX (compare_mode);
|
||||
|
@ -11708,7 +11708,7 @@ rs6000_emit_cmove (rtx dest, rtx op, rtx true_cond, rtx false_cond)
|
|||
can't be generated if we care about that. It's safe if one side
|
||||
of the construct is zero, since then no subtract will be
|
||||
generated. */
|
||||
if (GET_MODE_CLASS (compare_mode) == MODE_FLOAT
|
||||
if (SCALAR_FLOAT_MODE_P (compare_mode)
|
||||
&& flag_trapping_math && ! is_against_zero)
|
||||
return 0;
|
||||
|
||||
|
@ -15249,7 +15249,7 @@ rs6000_output_function_epilogue (FILE *file,
|
|||
|
||||
if (GET_CODE (parameter) == REG)
|
||||
{
|
||||
if (GET_MODE_CLASS (mode) == MODE_FLOAT)
|
||||
if (SCALAR_FLOAT_MODE_P (mode))
|
||||
{
|
||||
int bits;
|
||||
|
||||
|
@ -18909,7 +18909,7 @@ rs6000_libcall_value (enum machine_mode mode)
|
|||
GEN_INT (4))));
|
||||
}
|
||||
|
||||
if (GET_MODE_CLASS (mode) == MODE_FLOAT
|
||||
if (SCALAR_FLOAT_MODE_P (mode)
|
||||
&& TARGET_HARD_FLOAT && TARGET_FPRS)
|
||||
regno = FP_ARG_RETURN;
|
||||
else if (ALTIVEC_VECTOR_MODE (mode)
|
||||
|
|
|
@ -814,10 +814,10 @@ extern enum rs6000_nop_insertion rs6000_sched_insert_nops;
|
|||
If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
|
||||
for any hard reg, then this must be 0 for correct output. */
|
||||
#define MODES_TIEABLE_P(MODE1, MODE2) \
|
||||
(GET_MODE_CLASS (MODE1) == MODE_FLOAT \
|
||||
? GET_MODE_CLASS (MODE2) == MODE_FLOAT \
|
||||
: GET_MODE_CLASS (MODE2) == MODE_FLOAT \
|
||||
? GET_MODE_CLASS (MODE1) == MODE_FLOAT \
|
||||
(SCALAR_FLOAT_MODE_P (MODE1) \
|
||||
? SCALAR_FLOAT_MODE_P (MODE2) \
|
||||
: SCALAR_FLOAT_MODE_P (MODE2) \
|
||||
? SCALAR_FLOAT_MODE_P (MODE1) \
|
||||
: GET_MODE_CLASS (MODE1) == MODE_CC \
|
||||
? GET_MODE_CLASS (MODE2) == MODE_CC \
|
||||
: GET_MODE_CLASS (MODE2) == MODE_CC \
|
||||
|
@ -1951,7 +1951,7 @@ do { \
|
|||
comparison. CCmode should be used in all other cases. */
|
||||
|
||||
#define SELECT_CC_MODE(OP,X,Y) \
|
||||
(GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT ? CCFPmode \
|
||||
(SCALAR_FLOAT_MODE_P (GET_MODE (X)) ? CCFPmode \
|
||||
: (OP) == GTU || (OP) == LTU || (OP) == GEU || (OP) == LEU ? CCUNSmode \
|
||||
: (((OP) == EQ || (OP) == NE) && COMPARISON_P (X) \
|
||||
? CCEQmode : CCmode))
|
||||
|
|
|
@ -508,7 +508,7 @@ fini_section (void) \
|
|||
|| (!TARGET_NO_FP_IN_TOC \
|
||||
&& !TARGET_RELOCATABLE \
|
||||
&& GET_CODE (X) == CONST_DOUBLE \
|
||||
&& GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
|
||||
&& SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
|
||||
&& BITS_PER_WORD == HOST_BITS_PER_INT)))
|
||||
|
||||
/* These macros generate the special .type and .size directives which
|
||||
|
|
|
@ -164,7 +164,7 @@ toc_section (void) \
|
|||
|| (GET_CODE (X) == CONST_DOUBLE \
|
||||
&& (TARGET_POWERPC64 \
|
||||
|| TARGET_MINIMAL_TOC \
|
||||
|| (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
|
||||
|| (SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
|
||||
&& ! TARGET_NO_FP_IN_TOC)))))
|
||||
|
||||
#define TARGET_ASM_GLOBALIZE_LABEL rs6000_xcoff_asm_globalize_label
|
||||
|
|
|
@ -2489,7 +2489,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
|
|||
if (unoptab->code == NEG)
|
||||
{
|
||||
/* Try negating floating point values by flipping the sign bit. */
|
||||
if (class == MODE_FLOAT)
|
||||
if (SCALAR_FLOAT_MODE_P (class))
|
||||
{
|
||||
temp = expand_absneg_bit (NEG, mode, op0, target);
|
||||
if (temp)
|
||||
|
@ -3552,7 +3552,7 @@ prepare_cmp_insn (rtx *px, rtx *py, enum rtx_code *pcomparison, rtx size,
|
|||
return;
|
||||
}
|
||||
|
||||
gcc_assert (class == MODE_FLOAT);
|
||||
gcc_assert (SCALAR_FLOAT_MODE_P (class));
|
||||
prepare_float_lib_cmp (px, py, pcomparison, pmode, punsignedp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue