delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/27/20:14:26

Date: Mon, 27 Oct 1997 17:12:02 -0800 (PST)
Message-Id: <199710280112.RAA17320@adit.ap.net>
Mime-Version: 1.0
To: Sampo Niskanen <sampo AT lizard DOT compart DOT fi>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: cwsdpmi and registers questions

At 04:51  10/21/1997 GMT, Sampo Niskanen wrote:
[Charles already answered the other question]
>When I optimize fully (-O3), and use external asm-routines (made with
>nasm) what registers do I have to restore? Without optimization it doesn't
>need any registers restored, but when I started to use -O3 it gave trouble
>with atleast ESI and EDI. I'm not sure about the other registers and would
>like to be.
If I'm not mistaken, you have to preserve ESI, EDI, EBX, EBP, DS, and ES all
the time. You also have to preserve ESP, so pop off everything you push.
(Don't pop your args!) I think with lower optimization levels you just got
lucky and the function didn't happen to be using those registers.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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