This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
protect label from being optimized
- From: Kunal Parmar <kunalparmar at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 17 Apr 2008 03:21:31 -0400
- Subject: protect label from being optimized
Hi,
I am working on porting GCC to a new RISC architecture. The ISA does not
have a "Jump and Link Register" instruction. So I am simulating one by
replacing
jal [reg]
by
load ra, Lret
jr reg
Lret:
in RTL.
But my return label is getting optimized away. Could you please tell me
how to avoid this.
Also, is this the correct approach.
Thanks in advance,
Kunal