Commit 21515593 by Richard Henderson Committed by Richard Henderson

ia64.c (move_operand): Allow symbolic_operand, but not tls_symbolic_operand.

        * config/ia64/ia64.c (move_operand): Allow symbolic_operand,
        but not tls_symbolic_operand.
        (ia64_expand_load_address): Remove scratch operand.
        (ia64_expand_tls_address): Split out from ia64_expand_move.
        (ia64_expand_move): Split symbolics only after reload.
        (ia64_emit_cond_move): New.
        * config/ia64/ia64-protos.h: Update.
        * config/ia64/ia64.md (movsi_symbolic, movdi_symbolic): Remove.
        (symbolic splitter): Accept SImode operands too.
        (cmove splitter): Use ia64_emit_cond_move.

From-SVN: r65399
parent 66d6bf1f
2003-04-09 Richard Henderson <rth@redhat.com>
* config/ia64/ia64.c (move_operand): Allow symbolic_operand,
but not tls_symbolic_operand.
(ia64_expand_load_address): Remove scratch operand.
(ia64_expand_tls_address): Split out from ia64_expand_move.
(ia64_expand_move): Split symbolics only after reload.
(ia64_emit_cond_move): New.
* config/ia64/ia64-protos.h: Update.
* config/ia64/ia64.md (movsi_symbolic, movdi_symbolic): Remove.
(symbolic splitter): Accept SImode operands too.
(cmove splitter): Use ia64_emit_cond_move.
2003-04-09 Nick Clifton <nickc@redhat.com>
* doc/install.texi: Note that ARM toolchains need binutils 2.13 or
......
......@@ -76,6 +76,7 @@ extern int basereg_operand PARAMS((rtx, enum machine_mode));
extern rtx ia64_expand_move PARAMS ((rtx, rtx));
extern int ia64_move_ok PARAMS((rtx, rtx));
extern void ia64_emit_cond_move PARAMS((rtx, rtx, rtx));
extern int ia64_depz_field_mask PARAMS((rtx, rtx));
extern rtx ia64_split_timode PARAMS((rtx[], rtx, rtx));
extern rtx spill_tfmode_operand PARAMS((rtx, int));
......@@ -89,7 +90,7 @@ extern void ia64_expand_prologue PARAMS((void));
extern void ia64_expand_epilogue PARAMS((int));
extern int ia64_direct_return PARAMS((void));
extern void ia64_expand_load_address PARAMS((rtx, rtx, rtx));
extern void ia64_expand_load_address PARAMS((rtx, rtx));
extern int ia64_hard_regno_rename_ok PARAMS((int, int));
extern void ia64_initialize_trampoline PARAMS((rtx, rtx, rtx));
......
......@@ -292,29 +292,6 @@
operands[1] = op1;
})
;; This is used during early compilation to delay the decision on
;; how to refer to a variable as long as possible. This is especially
;; important between initial rtl generation and optimization for
;; deferred functions, since we may acquire additional information
;; on the variables used in the meantime.
(define_insn_and_split "movsi_symbolic"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand:SI 1 "symbolic_operand" "s"))
(clobber (match_scratch:DI 2 "=r"))
(use (reg:DI 1))]
""
"* abort ();"
"!no_new_pseudos || reload_completed"
[(const_int 0)]
{
rtx scratch = operands[2];
if (!reload_completed)
scratch = gen_reg_rtx (Pmode);
ia64_expand_load_address (operands[0], operands[1], scratch);
DONE;
})
(define_insn "*movsi_internal"
[(set (match_operand:SI 0 "destination_operand" "=r,r,r,r, m, r,*f,*f, r,*d")
(match_operand:SI 1 "move_operand" "rO,J,i,m,rO,*f,rO,*f,*d,rK"))]
......@@ -344,29 +321,6 @@
operands[1] = op1;
})
;; This is used during early compilation to delay the decision on
;; how to refer to a variable as long as possible. This is especially
;; important between initial rtl generation and optimization for
;; deferred functions, since we may acquire additional information
;; on the variables used in the meantime.
(define_insn_and_split "movdi_symbolic"
[(set (match_operand:DI 0 "register_operand" "=r")
(match_operand:DI 1 "symbolic_operand" "s"))
(clobber (match_scratch:DI 2 "=r"))
(use (reg:DI 1))]
""
"* abort ();"
"!no_new_pseudos || reload_completed"
[(const_int 0)]
{
rtx scratch = operands[2];
if (!reload_completed)
scratch = gen_reg_rtx (Pmode);
ia64_expand_load_address (operands[0], operands[1], scratch);
DONE;
})
(define_insn "*movdi_internal"
[(set (match_operand:DI 0 "destination_operand"
"=r,r,r,r, m, r,*f,*f,*f, Q, r,*b, r,*e, r,*d, r,*c")
......@@ -404,12 +358,12 @@
[(set_attr "itanium_class" "ialu,ialu,long_i,ld,st,frfr,tofr,fmisc,fld,stf,frbr,tobr,frar_i,toar_i,frar_m,toar_m,frpr,topr")])
(define_split
[(set (match_operand:DI 0 "register_operand" "")
(match_operand:DI 1 "symbolic_operand" ""))]
[(set (match_operand 0 "register_operand" "")
(match_operand 1 "symbolic_operand" ""))]
"reload_completed && ! TARGET_NO_PIC"
[(const_int 0)]
{
ia64_expand_load_address (operands[0], operands[1], NULL_RTX);
ia64_expand_load_address (operands[0], operands[1]);
DONE;
})
......@@ -4452,26 +4406,23 @@
"reload_completed"
[(const_int 0)]
{
rtx tmp;
int emitted_something;
bool emitted_something = false;
rtx dest = operands[0];
rtx srct = operands[2];
rtx srcf = operands[3];
rtx cond = operands[4];
emitted_something = 0;
if (! rtx_equal_p (operands[0], operands[2]))
if (! rtx_equal_p (dest, srct))
{
tmp = gen_rtx_SET (VOIDmode, operands[0], operands[2]);
tmp = gen_rtx_COND_EXEC (VOIDmode, operands[4], tmp);
emit_insn (tmp);
emitted_something = 1;
ia64_emit_cond_move (dest, srct, cond);
emitted_something = true;
}
if (! rtx_equal_p (operands[0], operands[3]))
if (! rtx_equal_p (dest, srcf))
{
tmp = gen_rtx_fmt_ee (GET_CODE (operands[4]) == NE ? EQ : NE,
VOIDmode, operands[1], const0_rtx);
tmp = gen_rtx_COND_EXEC (VOIDmode, tmp,
gen_rtx_SET (VOIDmode, operands[0],
operands[3]));
emit_insn (tmp);
emitted_something = 1;
cond = gen_rtx_fmt_ee (GET_CODE (cond) == NE ? EQ : NE,
VOIDmode, operands[1], const0_rtx);
ia64_emit_cond_move (dest, srcf, cond);
emitted_something = true;
}
if (! emitted_something)
emit_note (NULL, NOTE_INSN_DELETED);
......
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