This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Inline assembly without inputs considered const/pure?
- From: Andrew Haley <aph at redhat dot com>
- To: Matthias Pfaller <leo at marco dot de>, gcc-help at gcc dot gnu dot org
- Date: Thu, 25 Feb 2016 15:40:19 +0000
- Subject: Re: Inline assembly without inputs considered const/pure?
- Authentication-results: sourceware.org; auth=none
- References: <56CC165A dot 6080704 at marco dot de> <56CC74F3 dot 40304 at marco dot de> <20160223201135 dot GB31896 at unpythonic dot net> <56CD4D70 dot 2060307 at marco dot de> <56CF1F81 dot 3000409 at marco dot de>
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.