diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-01-23 21:29:04 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-01-23 21:29:04 +0000 |
commit | c19d76a299b8d48c258f168bd74bc6bb63ad7573 (patch) | |
tree | 9d2ced8a1f6a1b20f2bd2ae3174dd8b04445d668 /gnu/usr.bin/gcc | |
parent | 0f7a984c82c04d9f733d489483517b5fbc1c1707 (diff) |
m88k_expand_prologue(): add a REG_MAYBE_DEAD note to the insns loading the
PIC base register, it case it turns out to not be necessary. This should not
be needed because this sequence is only generated if
current_function_uses_pic_offset_table is set, but it can't hurt to expect the
worse (from rs6000).
legitimize_address(): do not coerce the address using (unspec:SI gen_rtvec() ),
but rather use it unmodified, in the -fPIC case. This lets libstdc++.so build
(and probably anything else being compiled with -fPIC rather than -fpic).
Diffstat (limited to 'gnu/usr.bin/gcc')
-rw-r--r-- | gnu/usr.bin/gcc/gcc/config/m88k/m88k.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c index 622f8c1fdd7..d5cc50b66e8 100644 --- a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c +++ b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c @@ -61,6 +61,7 @@ rtx m88k_compare_op1; /* cmpsi operand 1 */ enum processor_type m88k_cpu; /* target cpu */ static void m88k_frame_related PARAMS ((rtx, rtx, int)); +static void m88k_maybe_dead PARAMS ((rtx)); static void m88k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static int m88k_adjust_cost PARAMS ((rtx, rtx, rtx, int)); @@ -335,17 +336,11 @@ legitimize_address (pic, orig, reg, scratch) emit_insn (gen_rtx_SET (VOIDmode, temp, - gen_rtx_HIGH (SImode, - gen_rtx_UNSPEC (SImode, - gen_rtvec (1, addr), - 0)))); + gen_rtx_HIGH (SImode, addr))); emit_insn (gen_rtx_SET (VOIDmode, temp, - gen_rtx_LO_SUM (SImode, temp, - gen_rtx_UNSPEC (SImode, - gen_rtvec (1, addr), - 0)))); + gen_rtx_LO_SUM (SImode, temp, addr))); addr = temp; } @@ -1840,6 +1835,15 @@ m88k_frame_related (insn, reg, val) REG_NOTES (insn)); } +static void +m88k_maybe_dead (insn) + rtx insn; +{ + REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, + const0_rtx, + REG_NOTES (insn)); +} + void m88k_expand_prologue () { @@ -1890,10 +1894,11 @@ m88k_expand_prologue () } #endif - emit_insn (gen_locate1 (pic_offset_table_rtx, label)); - emit_insn (gen_locate2 (pic_offset_table_rtx, label)); - emit_insn (gen_addsi3 (pic_offset_table_rtx, - pic_offset_table_rtx, return_reg)); + m88k_maybe_dead (emit_insn (gen_locate1 (pic_offset_table_rtx, label))); + m88k_maybe_dead (emit_insn (gen_locate2 (pic_offset_table_rtx, label))); + m88k_maybe_dead (emit_insn (gen_addsi3 (pic_offset_table_rtx, + pic_offset_table_rtx, + return_reg))); #if 0 if (save_r1) |