This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/11245] [3.4 Regression] __asm__ use generates bad code with current CVS gcc
- From: "neroden at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jul 2003 04:23:32 -0000
- Subject: [Bug c/11245] [3.4 Regression] __asm__ use generates bad code with current CVS gcc
- References: <20030618215131.11245.fnf@ninemoons.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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));
}