delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/11/16:32:02

From: Bill Currie <bcurrie AT tssc DOT co DOT nz>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Inline asm
Date: Thu, 11 Dec 1997 11:52:22 +1300
Organization: Telecommunication Systems Support Centre
Lines: 17
Message-ID: <348F1D26.527A@tssc.co.nz>
References: <199712040055 DOT QAA21354 AT adit DOT ap DOT net>
NNTP-Posting-Host: node106.tssc.co.nz
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Nate Eldredge wrote:
> Not quite. You will have to (save/restore) or (tell the compiler that you
> clobbered) registers which it expects to be preserved across function calls.
> Last I checked, this was %ebx, %esi, %edi and %ebp. IMHO, you should inform

This is correct, though you also have to preserve %ds and %es and
unfortuanatly, there is no way of telling gcc about clobbered segment
registers.

> the compiler about clobbering every register that you change, and it will
> then take appropriate action if necessary.

This is especially true if you start useing inline, __inline__ or -O3.

Bill
-- 
Leave others their otherness

- Raw text -


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