+2006-03-29 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * config.gcc (s390-*-linux-*, s390x-*-linux*): Add t-dfprules to
+ tmake_file.
+ * config/s390/s390.c (S390_scalar_mode_supported_p): New function.
+ (NR_C_MODES): Add TDmode, DDmode and SDmode.
+ (s390_output_pool_entry, ): Accept MODE_DECIMAL_FLOAT.
+ (s390_hard_regno_mode_ok): Disallow TDmode in integer regs.
+ (s390_function_arg_float): Allow SDmode and DDmode values to be
+ passed in floating point registers.
+ (s390_function_arg_integer, s390_function_value): Replace MODE_FLOAT
+ check with SCALAR_FLOAT_MODE_P.
+ (TARGET_SCALAR_MODE_SUPPORTED_P): Define target macro.
+
2006-03-28 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/25985
#define REGNO_PAIR_OK(REGNO, MODE) \
(HARD_REGNO_NREGS ((REGNO), (MODE)) == 1 || !((REGNO) & 1))
+/* Return true if the back end supports mode MODE. */
+static bool
+s390_scalar_mode_supported_p (enum machine_mode mode)
+{
+ if (DECIMAL_FLOAT_MODE_P (mode))
+ return true;
+ else
+ return default_scalar_mode_supported_p (mode);
+}
+
/* Set the has_landing_pad_p flag in struct machine_function to VALUE. */
void
/* We keep a list of constants which we have to add to internal
constant tables in the middle of large functions. */
-#define NR_C_MODES 8
+#define NR_C_MODES 11
enum machine_mode constant_modes[NR_C_MODES] =
{
- TFmode, TImode,
- DFmode, DImode,
- SFmode, SImode,
+ TFmode, TImode, TDmode,
+ DFmode, DImode, DDmode,
+ SFmode, SImode, SDmode,
HImode,
QImode
};
switch (GET_MODE_CLASS (mode))
{
case MODE_FLOAT:
+ case MODE_DECIMAL_FLOAT:
gcc_assert (GET_CODE (exp) == CONST_DOUBLE);
REAL_VALUE_FROM_CONST_DOUBLE (r, exp);
if (REGNO_PAIR_OK (regno, mode))
{
if (TARGET_64BIT
- || (mode != TFmode && mode != TCmode))
+ || (mode != TFmode && mode != TCmode && mode != TDmode))
return true;
}
break;
/* No type info available for some library calls ... */
if (!type)
- return mode == SFmode || mode == DFmode;
+ return mode == SFmode || mode == DFmode || mode == SDmode || mode == DDmode;
/* The ABI says that record types with a single member are treated
just like that member would be. */
/* No type info available for some library calls ... */
if (!type)
return GET_MODE_CLASS (mode) == MODE_INT
- || (TARGET_SOFT_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT);
+ || (TARGET_SOFT_FLOAT && SCALAR_FLOAT_MODE_P (mode));
/* We accept small integral (and similar) types. */
if (INTEGRAL_TYPE_P (type)
mode = promote_mode (type, TYPE_MODE (type), &unsignedp, 1);
}
- gcc_assert (GET_MODE_CLASS (mode) == MODE_INT
- || GET_MODE_CLASS (mode) == MODE_FLOAT);
+ gcc_assert (GET_MODE_CLASS (mode) == MODE_INT || SCALAR_FLOAT_MODE_P (mode));
gcc_assert (GET_MODE_SIZE (mode) <= 8);
- if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT)
+ if (TARGET_HARD_FLOAT && SCALAR_FLOAT_MODE_P (mode))
return gen_rtx_REG (mode, 16);
else
return gen_rtx_REG (mode, 2);
#define TARGET_MANGLE_FUNDAMENTAL_TYPE s390_mangle_fundamental_type
#endif
+#undef TARGET_SCALAR_MODE_SUPPORTED_P
+#define TARGET_SCALAR_MODE_SUPPORTED_P s390_scalar_mode_supported_p
+
struct gcc_target targetm = TARGET_INITIALIZER;
#include "gt-s390.h"