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]

Re: Poor code generation for M68k volatile variables


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

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