mirror of git://gcc.gnu.org/git/gcc.git
parent
de10dbf5be
commit
b5d37c6fc2
|
@ -1,5 +1,15 @@
|
|||
2000-12-29 Bernd Schmidt <bernds@redhat.com>
|
||||
|
||||
* ia64.c (ia64_expand_load_address): Accept additional scratch
|
||||
register argument. All callers & prototype changed.
|
||||
Use scratch register when generating load_symptr insns.
|
||||
* ia64.md (movdi_symbolic): Clobber a scratch register. Use it
|
||||
when calling ia64_expand_load_address.
|
||||
(movdi): Generate movdi_symbolic with additional operand.
|
||||
(load_gprel64): Use pic_offset_table_rtx instead of (reg:DI 1).
|
||||
(load_symptr): Likewise. Use additional operand as a scratch
|
||||
register instead of generating it here.
|
||||
|
||||
* basic-block.h: Add a comment.
|
||||
* flow.c (PROP_POSTRELOAD): New macro.
|
||||
(update_life_info): Add it to prop_flags.
|
||||
|
|
|
@ -81,7 +81,7 @@ extern void ia64_function_prologue PARAMS((FILE *, int));
|
|||
extern void ia64_function_epilogue PARAMS((FILE *, int));
|
||||
|
||||
extern int ia64_direct_return PARAMS((void));
|
||||
extern void ia64_expand_load_address PARAMS((rtx, rtx));
|
||||
extern void ia64_expand_load_address PARAMS((rtx, rtx, rtx));
|
||||
extern int ia64_hard_regno_rename_ok PARAMS((int, int));
|
||||
|
||||
extern void ia64_initialize_trampoline PARAMS((rtx, rtx, rtx));
|
||||
|
|
|
@ -798,8 +798,8 @@ ia64_depz_field_mask (rop, rshift)
|
|||
/* ??? Should generalize this, so that we can also support 32 bit pointers. */
|
||||
|
||||
void
|
||||
ia64_expand_load_address (dest, src)
|
||||
rtx dest, src;
|
||||
ia64_expand_load_address (dest, src, scratch)
|
||||
rtx dest, src, scratch;
|
||||
{
|
||||
rtx temp;
|
||||
|
||||
|
@ -831,11 +831,22 @@ ia64_expand_load_address (dest, src)
|
|||
lo = ((ofs & 0x3fff) ^ 0x2000) - 0x2000;
|
||||
hi = ofs - lo;
|
||||
|
||||
emit_insn (gen_load_symptr (subtarget, plus_constant (sym, hi)));
|
||||
if (! scratch)
|
||||
scratch = no_new_pseudos ? subtarget : gen_reg_rtx (DImode);
|
||||
|
||||
emit_insn (gen_load_symptr (subtarget, plus_constant (sym, hi),
|
||||
scratch));
|
||||
emit_insn (gen_adddi3 (temp, subtarget, GEN_INT (lo)));
|
||||
}
|
||||
else
|
||||
emit_insn (gen_load_symptr (temp, src));
|
||||
{
|
||||
rtx insn;
|
||||
if (! scratch)
|
||||
scratch = no_new_pseudos ? temp : gen_reg_rtx (DImode);
|
||||
|
||||
insn = emit_insn (gen_load_symptr (temp, src, scratch));
|
||||
REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, src, REG_NOTES (insn));
|
||||
}
|
||||
|
||||
if (temp != dest)
|
||||
emit_move_insn (dest, temp);
|
||||
|
|
|
@ -484,9 +484,9 @@
|
|||
if (rtx_equal_function_value_matters
|
||||
&& ! (GET_CODE (operands[1]) == SYMBOL_REF
|
||||
&& SYMBOL_REF_FLAG (operands[1])))
|
||||
emit_insn (gen_movdi_symbolic (operands[0], operands[1]));
|
||||
emit_insn (gen_movdi_symbolic (operands[0], operands[1], gen_reg_rtx (DImode)));
|
||||
else
|
||||
ia64_expand_load_address (operands[0], operands[1]);
|
||||
ia64_expand_load_address (operands[0], operands[1], NULL_RTX);
|
||||
DONE;
|
||||
}
|
||||
}")
|
||||
|
@ -551,12 +551,13 @@
|
|||
(define_insn_and_split "movdi_symbolic"
|
||||
[(set (match_operand:DI 0 "register_operand" "=r")
|
||||
(match_operand:DI 1 "symbolic_operand" "s"))
|
||||
(clobber (match_operand:DI 2 "register_operand" "+r"))
|
||||
(use (reg:DI 1))]
|
||||
""
|
||||
"* abort ();"
|
||||
""
|
||||
[(const_int 0)]
|
||||
"ia64_expand_load_address (operands[0], operands[1]); DONE;")
|
||||
"ia64_expand_load_address (operands[0], operands[1], operands[2]); DONE;")
|
||||
|
||||
(define_insn "*movdi_internal_astep"
|
||||
[(set (match_operand:DI 0 "destination_operand"
|
||||
|
@ -640,7 +641,7 @@
|
|||
[(const_int 0)]
|
||||
"
|
||||
{
|
||||
ia64_expand_load_address (operands[0], operands[1]);
|
||||
ia64_expand_load_address (operands[0], operands[1], NULL_RTX);
|
||||
DONE;
|
||||
}")
|
||||
|
||||
|
@ -679,24 +680,25 @@
|
|||
|
||||
(define_expand "load_gprel64"
|
||||
[(set (match_dup 2)
|
||||
(minus:DI (match_operand:DI 1 "symbolic_operand" "") (reg:DI 1)))
|
||||
(minus:DI (match_operand:DI 1 "symbolic_operand" "") (match_dup 3)))
|
||||
(set (match_operand:DI 0 "register_operand" "")
|
||||
(plus:DI (reg:DI 1) (match_dup 2)))]
|
||||
(plus:DI (match_dup 3) (match_dup 2)))]
|
||||
""
|
||||
"
|
||||
{
|
||||
operands[2] = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode);
|
||||
operands[3] = pic_offset_table_rtx;
|
||||
}")
|
||||
|
||||
(define_expand "load_symptr"
|
||||
[(set (match_dup 2)
|
||||
(plus:DI (reg:DI 1) (match_operand:DI 1 "got_symbolic_operand" "")))
|
||||
[(set (match_operand:DI 2 "register_operand" "")
|
||||
(plus:DI (match_dup 4) (match_operand:DI 1 "got_symbolic_operand" "")))
|
||||
(set (match_operand:DI 0 "register_operand" "") (match_dup 3))]
|
||||
""
|
||||
"
|
||||
{
|
||||
operands[2] = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode);
|
||||
operands[3] = gen_rtx_MEM (DImode, operands[2]);
|
||||
operands[4] = pic_offset_table_rtx;
|
||||
RTX_UNCHANGING_P (operands[3]) = 1;
|
||||
}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue