delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/10/00:20:04

From: ovek AT arcticnet DOT no (Ove Kaaven)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Weird problem
Date: Sat, 10 Jan 1998 05:12:49 GMT
Organization: Arctic Net AS
Lines: 13
Message-ID: <34b7020c.80846469@news.arcticnet.no>
References: <34B5EB35 DOT 7E13 AT mailhost DOT net>
NNTP-Posting-Host: hjemme-pc.arcticnet.no
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Richard Nichols <tiberius AT mailhost DOT net> wrote:

>How come when I compile my program with -O or -O2 ir -O3
>it crashes with a GPF but when I just turn on the optimizations
>manually it works fine? Is there something undocumented? Is it
>to do with the way I interface NASM functions? help!

GCC expects ESI, EDI and EBX to be preserved (unless it is
specifically told not to). Turning off optimizations means that GCC
will not actually reuse any value in those registers but reload and
recalculate them every statement. You can probably figure out the
rest.

- Raw text -


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