This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH - repost] Enable push_fpscr. pop_fpscr for SH2E
- From: "Dhananjay R. Deshpande" <dhananjayd at KPITCummins dot com>
- To: "Alexandre Oliva" <aoliva at redhat dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>,"Jorn Rennecke" <joern dot rennecke at superh dot com>
- Date: Thu, 26 Jun 2003 14:34:31 +0530
- Subject: [PATCH - repost] Enable push_fpscr. pop_fpscr for SH2E
Hi,
I don't have cvs write access. Please check it in for me.
- Dhananjay
Changelog
2003-06-26 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
* gcc/config/sh/sh.md (define_expand "push_fpscr"): Enable for TARGET_SH2E.
(define_expand "pop_fpscr"): Likewise.
(define_insn "fpu_switch"): Likewise.
==========================================================================
--- sh.md.old Thu Jun 26 14:20:19 2003
+++ sh.md Thu Jun 26 14:20:56 2003
@@ -3343,7 +3343,7 @@
(define_expand "push_fpscr"
[(const_int 0)]
- "TARGET_SH3E"
+ "TARGET_SH2E"
"
{
rtx insn = emit_insn (gen_fpu_switch (gen_rtx (MEM, PSImode,
@@ -3356,7 +3356,7 @@
(define_expand "pop_fpscr"
[(const_int 0)]
- "TARGET_SH3E"
+ "TARGET_SH2E"
"
{
rtx insn = emit_insn (gen_fpu_switch (get_fpscr_rtx (),
@@ -8080,7 +8080,7 @@ mov.l\\t1f,r0\\n\\
(define_insn "fpu_switch"
[(set (match_operand:PSI 0 "general_movdst_operand" "=c,c,r,c,c,r,m,r,<")
(match_operand:PSI 1 "general_movsrc_operand" "c,>,m,m,r,r,r,!c,c"))]
- "TARGET_SH3E
+ "TARGET_SH2E
&& (! reload_completed
|| true_regnum (operands[0]) != FPSCR_REG
|| GET_CODE (operands[1]) != MEM
==========================================================================
-----Original Message-----
From: Alexandre Oliva [mailto:aoliva@redhat.com]
Sent: Thursday, June 26, 2003 1:05 PM
To: Dhananjay R. Deshpande
Cc: gcc-patches@gcc.gnu.org; Jorn Rennecke
Subject: Re: [PATCH] Enable push_fpscr. pop_fpscr for SH2E
On Jun 26, 2003, "Dhananjay R. Deshpande" <dhananjayd@KPITCummins.com> wrote:
> fpu_switch is used for mode switching only for SH4. But sometime
> last year a patch enabled fpscr to be pushed in interrupt handler if
> it is live which requires push and pop fpscr patterns.
>Ah, yes, indeed, I had misunderstood the logic in push_regs(). Still,
>I don't see how calc_live_regs() can possibly mark fpscr as used in
>SH2e or SH3e. Anyway, there's no reason to not expose the patterns
>since they *are* available on SH2e, so... Please check it in, if you
>can, or post the patch again letting me know you need someone else to
>check it in for you (I ask you to post it again just so that someone
>looking for the patch in gcc-patches, two years from now, finds it
>posted at a date similar to that in the ChangeLog, not half a year
>before :-). Thanks, and sorry about the long delay!