config.gcc (s390-*-linux-*, [...]): Add t-dfprules to tmake_file.
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. From-SVN: r112491
This commit is contained in:
parent
f08ac361ee
commit
4dc19cc052
@ -1,3 +1,17 @@
|
|||||||
|
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>
|
2006-03-28 Zdenek Dvorak <dvorakz@suse.cz>
|
||||||
|
|
||||||
PR tree-optimization/25985
|
PR tree-optimization/25985
|
||||||
|
@ -1887,7 +1887,7 @@ rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
|
|||||||
;;
|
;;
|
||||||
s390-*-linux*)
|
s390-*-linux*)
|
||||||
tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
|
tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
|
||||||
tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux"
|
tmake_file="${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux"
|
||||||
;;
|
;;
|
||||||
s390x-*-linux*)
|
s390x-*-linux*)
|
||||||
tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
|
tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
|
||||||
@ -1895,7 +1895,7 @@ s390x-*-linux*)
|
|||||||
md_file=s390/s390.md
|
md_file=s390/s390.md
|
||||||
extra_modes=s390/s390-modes.def
|
extra_modes=s390/s390-modes.def
|
||||||
out_file=s390/s390.c
|
out_file=s390/s390.c
|
||||||
tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux s390/t-linux64"
|
tmake_file="${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux s390/t-linux64"
|
||||||
;;
|
;;
|
||||||
s390x-ibm-tpf*)
|
s390x-ibm-tpf*)
|
||||||
tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h s390/tpf.h"
|
tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h s390/tpf.h"
|
||||||
|
@ -334,6 +334,16 @@ struct machine_function GTY(())
|
|||||||
#define REGNO_PAIR_OK(REGNO, MODE) \
|
#define REGNO_PAIR_OK(REGNO, MODE) \
|
||||||
(HARD_REGNO_NREGS ((REGNO), (MODE)) == 1 || !((REGNO) & 1))
|
(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. */
|
/* Set the has_landing_pad_p flag in struct machine_function to VALUE. */
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -5259,12 +5269,12 @@ replace_ltrel_base (rtx *x)
|
|||||||
/* We keep a list of constants which we have to add to internal
|
/* We keep a list of constants which we have to add to internal
|
||||||
constant tables in the middle of large functions. */
|
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] =
|
enum machine_mode constant_modes[NR_C_MODES] =
|
||||||
{
|
{
|
||||||
TFmode, TImode,
|
TFmode, TImode, TDmode,
|
||||||
DFmode, DImode,
|
DFmode, DImode, DDmode,
|
||||||
SFmode, SImode,
|
SFmode, SImode, SDmode,
|
||||||
HImode,
|
HImode,
|
||||||
QImode
|
QImode
|
||||||
};
|
};
|
||||||
@ -6207,6 +6217,7 @@ s390_output_pool_entry (rtx exp, enum machine_mode mode, unsigned int align)
|
|||||||
switch (GET_MODE_CLASS (mode))
|
switch (GET_MODE_CLASS (mode))
|
||||||
{
|
{
|
||||||
case MODE_FLOAT:
|
case MODE_FLOAT:
|
||||||
|
case MODE_DECIMAL_FLOAT:
|
||||||
gcc_assert (GET_CODE (exp) == CONST_DOUBLE);
|
gcc_assert (GET_CODE (exp) == CONST_DOUBLE);
|
||||||
|
|
||||||
REAL_VALUE_FROM_CONST_DOUBLE (r, exp);
|
REAL_VALUE_FROM_CONST_DOUBLE (r, exp);
|
||||||
@ -6782,7 +6793,7 @@ s390_hard_regno_mode_ok (unsigned int regno, enum machine_mode mode)
|
|||||||
if (REGNO_PAIR_OK (regno, mode))
|
if (REGNO_PAIR_OK (regno, mode))
|
||||||
{
|
{
|
||||||
if (TARGET_64BIT
|
if (TARGET_64BIT
|
||||||
|| (mode != TFmode && mode != TCmode))
|
|| (mode != TFmode && mode != TCmode && mode != TDmode))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -7601,7 +7612,7 @@ s390_function_arg_float (enum machine_mode mode, tree type)
|
|||||||
|
|
||||||
/* No type info available for some library calls ... */
|
/* No type info available for some library calls ... */
|
||||||
if (!type)
|
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
|
/* The ABI says that record types with a single member are treated
|
||||||
just like that member would be. */
|
just like that member would be. */
|
||||||
@ -7643,7 +7654,7 @@ s390_function_arg_integer (enum machine_mode mode, tree type)
|
|||||||
/* No type info available for some library calls ... */
|
/* No type info available for some library calls ... */
|
||||||
if (!type)
|
if (!type)
|
||||||
return GET_MODE_CLASS (mode) == MODE_INT
|
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. */
|
/* We accept small integral (and similar) types. */
|
||||||
if (INTEGRAL_TYPE_P (type)
|
if (INTEGRAL_TYPE_P (type)
|
||||||
@ -7805,11 +7816,10 @@ s390_function_value (tree type, enum machine_mode mode)
|
|||||||
mode = promote_mode (type, TYPE_MODE (type), &unsignedp, 1);
|
mode = promote_mode (type, TYPE_MODE (type), &unsignedp, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
gcc_assert (GET_MODE_CLASS (mode) == MODE_INT
|
gcc_assert (GET_MODE_CLASS (mode) == MODE_INT || SCALAR_FLOAT_MODE_P (mode));
|
||||||
|| GET_MODE_CLASS (mode) == MODE_FLOAT);
|
|
||||||
gcc_assert (GET_MODE_SIZE (mode) <= 8);
|
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);
|
return gen_rtx_REG (mode, 16);
|
||||||
else
|
else
|
||||||
return gen_rtx_REG (mode, 2);
|
return gen_rtx_REG (mode, 2);
|
||||||
@ -9303,6 +9313,9 @@ s390_reorg (void)
|
|||||||
#define TARGET_MANGLE_FUNDAMENTAL_TYPE s390_mangle_fundamental_type
|
#define TARGET_MANGLE_FUNDAMENTAL_TYPE s390_mangle_fundamental_type
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#undef TARGET_SCALAR_MODE_SUPPORTED_P
|
||||||
|
#define TARGET_SCALAR_MODE_SUPPORTED_P s390_scalar_mode_supported_p
|
||||||
|
|
||||||
struct gcc_target targetm = TARGET_INITIALIZER;
|
struct gcc_target targetm = TARGET_INITIALIZER;
|
||||||
|
|
||||||
#include "gt-s390.h"
|
#include "gt-s390.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user