www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/28/21:59:08

Xref: news2.mv.net comp.os.msdos.djgpp:2227
From: engstad AT funcom DOT com (Paal-Kristian Engstad)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Optimization causes error?
Date: 28 Mar 1996 21:36:53 GMT
Organization: Funcom Productions.
Lines: 24
Message-ID: <4jf0pl$6s1@odin.funcom.no>
References: <31531424 DOT 2096 AT jeffnet DOT org>
NNTP-Posting-Host: odin.funcom.no
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Chris Dial (cdial AT jeffnet DOT org) wrote:
: asm(
: " MyLoop:
:   decl %ecx
:   jnz MyLoop"
: );  

I presume you are using this in a macro or in a inlined function. In this 
case, the label MyLoop will be multiply defined. Instead do:

asm("
0:	decl	%%ecx
	jnz	0b");

In this case, GAS will not stumble. Also note that when jumping to 
numbered labels the 'b' or 'f' tag for backward and forward jump 
respectively.

PKE.

----------------------------------------------------------------------
| P†l-Kristian Engstad | engstad AT funcom DOT com  | Games programmer, PSX |
| Funcom Productions   | Ph +47 22 42 01 02  | developer & Linux Fan |
----------------------------------------------------------------------

- Raw text -


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