[Patch, i386]: Rewrite and macroize sin, cos and sincos x87 patterns

Uros Bizjak ubizjak@gmail.com
Sat Nov 25 20:24:00 GMT 2006


This patch rewrites and macroizes sin, cos and sincos x87 patterns. It 
rewrites these patterns the same way as fsqrt patterns have been 
rewritten (inherent float extensions of DFmode and SFmode operands to 

Patch was bootstrapped on i686-pc-linux-gnu, regression tested for c, 
c++ and fortran.

2006-11-25  Uros Bizjak  <ubizjak@gmail.com>

        * config/i386/i386.md (*sinxf2): Rename to *sinxf2_i387.
        (*cosxf2): Rename to cosxf2_i387.

        (*sindf2, *sinsf2): Extend operand 1 to XFmode.  Macroize patterns
        using X87MODEF12 mode macro. Rename patterns to
        *sin_extend<mode>xf2_i387.  Use SSE_FLOAT_MODE_P to disable patterns
        for SSE math.
        (*cosdf2, *cossf2): Ditto.
        (sincosdf3, sincossf3): Ditto.  Fix corresponding splitters to match
        extended input operands.

        (sincos<mode>3): New expander.

        (*sinextendsfdf2, *cosextendsfdf2, *sincosextendsfdf3): Remove
        insn patterns and corresponding splitters.

BTW: Patch also adds a couple of missing spaces in emit_insn() call, 
spotted by Vaclav Haisman - thanks.

OK for mainline?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: i386-trig.diff
Type: text/x-patch
Size: 12789 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061125/34e5bf65/attachment.bin>

More information about the Gcc-patches mailing list