This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i386 and asm jumping
- From: Michael Matz <matzmich at cs dot tu-berlin dot de>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: <jh at suse dot cz>, <gcc at gcc dot gnu dot org>
- Date: Tue, 7 May 2002 16:42:51 +0200 (MET DST)
- Subject: Re: i386 and asm jumping
Hi,
On Tue, 7 May 2002, Robert Dewar wrote:
> > It is not possible. ASM statements may not jump.
> > You may want to use computed goto GCC extension istead.
>
> Seems a pity, this is quite a serious restriction in capability
> compared with Asm inserts in other compilers.
And how do those compare in optimizing functions containing asm's? Sitch
it off completely? If you can jump out of the inside of an asm, you
basically have a trapping insn. It's target may or may not be given as a
parameter, e.g. a label. If not, hmm, possibly it's equivalent to a
computed goto, i.e. reaches possibly all defined labels. But that aside,
internally with non-trapping insns, only jump_insn can jump. I wouldn't
call that a serious restriction. If you want asm, write a .s file.
Ciao,
Michael.