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: Does weak work on PPC with -O2?


At 16:41 13.03.2001, Bernd Schmidt wrote:
>On Tue, 13 Mar 2001, Franz Sirl wrote:
> > > Hey, that's really clever.  I didn't think of using VOLATILE.  It
> > > even makes sense...
> >
> > And it seems to work nicely with the testcase :-). I think I need to use
> > FRAME_RELATED as a flag though, cause VOLATIL is already used for
> > SYMBOL_REF_FLAG, I overlooked that.
>
>I think you want to make the MEM volatile, not the SYMBOL_REF.  Then you
>don't have to modify rtx_addr_can_trap_p.

Besides that I now have to use the /i (integrated) flag to be consistent 
between mainline and gcc-2_95-branch, why should I lie to the compiler and 
flag the MEM? The whole thing is that deferencing the SYMBOL_REF may trap 
if the symbol is weak.

Hmm, how is a volatile MEM different in this case anyway? I don't see a 
reason for the compiler to _not_ convert a if/then/else to a linear 
sequence of instructions if the branch costs are high, just because of a 
volatile MEM.

Franz.


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