public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-11203-4@http.gcc.gnu.org/bugzilla/>]
* [Bug optimization/11203] New: source doesn't compile with -O0 but they compile with -O3
@ 2003-06-16  7:08 spigel@olvs.miee.ru
  2003-06-16 14:32 ` [Bug inline-asm/11203] " bangerth@dealii.org
                   ` (29 more replies)
  0 siblings, 30 replies; 42+ messages in thread
From: spigel@olvs.miee.ru @ 2003-06-16  7:08 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: source doesn't compile with -O0 but they compile with -
                    O3
           Product: gcc
           Version: 3.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: spigel@olvs.miee.ru
                CC: gcc-bugs@gcc.gnu.org
  GCC host triplet: Linux, 2.4.21, Athlon-XP

I have little source :

start --->

typedef struct {
    float real;
    float imag;
    } complex_t;

extern void
fft_asmb_3dnow (int k, complex_t * x, complex_t * wTB,
		const complex_t * d, const complex_t * d_3)
{
  register complex_t *x2k, *x3k, *x4k, *wB;
  {
    __asm__ __volatile__ ("movq	%4, %%mm0\n\t"
			  "movq	%5, %%mm1\n\t"
			  "movq	%%mm0, %%mm5\n\t"
			  "pfadd %%mm1, %%mm5\n\t"
			  "pxor	%%mm6, %%mm0\n\t"
			  "pxor	%%mm7, %%mm1\n\t"
			  "pfadd %%mm1, %%mm0\n\t"
			  "movq	%%mm0, %%mm4\n\t"
			  "pswapd %%mm4, %%mm4\n\t"
			  "movq	%6, %%mm0\n\t"
			  "movq	%7, %%mm2\n\t"
			  "movq	%%mm0, %%mm1\n\t"
			  "movq	%%mm2, %%mm3\n\t"
			  "pfadd %%mm5, %%mm0\n\t"
			  "pfadd %%mm4, %%mm2\n\t"
			  "movq	%%mm0, %0\n\t"
			  "pfsub %%mm5, %%mm1\n\t"
			  "movq	%%mm2, %3\n\t"
			  "pfsub %%mm4, %%mm3\n\t"
			  "movq	%%mm1, %1\n\t"
			  "movq	%%mm3, %2":"=m"(x[0]),
			  "=m"(x3k[0]),
			  "=m"(x2k[0]),
			  "=m"(x4k[0]):"m"(wTB[0]),
			  "m" (wTB[k * 2]),
			   "m" (x[0]),
			   "m" (x2k[0]):"memory");
  };
}

end ------->

if I add "-O0" option for gcc 3.2.3 or 3.3.1 then
compiler say "NO" like this:
"error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'"
but if I add "-O3" then compile and code work fine.

What is wrong compiler or my asm code?


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

end of thread, other threads:[~2014-02-16 10:01 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-11203-1507@http.gcc.gnu.org/bugzilla/>
2005-12-02 17:44 ` [Bug inline-asm/11203] source doesn't compile with -O0 but they compile with -O3 pinskia at gcc dot gnu dot org
2005-12-02 17:46 ` pinskia at gcc dot gnu dot org
2006-01-19 12:38 ` pinskia at gcc dot gnu dot org
2006-04-21 15:56 ` langer_mann at web dot de
2006-04-21 15:59 ` langer_mann at web dot de
2006-11-08 20:03 ` xyzzy at speakeasy dot org
2006-11-08 20:45 ` michaelni at gmx dot at
2007-02-27 19:36 ` xyzzy at speakeasy dot org
2007-02-27 22:50 ` michaelni at gmx dot at
2009-10-18 19:56 ` astrange at ithinksw dot com
     [not found] <bug-11203-4@http.gcc.gnu.org/bugzilla/>
2014-02-16 10:01 ` jackie.rosen at hushmail dot com
2003-06-16  7:08 [Bug optimization/11203] New: " spigel@olvs.miee.ru
2003-06-16 14:32 ` [Bug inline-asm/11203] " bangerth@dealii.org
2003-07-09  4:28 ` neroden at gcc dot gnu dot org
2003-07-29  8:25 ` steven at gcc dot gnu dot org
2003-08-23  0:28 ` dhazeghi at yahoo dot com
2003-12-17  0:24 ` pinskia at gcc dot gnu dot org
2004-02-10  1:16 ` pinskia at gcc dot gnu dot org
2004-03-31  8:37 ` spigel at olvs dot miee dot ru
2004-08-06  7:01 ` pinskia at gcc dot gnu dot org
2004-08-15 11:00 ` pluto at pld-linux dot org
2004-09-02 18:26 ` pinskia at gcc dot gnu dot org
2005-01-01 17:15 ` stian at nixia dot no
2005-01-01 17:22 ` pinskia at gcc dot gnu dot org
2005-01-01 18:57 ` michaelni at gmx dot at
2005-01-01 22:50 ` steven at gcc dot gnu dot org
2005-01-01 23:05 ` steven at gcc dot gnu dot org
2005-01-20 21:04 ` pinskia at gcc dot gnu dot org
2005-01-21 12:39 ` drab at kepler dot fjfi dot cvut dot cz
2005-01-21 13:55 ` falk at debian dot org
2005-01-21 14:10 ` drab at kepler dot fjfi dot cvut dot cz
2005-01-21 15:15 ` pinskia at gcc dot gnu dot org
2005-01-21 15:51 ` drab at kepler dot fjfi dot cvut dot cz
2005-01-21 16:34 ` falk at debian dot org
2005-01-21 16:48 ` drab at kepler dot fjfi dot cvut dot cz
2005-01-22 12:14 ` steven at gcc dot gnu dot org
2005-01-22 15:58 ` stian at nixia dot no
2005-01-22 17:10 ` michaelni at gmx dot at
2005-01-22 17:20   ` Daniel Berlin
2005-01-22 17:21 ` dberlin at dberlin dot org
2005-01-24  6:45 ` spigel at olvs dot miee dot ru
2005-03-26  0:29 ` pinskia at gcc dot gnu dot org
2005-09-05 22:20 ` 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).