delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/01/19:19:06

Date: Sun, 1 Mar 1998 16:18:24 -0800 (PST)
Message-Id: <199803020018.QAA20616@adit.ap.net>
Mime-Version: 1.0
To: Tiziano <tlenat AT flashnet DOT it>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Nasm+DJGPP

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019