This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

RE: GCC: Inefficient register usage?


Further to the volatile discussion, I saw this on the gcc-bugs list:

-----Original Message-----
From: gcc-bugs-owner@gcc.gnu.org [mailto:gcc-bugs-owner@gcc.gnu.org]On
Behalf Of Mike Stump
Sent: 15 June 2000 23:10
To: eric@cls.usask.ca; gcc-bugs@gcc.gnu.org; joel@oarcorp.com
Subject: Re: Poor code generation for M68k volatile variables
Importance: High


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

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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