www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/26/15:37:31

Xref: news2.mv.net comp.os.msdos.djgpp:7902
From: alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GAS - register preservations and the like
Date: Mon, 26 Aug 1996 18:31:16 GMT
Lines: 36
Message-ID: <841084274.8678.2@abwillms.demon.co.uk>
References: <838840328 DOT 11194 DOT 6 AT abwillms DOT demon DOT co DOT uk>
NNTP-Posting-Host: abwillms.demon.co.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I wrote:

>Hi there... I just had the most awful bughunt of my life; I noticed
>I'd turned optimisation off in my makefile, and stuck it back at -O2,
>and thought no more... until my code started to SIGSEGV horribly.

>Eventually, I found out why.

>I had a function that called an inline assembly function; it seemed
>that, when optimised, this C++ function stored a pointer in ESI that
>it expected preserved accross my inline function. Well, I only
>preserve the segregs, ESP, EIP, and EBP... exactly which functions
>/do/ need to be preserved? It's a time-critical function, so I want to
>do the absolute minimum of pushing and popping.

I didn't even get a "read the FAQ"! So my code still runs w/o
optimisation... I tried saving EDI and ESI, but it still crashed
somewhere... any help out there?


Regards,



ABW
---

COMPUTER: We are in position over the Rebel homeworld.
VADAR: Engage the Death Star primary weapon, let those rebel worms die!
COMPUTER: Sorry, your evaluation version of Battle Computer 3.0 has expired. 
          Please send 2.6 billion dollars to the address in REGISTER.TXT

Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk
<A HREF="http://www.abwillms.demon.co.uk/">Hello :-)</A>

- Raw text -


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