Mail Archives: djgpp/1998/03/01/19:19:06
At 09:33 3/1/1998 +0100, Tiziano wrote:
>Hello!
>I'm working on a simple 3D engine in DJGPP. Unfortunately C polyfillers
>aren't so fast and I need to link asm code. I made a little FlatLine
>routine with nasm but I have some problems.
>If I compile without optimizations all works perfectly, if I compile
>with -O2 -ffast-math -fexepensive-optimizations I have a segv error!
>But why djggp mess with my code???
I suspect it is not that DJGPP messes with your code, but that you mess with
its. :) Usually this happens when your ASM code doesn't preserve all the
registers it should. You may get away with it without optimizations, since
the compiler may not use those registers, but with optimization it tries
harder and probably will use them. Your ASM must save these registers: ebx,
esi, edi, ebp, ds, es.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -