sh.md (tls_global_dynamic): Use MEM pattern for the first argument of CALL.

* config/sh/sh.md (tls_global_dynamic): Use MEM pattern for the
	first argument of CALL.
	(tls_local_dynamic): Likewise.

	* config/sh/sh.md (prefetch_media, prefetch_i4): New insns.
	(prefetch): Convert to expander.

From-SVN: r88747
This commit is contained in:
Kaz Kojima 2004-10-08 11:44:20 +00:00
parent 085d4f5587
commit 07ea92d369
2 changed files with 47 additions and 8 deletions

View File

@ -1,3 +1,14 @@
2004-10-08 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.md (prefetch_media, prefetch_i4): New insns.
(prefetch): Convert to expander.
2004-10-08 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.md (tls_global_dynamic): Use MEM pattern for the
first argument of CALL.
(tls_local_dynamic): Likewise.
2004-10-08 Joseph S. Myers <jsm@polyomino.org.uk>
* c-typeck.c (enum impl_conv): New.

View File

@ -6869,8 +6869,8 @@
(define_insn "tls_global_dynamic"
[(set (match_operand:SI 0 "register_operand" "=&z")
(call (unspec:SI [(match_operand:SI 1 "" "")]
UNSPEC_TLSGD)
(call (mem:SI (unspec:SI [(match_operand:SI 1 "" "")]
UNSPEC_TLSGD))
(const_int 0)))
(use (reg:PSI FPSCR_REG))
(use (reg:SI PIC_REG))
@ -6898,8 +6898,8 @@ mov.l\\t1f,r4\\n\\
(define_insn "tls_local_dynamic"
[(set (match_operand:SI 0 "register_operand" "=&z")
(call (unspec:SI [(match_operand:SI 1 "" "")]
UNSPEC_TLSLDM)
(call (mem:SI (unspec:SI [(match_operand:SI 1 "" "")]
UNSPEC_TLSLDM))
(const_int 0)))
(use (reg:PSI FPSCR_REG))
(use (reg:SI PIC_REG))
@ -10951,17 +10951,45 @@ mov.l\\t1f,r0\\n\\
"byterev %1, %0"
[(set_attr "type" "arith_media")])
(define_insn "prefetch"
(define_insn "prefetch_media"
[(prefetch (match_operand:QI 0 "address_operand" "p")
(match_operand:SI 1 "const_int_operand" "n")
(match_operand:SI 2 "const_int_operand" "n"))]
"TARGET_SHMEDIA || TARGET_HARD_SH4"
"TARGET_SHMEDIA"
"*
{
if (TARGET_HARD_SH4)
return \"pref @%0\";
operands[0] = gen_rtx_MEM (QImode, operands[0]);
output_asm_insn (\"ld%M0.b %m0,r63\", operands);
return \"\";
}"
[(set_attr "type" "other")])
(define_insn "prefetch_i4"
[(prefetch (match_operand:SI 0 "register_operand" "r")
(match_operand:SI 1 "const_int_operand" "n")
(match_operand:SI 2 "const_int_operand" "n"))]
"TARGET_HARD_SH4"
"*
{
return \"pref @%0\";
}"
[(set_attr "type" "other")])
(define_expand "prefetch"
[(prefetch (match_operand:QI 0 "address_operand" "p")
(match_operand:SI 1 "const_int_operand" "n")
(match_operand:SI 2 "const_int_operand" "n"))]
"TARGET_SHMEDIA || TARGET_HARD_SH4"
"
{
if (TARGET_HARD_SH4 && ! register_operand (operands[0], SImode))
{
rtx reg = gen_reg_rtx (SImode);
emit_move_insn (reg, operands[0]);
operands[0] = reg;
}
emit_insn ((TARGET_SHMEDIA ? gen_prefetch_media : gen_prefetch_i4)
(operands[0], operands[1], operands[2]));
DONE;
}")