public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/19161] New: No emms or femms emitted between MMX and FP instructions
@ 2004-12-26 20:16 rth at gcc dot gnu dot org
  2004-12-26 21:20 ` [Bug target/19161] " pinskia at gcc dot gnu dot org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-12-26 20:16 UTC (permalink / raw)
  To: gcc-bugs

Curse Intel and their modal register sets.

Today I caught the x86-64 compiler using %mm0 just because the datatype it
wanted to move fit nicely in that register.  Except that after an MMX register
is touched, one must leave MMX mode before (1) the nest FPU instruction or
(2) at a call boundary, since the abi requires we be in FPU mode.

Not bothering to add a test case, since I'm planning to hack around this 
specific example with changed register preferences, but the point remains
that we have nothing in place to prevent the badness.

I suspect that what we'll need for a complete solution may include dynamic
register class letters.  At some point, perhaps during rtl expansion, we
record whether or not there are any *operations* that require either MMX
or FPU.  If we have MMX but not FPU operations, we set 'f' to NOREGS; if
we have FPU but not MMX, we set 'y' to NOREGS.  If we have both, then then
we'll need an optimize_mode_switching pass to swap between modes.  The
exceedingly tricky bit there will be tricking reload into not making both
kinds of registers live behind our backs.

-- 
           Summary: No emms or femms emitted between MMX and FP instructions
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rth at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i386-*-* x86_64-*-*


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


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

end of thread, other threads:[~2005-09-22 13:11 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-26 20:16 [Bug target/19161] New: No emms or femms emitted between MMX and FP instructions rth at gcc dot gnu dot org
2004-12-26 21:20 ` [Bug target/19161] " pinskia at gcc dot gnu dot org
2004-12-27  0:24 ` pinskia at gcc dot gnu dot org
2004-12-27  0:26 ` pinskia at gcc dot gnu dot org
2005-01-18  9:54 ` rth at gcc dot gnu dot org
2005-06-21 11:20 ` steven at gcc dot gnu dot org
2005-06-24 14:03 ` pluto at agmk dot net
2005-06-24 20:33 ` uros at kss-loka dot si
2005-06-25  6:26 ` pluto at agmk dot net
2005-06-25  7:40 ` uros at kss-loka dot si
2005-07-21  8:53 ` uros at kss-loka dot si
2005-07-22  9:42 ` uros at kss-loka dot si
2005-07-23 15:51 ` pluto at agmk dot net
2005-07-23 17:23 ` pluto at agmk dot net
2005-08-19 11:08 ` uros at kss-loka dot si
2005-08-22 20:43 ` rth at gcc dot gnu dot org
2005-08-23 20:56 ` rth at gcc dot gnu dot org
2005-08-23 21:38 ` rth at gcc dot gnu dot org
2005-08-24 14:46 ` uros at kss-loka dot si
2005-09-22 13:11 ` pluto at agmk dot net

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).