This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Does weak work on PPC with -O2?
- To: Bernd Schmidt <bernds at cambridge dot redhat dot com>
- Subject: Re: Does weak work on PPC with -O2?
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Tue, 13 Mar 2001 16:56:26 +0100
- Cc: Geoff Keating <geoffk at geoffk dot org>,<gcc-bugs at gcc dot gnu dot org>
- References: <01031302172601.01708@enzo.bigblue.local>
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.