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/13591] loop unrolling creates incorrect code with inline asm


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


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