This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/53513] SH Target: Add support for fschg and fpchg insns


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53513

chrbr at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chrbr at gcc dot gnu.org

--- Comment #8 from chrbr at gcc dot gnu.org ---
Hi Oleg, 

I posted a patch in 2006
(http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01562.html) to support mode
flipping fpchg instruction for the sh4a. it is in used in our current (4.8)
production compiler without issue since then.

I didn't insist a lot pushing it since too sh4a specific, but I'd be happy to
port it to the 4.10 branch and repost if there is enough interest.

Cheers

a code like 
float
foo(float a)
{
return a+2;
}

compiles into:

        mova    .L2,r0
        fmov.s  @r0+,fr0
        fpchg
        fadd    fr5,fr0
        rts
        fpchg

instead of:

      mov.l   .L2,r1
        mova    .L3,r0
        fmov.s  @r0+,fr0
        lds.l   @r1+,fpscr
        add     #-4,r1
        add     #4,r1
        fadd    fr5,fr0
        rts
        lds.l   @r1+,fpscr
.L4:
        .align 2
.L2:
        .long   ___fpscr_values
.L3:
        .long   1073741824


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]