This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RTL/SYMREF/VOLATILE question
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
On Wednesday 21 January 2004 2:34 am, Jim Wilson wrote:
> xyzzy@hotpop.com wrote:
> > Is there a simple way to do what I want (that is, get the least amount of
> > indirection possible for a SYMREF and be optimization safe?)
>
> You haven't provided enough information. None of your code samples will
> actually produce code for instance. Just generating a symbol_ref does
> not do anything interesting. You have to emit insns that use it. How
> it gets optimized depends on what insns you emit. Since you did not
> give us this info, there isn't much we can do.
Sorry...
In essence I am passing this rtx up the chain to the expand_va_arg code, so I
don't KNOW what insns are emitted unless I do a lot of painful digging.
Again, the code sequence is:
rtx bar;
and either
bar = gen_rtx_SYMBOL_REF(Pmode,"*foo");
or
bar = gen_rtx_MEM(Pmode,gen_rtx_SYMBOL_REF(Pmode,"*foo"));
MEM_VOLATILE_P(bar) = 1;
... whereupon I return force_operand(copy_to_reg(bar),NULL_RTX) as the result
of EXPAND_BUILTIN_VA_ARG.
-----BEGIN PGP SIGNATURE-----
iD8DBQFADprlrT0x/nxLkjwRA4G8AJ4026dmw84/b4189tv/jrnypkHUkwCeKQv5
MlEcCADWFoYP5oX2kpJM7Zc=
=GTQd
-----END PGP SIGNATURE-----