Message-ID: <368A8531.A0AA35C@gmx.net> Date: Wed, 30 Dec 1998 18:55:29 -0100 From: Robert Hoehne Organization: none provided X-Mailer: Mozilla 4.07 [de] (Win95; I) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Can't unroll loops when using "-O" Optimation and having defined labels with asm References: <36894BAB DOT 61D18F84 AT gmx DOT de> <76csnr$8vi$1 AT latinum DOT dresearch DOT de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Michael Beck wrote : > > Any better solution? Use relative labels in assembler like: unsigned short x; for (x=0;x<8;x++) { asm("jmp 1f\n\t" "1:\n\t"); } or unsigned short x; for (x=0;x<8;x++) { asm("1:\n\t" "jmp 1b\n\t"); } Here is the labelname 1 (can be any other digit) and the character 'f' or 'b' stand for "forward" or "backward". Robert -- ****************************************************** * email: Robert Hoehne * * Post: Am Berg 3, D-09573 Dittmannsdorf, Germany * * WWW: http://www.tu-chemnitz.de/~sho/rho * ******************************************************