Commit 07ea92d3 by Kaz Kojima

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
parent 085d4f55
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> 2004-10-08 Joseph S. Myers <jsm@polyomino.org.uk>
* c-typeck.c (enum impl_conv): New. * c-typeck.c (enum impl_conv): New.
......
...@@ -6869,8 +6869,8 @@ ...@@ -6869,8 +6869,8 @@
(define_insn "tls_global_dynamic" (define_insn "tls_global_dynamic"
[(set (match_operand:SI 0 "register_operand" "=&z") [(set (match_operand:SI 0 "register_operand" "=&z")
(call (unspec:SI [(match_operand:SI 1 "" "")] (call (mem:SI (unspec:SI [(match_operand:SI 1 "" "")]
UNSPEC_TLSGD) UNSPEC_TLSGD))
(const_int 0))) (const_int 0)))
(use (reg:PSI FPSCR_REG)) (use (reg:PSI FPSCR_REG))
(use (reg:SI PIC_REG)) (use (reg:SI PIC_REG))
...@@ -6898,8 +6898,8 @@ mov.l\\t1f,r4\\n\\ ...@@ -6898,8 +6898,8 @@ mov.l\\t1f,r4\\n\\
(define_insn "tls_local_dynamic" (define_insn "tls_local_dynamic"
[(set (match_operand:SI 0 "register_operand" "=&z") [(set (match_operand:SI 0 "register_operand" "=&z")
(call (unspec:SI [(match_operand:SI 1 "" "")] (call (mem:SI (unspec:SI [(match_operand:SI 1 "" "")]
UNSPEC_TLSLDM) UNSPEC_TLSLDM))
(const_int 0))) (const_int 0)))
(use (reg:PSI FPSCR_REG)) (use (reg:PSI FPSCR_REG))
(use (reg:SI PIC_REG)) (use (reg:SI PIC_REG))
...@@ -10951,17 +10951,45 @@ mov.l\\t1f,r0\\n\\ ...@@ -10951,17 +10951,45 @@ mov.l\\t1f,r0\\n\\
"byterev %1, %0" "byterev %1, %0"
[(set_attr "type" "arith_media")]) [(set_attr "type" "arith_media")])
(define_insn "prefetch" (define_insn "prefetch_media"
[(prefetch (match_operand:QI 0 "address_operand" "p") [(prefetch (match_operand:QI 0 "address_operand" "p")
(match_operand:SI 1 "const_int_operand" "n") (match_operand:SI 1 "const_int_operand" "n")
(match_operand:SI 2 "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]); operands[0] = gen_rtx_MEM (QImode, operands[0]);
output_asm_insn (\"ld%M0.b %m0,r63\", operands); output_asm_insn (\"ld%M0.b %m0,r63\", operands);
return \"\"; return \"\";
}" }"
[(set_attr "type" "other")]) [(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;
}")
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