This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: -fno-crossjumping not working + weird asm behavior
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Michael Buro <Michael dot Buro at shaw dot ca>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 9 May 2004 00:10:07 +0200
- Subject: Re: -fno-crossjumping not working + weird asm behavior
- References: <16541.19234.285140.235215@hal.shaw.ca>
Hello,
> Every goto **pc++ first jumps to .L49. This costs cycles but is likely
> the result of -fcrossjumping.
no. The computed gotos are merged together to prevent problems with
control flow graph having quadratic size. I am not quite sure why they
are not unfactored when we no longer need cfg.
> The jump is still there, but some of the code now is kept in the case
> code. Funny. Why is that happening? It's wasting cycles and still does
> crossjumping. I would expect the jmp .Lxx to go away when using
> -fno-crossjumping.
>
>
> Next thing I tried was "helping" gcc by generating jmp *%eax on the
> spot using inline assembly (see the JMP macro below). Now I am getting
> the following code which appears to be wrong because no code is
> actually generated for the cases except for the indirect jump.
Gcc does not actually understand semantics of the inline assembly code
(its contents is just copied verbatim to the output assembler file,
except for a straightforward replacement of register parameters).
Specially, it does not know that the JMP macro jumps.
Zdenek