delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/10/09:51:43

From: horst DOT kraemer AT snafu DOT de (Horst Kraemer)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GCC 2.95 global string crashes on 386..
Date: Fri, 10 Sep 1999 11:32:08 GMT
Organization: [Posted via] Interactive Networx
Lines: 22
Message-ID: <37d8dc80.32739246@news.snafu.de>
References: <199909090422 DOT MAA24404 AT eastgate DOT cyberway DOT com DOT sg> <199909100328 DOT LAA11335 AT westgate DOT cyberway DOT com DOT sg>
NNTP-Posting-Host: n37-48.berlin.snafu.de
X-Newsreader: Forte Free Agent 1.11/32.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Fri, 10 Sep 1999 11:27:19 +0800, "Rob Kramer"
<robk AT cyberway DOT com DOT sg> wrote:

> I've disassembled the executable, and it seems the compiler issues a locked 
> 'xaddl' instruction. I couldn't find opcode 'c1' in my 386 reference manual, 
> so this may be a 486++ instruction?

Yes.  The XADD instruction was introduced with 486 and produces
nonsense or a crash on a 386- system, of course,

> (I can't find anything but Intel's 386 
> manual online, sigh)
> 
>     2052:	f0 0f c1 02    	lock xaddl %eax,(%edx)

The effect is that (edx) will contain the sum of (edx) and eax, just
as for a normal add, but eax will not retain its old value but it gets
the old value of (edx).

Regards
Horst

- Raw text -


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