This is the mail archive of the gcc-help@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]

Re: Inline assembly without inputs considered const/pure?


On 02/25/2016 03:36 PM, Matthias Pfaller wrote:
> When gcc decides to inline mrsbasepri it will again be free to CSE the
> mrs instructions :-(. Is it really just me having run into this problem?
> How do other people solve the problem that __asm__ without input is
> handled like a __attribute((const)) function?

Either with a memoryclobber, or make it volatile, or both.

Andrew.


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