mirror of git://gcc.gnu.org/git/gcc.git
mips.md (call_internal): Pass curr_insn to mips_split_call.
gcc/ 2010-11-03 Uros Bizjak <ubizjak@gmail.com> * config/mips/mips.md (call_internal): Pass curr_insn to mips_split_call. (call_internal_direct): Ditto. (call_value_internal): Ditto. (call_value_internal_direct): Ditto. (call_value_multiple_internal): Ditto. * config/mips/mips.c (mips_split_call): Do not copy CALL_INSN_FUNCTION_USAGE here. From-SVN: r166717
This commit is contained in:
parent
98824c6fc4
commit
82220036f6
|
@ -1,3 +1,14 @@
|
||||||
|
2010-11-13 Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
|
* config/mips/mips.md (call_internal): Pass curr_insn to
|
||||||
|
mips_split_call.
|
||||||
|
(call_internal_direct): Ditto.
|
||||||
|
(call_value_internal): Ditto.
|
||||||
|
(call_value_internal_direct): Ditto.
|
||||||
|
(call_value_multiple_internal): Ditto.
|
||||||
|
* config/mips/mips.c (mips_split_call): Do not copy
|
||||||
|
CALL_INSN_FUNCTION_USAGE here.
|
||||||
|
|
||||||
2010-11-13 Mingming Sun <mingm.sun@gmail.com>
|
2010-11-13 Mingming Sun <mingm.sun@gmail.com>
|
||||||
|
|
||||||
* doc/invoke.texi (MIPS Options): Add loongson3a processor.
|
* doc/invoke.texi (MIPS Options): Add loongson3a processor.
|
||||||
|
|
|
@ -6520,11 +6520,7 @@ mips_expand_call (enum mips_call_type type, rtx result, rtx addr,
|
||||||
void
|
void
|
||||||
mips_split_call (rtx insn, rtx call_pattern)
|
mips_split_call (rtx insn, rtx call_pattern)
|
||||||
{
|
{
|
||||||
rtx new_insn;
|
emit_call_insn (call_pattern);
|
||||||
|
|
||||||
new_insn = emit_call_insn (call_pattern);
|
|
||||||
CALL_INSN_FUNCTION_USAGE (new_insn)
|
|
||||||
= copy_rtx (CALL_INSN_FUNCTION_USAGE (insn));
|
|
||||||
if (!find_reg_note (insn, REG_NORETURN, 0))
|
if (!find_reg_note (insn, REG_NORETURN, 0))
|
||||||
/* Pick a temporary register that is suitable for both MIPS16 and
|
/* Pick a temporary register that is suitable for both MIPS16 and
|
||||||
non-MIPS16 code. $4 and $5 are used for returning complex double
|
non-MIPS16 code. $4 and $5 are used for returning complex double
|
||||||
|
|
|
@ -6051,18 +6051,16 @@
|
||||||
;; But once we generate the separate insns, it becomes obvious that
|
;; But once we generate the separate insns, it becomes obvious that
|
||||||
;; $gp is not live on entry to the call.
|
;; $gp is not live on entry to the call.
|
||||||
;;
|
;;
|
||||||
;; ??? The operands[2] = insn check is a hack to make the original insn
|
|
||||||
;; available to the splitter.
|
|
||||||
(define_insn_and_split "call_internal"
|
(define_insn_and_split "call_internal"
|
||||||
[(call (mem:SI (match_operand 0 "call_insn_operand" "c,S"))
|
[(call (mem:SI (match_operand 0 "call_insn_operand" "c,S"))
|
||||||
(match_operand 1 "" ""))
|
(match_operand 1 "" ""))
|
||||||
(clobber (reg:SI RETURN_ADDR_REGNUM))]
|
(clobber (reg:SI RETURN_ADDR_REGNUM))]
|
||||||
""
|
""
|
||||||
{ return TARGET_SPLIT_CALLS ? "#" : MIPS_CALL ("jal", operands, 0, 1); }
|
{ return TARGET_SPLIT_CALLS ? "#" : MIPS_CALL ("jal", operands, 0, 1); }
|
||||||
"reload_completed && TARGET_SPLIT_CALLS && (operands[2] = insn)"
|
"reload_completed && TARGET_SPLIT_CALLS"
|
||||||
[(const_int 0)]
|
[(const_int 0)]
|
||||||
{
|
{
|
||||||
mips_split_call (operands[2], gen_call_split (operands[0], operands[1]));
|
mips_split_call (curr_insn, gen_call_split (operands[0], operands[1]));
|
||||||
DONE;
|
DONE;
|
||||||
}
|
}
|
||||||
[(set_attr "jal" "indirect,direct")])
|
[(set_attr "jal" "indirect,direct")])
|
||||||
|
@ -6087,10 +6085,10 @@
|
||||||
(clobber (reg:SI RETURN_ADDR_REGNUM))]
|
(clobber (reg:SI RETURN_ADDR_REGNUM))]
|
||||||
""
|
""
|
||||||
{ return TARGET_SPLIT_CALLS ? "#" : MIPS_CALL ("jal", operands, 0, -1); }
|
{ return TARGET_SPLIT_CALLS ? "#" : MIPS_CALL ("jal", operands, 0, -1); }
|
||||||
"reload_completed && TARGET_SPLIT_CALLS && (operands[2] = insn)"
|
"reload_completed && TARGET_SPLIT_CALLS"
|
||||||
[(const_int 0)]
|
[(const_int 0)]
|
||||||
{
|
{
|
||||||
mips_split_call (operands[2],
|
mips_split_call (curr_insn,
|
||||||
gen_call_direct_split (operands[0], operands[1]));
|
gen_call_direct_split (operands[0], operands[1]));
|
||||||
DONE;
|
DONE;
|
||||||
}
|
}
|
||||||
|
@ -6126,10 +6124,10 @@
|
||||||
(clobber (reg:SI RETURN_ADDR_REGNUM))]
|
(clobber (reg:SI RETURN_ADDR_REGNUM))]
|
||||||
""
|
""
|
||||||
{ return TARGET_SPLIT_CALLS ? "#" : MIPS_CALL ("jal", operands, 1, 2); }
|
{ return TARGET_SPLIT_CALLS ? "#" : MIPS_CALL ("jal", operands, 1, 2); }
|
||||||
"reload_completed && TARGET_SPLIT_CALLS && (operands[3] = insn)"
|
"reload_completed && TARGET_SPLIT_CALLS"
|
||||||
[(const_int 0)]
|
[(const_int 0)]
|
||||||
{
|
{
|
||||||
mips_split_call (operands[3],
|
mips_split_call (curr_insn,
|
||||||
gen_call_value_split (operands[0], operands[1],
|
gen_call_value_split (operands[0], operands[1],
|
||||||
operands[2]));
|
operands[2]));
|
||||||
DONE;
|
DONE;
|
||||||
|
@ -6155,10 +6153,10 @@
|
||||||
(clobber (reg:SI RETURN_ADDR_REGNUM))]
|
(clobber (reg:SI RETURN_ADDR_REGNUM))]
|
||||||
""
|
""
|
||||||
{ return TARGET_SPLIT_CALLS ? "#" : MIPS_CALL ("jal", operands, 1, -1); }
|
{ return TARGET_SPLIT_CALLS ? "#" : MIPS_CALL ("jal", operands, 1, -1); }
|
||||||
"reload_completed && TARGET_SPLIT_CALLS && (operands[3] = insn)"
|
"reload_completed && TARGET_SPLIT_CALLS"
|
||||||
[(const_int 0)]
|
[(const_int 0)]
|
||||||
{
|
{
|
||||||
mips_split_call (operands[3],
|
mips_split_call (curr_insn,
|
||||||
gen_call_value_direct_split (operands[0], operands[1],
|
gen_call_value_direct_split (operands[0], operands[1],
|
||||||
operands[2]));
|
operands[2]));
|
||||||
DONE;
|
DONE;
|
||||||
|
@ -6187,10 +6185,10 @@
|
||||||
(clobber (reg:SI RETURN_ADDR_REGNUM))]
|
(clobber (reg:SI RETURN_ADDR_REGNUM))]
|
||||||
""
|
""
|
||||||
{ return TARGET_SPLIT_CALLS ? "#" : MIPS_CALL ("jal", operands, 1, 2); }
|
{ return TARGET_SPLIT_CALLS ? "#" : MIPS_CALL ("jal", operands, 1, 2); }
|
||||||
"reload_completed && TARGET_SPLIT_CALLS && (operands[4] = insn)"
|
"reload_completed && TARGET_SPLIT_CALLS"
|
||||||
[(const_int 0)]
|
[(const_int 0)]
|
||||||
{
|
{
|
||||||
mips_split_call (operands[4],
|
mips_split_call (curr_insn,
|
||||||
gen_call_value_multiple_split (operands[0], operands[1],
|
gen_call_value_multiple_split (operands[0], operands[1],
|
||||||
operands[2], operands[3]));
|
operands[2], operands[3]));
|
||||||
DONE;
|
DONE;
|
||||||
|
|
Loading…
Reference in New Issue