From: Bill Currie 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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