This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Poor code generation for M68k volatile variables
- To: eric at cls dot usask dot ca, gcc-bugs at gcc dot gnu dot org, joel at oarcorp dot com
- Subject: Re: Poor code generation for M68k volatile variables
- From: Mike Stump <mrs at windriver dot com>
- Date: Thu, 15 Jun 2000 15:09:32 -0700 (PDT)
> Date: Thu, 15 Jun 2000 09:32:24 -0600
> From: Eric Norum <eric@cls.usask.ca>
> To: gcc-bugs@gcc.gnu.org, Joel Sherril <joel@oarcorp.com>
> Declaring a variable `volatile' makes access to it less efficient on
> m68k targets.
Yes. Search the mailing list archives for volatile_ok, and my name.
You will find a patch to fix the compiler, the same test case as the
test case you found, a complete discussion and so on.
The solution, if you want to push it forward, is to define a new flag
#define MD_RESPECTS_VOLATILE 1
in your port file, and go through the entire port file, and ensure
that all uses of things comply with the volatile semantics, and then
conditionalize the old patch that fixes this with the condition of
MD_RESPECTS_VOLATILE being defined and true.
Voila, there you have it.