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 c/11245] [3.4 Regression] __asm__ use generates bad code with current CVS gcc


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

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



------- Additional Comments From neroden at gcc dot gnu dot org  2003-07-09 04:23 -------
This looks on the surface like a problem with inlining combined with "dead" code elimination.
Does this snippet lose the loop initialization?  If it doesn't then presumably inlining is responsible; if it does,
it points elsewhere. :-)

void func ()
{
     unsigned long loops = 50000 ;
      __asm__ __volatile__ (
                    ".set\tnoreorder\n"
                    "1:\tbnez\t%1,1b\n\t"
                    "subu\t%0,1\n\t"
                    ".set\treorder"
                    : "+r" (loops)
                    : "0" (loops));
}


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