[Bug c/13591] loop unrolling creates incorrect code with inline asm

rsandifo at redhat dot com gcc-bugzilla@gcc.gnu.org
Wed Jan 7 08:13:00 GMT 2004


------- Additional Comments From rsandifo at redhat dot com  2004-01-07 08:13 -------
Subject: Re:  loop unrolling creates incorrect code with inline
 asm

"shay_gal-on at pmc-sierra dot com" <gcc-bugzilla@gcc.gnu.org> writes:
> However, I did try using p0 as a volatile, and the code created was
> still not correct.

Right.  Making "p0" volatile won't have any affect.  I don't know if
this is related to my suggestion here:

>    |[ Actually, if this is just a cache preload sequence, the "m" thing
>    |  is probably a red herring.  But in that case, the asm is only really
>    |  being executed for its side effects, not its results, so you should
>    |  probably make it "volatile" instead.  You could then get rid of the
>    |  dummy() function.

but if so, the point was to make the _asm_ volatile (i.e. use
"asm volatile (...)"  rather than "asm ..."), not to make _p0_
volatile.

Richard


-- 


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



More information about the Gcc-bugs mailing list