summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/rs6000.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/rs6000/rs6000.c')
-rw-r--r--gcc/config/rs6000/rs6000.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 408661c1dbc..7b7896001b4 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -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. */
int
@@ -614,7 +632,7 @@ num_insns_constant (op, mode)
rtx op;
enum machine_mode mode;
{
- if (mode != SImode && mode != DImode)
+ if (mode != SImode && mode != DImode && mode != SFmode && mode != DFmode)
abort ();
if (GET_CODE (op) == CONST_INT)