Mail Archives: djgpp/1996/07/01/06:34:05
On Mon, 1 Jul 1996, Samuli Takala wrote:
> First I think I should mention that I use C, not C++.
> I wrote a function that has some assembly-code, including branches (and
> of course labels). It works fine when the code is compiled without
> optimations or with -O2. The problem is, when I'm compiling with -O3,
> DJGPP insists on inlining that function. This causes the labels to appear
> more than once in the code and the assembler chokes on it.
> My question:
>
> How can I fix my problem? Here is a list of ways in order of preference:
None of the above. Just use labels local to the function, like this:
asm("
0: decl %%ecx
jnz 0b");
Also note that when jumping to numbered labels the 'b' and 'f' tags are
use for backward and forward jump respectively.
- Raw text -