public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/19009] New: Loading of FP constants into FP reg via SSE reg
@ 2004-12-15 12:15 uros at kss-loka dot si
  2004-12-15 14:13 ` [Bug target/19009] " bangerth at dealii dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: uros at kss-loka dot si @ 2004-12-15 12:15 UTC (permalink / raw)
  To: gcc-bugs

This is something I noticed in the build of povray-3.50c, with '-march=pentium4
-mfpmath=387'. Loading of 0.0 into the FP register is quite strange:

 8051efb:    66 0f ef c9              pxor   %xmm1,%xmm1        <- clear SSE reg
 8051eff:    f2 0f 11 4c 24 38        movsd  %xmm1,0x38(%esp,1) <- move it to stack
 8051f05:    89 de                    mov    %ebx,%esi
 8051f07:    31 c9                    xor    %ecx,%ecx
 8051f09:    dd 03                    fldl   (%ebx)
 8051f0b:    d8 cd                    fmul   %st(5),%st
 8051f0d:    dd 43 08                 fldl   0x8(%ebx)
 8051f10:    d8 cd                    fmul   %st(5),%st
 8051f12:    de c1                    faddp  %st,%st(1)
 8051f14:    dd 43 10                 fldl   0x10(%ebx)
 8051f17:    d8 cc                    fmul   %st(4),%st
 8051f19:    de c1                    faddp  %st,%st(1)
 8051f1b:    d8 c2                    fadd   %st(2),%st
 8051f1d:    f2 0f 11 0c 24           movsd  %xmm1,(%esp,1) <- move it to stack
 8051f22:    dd 04 24                 fldl   (%esp,1)      <- load it to FP reg
                        
...
 8051f39:    dd 44 24 38              fldl   0x38(%esp,1)  <- load it to FP reg
 8051f3d:    df f1                    fcomip %st(1),%st
...

This could be implemented by fldz...

Another example of constant loading via XMM reg:

 ...
 805552b:    f2 0f 10 05 e0 63 16     movsd  0x81663e0,%xmm0    <- load consant
 8055532:    08
 8055533:    f2 0f 11 44 24 20        movsd  %xmm0,0x20(%esp,1) <- move to stack
 8055539:    dd 44 24 20              fldl   0x20(%esp,1)
 805553d:    df f1                    fcomip %st(1),%st
 ...

-- 
           Summary: Loading of FP constants into FP reg via SSE reg
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: uros at kss-loka dot si
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: pentium4-pc-linux-gnu
  GCC host triplet: pentium4-pc-linux-gnu
GCC target triplet: pentium4-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-01-14 13:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-15 12:15 [Bug target/19009] New: Loading of FP constants into FP reg via SSE reg uros at kss-loka dot si
2004-12-15 14:13 ` [Bug target/19009] " bangerth at dealii dot org
2004-12-16  6:28 ` uros at kss-loka dot si
2004-12-16 13:50 ` uros at kss-loka dot si
2004-12-16 14:36 ` uros at kss-loka dot si
2004-12-27  1:00 ` pinskia at gcc dot gnu dot org
2005-01-07 11:29 ` uros at kss-loka dot si
2005-01-12  2:49 ` rth at gcc dot gnu dot org
2005-01-14  0:55 ` rth at gcc dot gnu dot org
2005-01-14  0:56 ` pinskia at gcc dot gnu dot org
2005-01-14 13:08 ` uros at kss-loka dot si
2005-01-14 13:16 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).