public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/11245] [3.4 Regression] __asm__ use generates bad code with current CVS gcc
       [not found] <20030618215131.11245.fnf@ninemoons.com>
@ 2003-07-09  4:23 ` neroden at gcc dot gnu dot org
  2003-07-09  4:25 ` neroden at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: neroden at gcc dot gnu dot org @ 2003-07-09  4:23 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=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));
}


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

* [Bug c/11245] [3.4 Regression] __asm__ use generates bad code with current CVS gcc
       [not found] <20030618215131.11245.fnf@ninemoons.com>
  2003-07-09  4:23 ` [Bug c/11245] [3.4 Regression] __asm__ use generates bad code with current CVS gcc neroden at gcc dot gnu dot org
@ 2003-07-09  4:25 ` neroden at gcc dot gnu dot org
  2003-07-22 23:11 ` [Bug optimization/11245] " pinskia at physics dot uc dot edu
  2003-07-27 22:46 ` pinskia at physics dot uc dot edu
  3 siblings, 0 replies; 4+ messages in thread
From: neroden at gcc dot gnu dot org @ 2003-07-09  4:25 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=11245



------- Additional Comments From neroden at gcc dot gnu dot org  2003-07-09 04:25 -------
Also, is it initialized correctly at -O0, or with the __inline__ keyword removed?


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

* [Bug optimization/11245] [3.4 Regression] __asm__ use generates bad code with current CVS gcc
       [not found] <20030618215131.11245.fnf@ninemoons.com>
  2003-07-09  4:23 ` [Bug c/11245] [3.4 Regression] __asm__ use generates bad code with current CVS gcc neroden at gcc dot gnu dot org
  2003-07-09  4:25 ` neroden at gcc dot gnu dot org
@ 2003-07-22 23:11 ` pinskia at physics dot uc dot edu
  2003-07-27 22:46 ` pinskia at physics dot uc dot edu
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-22 23:11 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=11245


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-06-19 03:40:41         |2003-07-22 23:11:19
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-22 23:11 -------
Here is the reduced sources:
    void func ()
    { 
      unsigned long loops=10;
      __asm__ __volatile__ (
                    ".set\tnoreorder\n"
                    "1:\tbnez\t%0,1b\n\t"
                    "subu\t%0,1\n\t"
                    ".set\treorder"
                    : "+r" (loops)
                    );
    }
And it works at -O0.
This is with the mainline (20030719).


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

* [Bug optimization/11245] [3.4 Regression] __asm__ use generates bad code with current CVS gcc
       [not found] <20030618215131.11245.fnf@ninemoons.com>
                   ` (2 preceding siblings ...)
  2003-07-22 23:11 ` [Bug optimization/11245] " pinskia at physics dot uc dot edu
@ 2003-07-27 22:46 ` pinskia at physics dot uc dot edu
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-27 22:46 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=11245


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-27 22:46 -------
Fixed on the mainline (20030727).


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

end of thread, other threads:[~2003-07-27 22:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030618215131.11245.fnf@ninemoons.com>
2003-07-09  4:23 ` [Bug c/11245] [3.4 Regression] __asm__ use generates bad code with current CVS gcc neroden at gcc dot gnu dot org
2003-07-09  4:25 ` neroden at gcc dot gnu dot org
2003-07-22 23:11 ` [Bug optimization/11245] " pinskia at physics dot uc dot edu
2003-07-27 22:46 ` pinskia at physics dot uc dot edu

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