Commit c4c40373 by Michael Meissner

Use integer ops to load SF constants for software floating point; fix up…

Use integer ops to load SF constants for software floating point; fix up software floating constants in general

From-SVN: r12421
parent a7273471
...@@ -373,6 +373,24 @@ rs6000_immed_double_const (i0, i1, mode) ...@@ -373,6 +373,24 @@ rs6000_immed_double_const (i0, i1, mode)
} }
/* Return the GOT register, creating it if needed. */
struct rtx_def *
rs6000_got_register (value)
rtx value;
{
if (!pic_offset_table_rtx)
{
if (reload_in_progress || reload_completed)
fatal_insn ("internal error -- needed new GOT register during reload phase to load:", value);
pic_offset_table_rtx = gen_reg_rtx (SImode);
}
return pic_offset_table_rtx;
}
/* Return non-zero if this function is known to have a null epilogue. */ /* Return non-zero if this function is known to have a null epilogue. */
int int
...@@ -614,7 +632,7 @@ num_insns_constant (op, mode) ...@@ -614,7 +632,7 @@ num_insns_constant (op, mode)
rtx op; rtx op;
enum machine_mode mode; enum machine_mode mode;
{ {
if (mode != SImode && mode != DImode) if (mode != SImode && mode != DImode && mode != SFmode && mode != DFmode)
abort (); abort ();
if (GET_CODE (op) == CONST_INT) if (GET_CODE (op) == CONST_INT)
......
...@@ -1029,12 +1029,13 @@ enum reg_class ...@@ -1029,12 +1029,13 @@ enum reg_class
We flag for special constants when we can copy the constant into We flag for special constants when we can copy the constant into
a general register in two insns for DF/DI and one insn for SF. a general register in two insns for DF/DI and one insn for SF.
'H' is used for DI constants that take 3 insns. */ 'H' is used for DI/DF constants that take 3 insns. */
#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
((C) == 'G' ? easy_fp_constant (VALUE, GET_MODE (VALUE)) : \ ( (C) == 'G' ? (num_insns_constant (VALUE, GET_MODE (VALUE)) \
(C) == 'H' ? (num_insns_constant (VALUE, DImode) == 3) : \ == ((GET_MODE (VALUE) == SFmode) ? 1 : 2)) \
0) : (C) == 'H' ? (num_insns_constant (VALUE, GET_MODE (VALUE)) == 3) \
: 0)
/* Optional extra constraints for this machine. /* Optional extra constraints for this machine.
...@@ -3018,6 +3019,7 @@ extern void rs6000_override_options (); ...@@ -3018,6 +3019,7 @@ extern void rs6000_override_options ();
extern void rs6000_file_start (); extern void rs6000_file_start ();
extern struct rtx_def *rs6000_float_const (); extern struct rtx_def *rs6000_float_const ();
extern struct rtx_def *rs6000_immed_double_const (); extern struct rtx_def *rs6000_immed_double_const ();
extern struct rtx_def *rs6000_got_register ();
extern int direct_return (); extern int direct_return ();
extern int any_operand (); extern int any_operand ();
extern int short_cint_operand (); extern int short_cint_operand ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment