From: semler@ Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP Optimizing Date: 31 Dec 1996 10:03:11 GMT Organization: IBM Zurich Research Laboratory Lines: 64 Message-ID: <5aaocv$mis@grimsel.zurich.ibm.com> References: <19961231 DOT 163855 DOT 4983 DOT 3 DOT chambersb AT juno DOT com> Reply-To: semler AT raleigh DOT ibm DOT com NNTP-Posting-Host: semler.dk.ibm.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In <19961231 DOT 163855 DOT 4983 DOT 3 DOT chambersb AT juno DOT com>, chambersb AT juno DOT com (Benjamin D Chambers) writes: Ok thanks for the hints but I'm still having troubles: 1) The inner loop I talked about is unsigned long i,run,u0,v0,du,dv,mask; long *b1,b2; for(i=run;i--) { u0 = (u0+du)&mask; v0 = (v0+dv)&mask; *b1++ = b2[((((unsigned long)v0)>>16)<<7)+((((unsigned long)u0)>>16))]; } This compiles to: L1220: fxch %st(2) fxch %st(4) fxch %st(5) fxch %st(3) fxch %st(6) fxch %st(2) fxch %st(2) fxch %st(6) fxch %st(3) fxch %st(5) fxch %st(4) fxch %st(2) movl -132(%ebp),%eax addl -232(%ebp),%eax movl -16(%ebp),%edx andl %edx,%eax movl %eax,-232(%ebp) movl -136(%ebp),%eax addl %ebx,%eax movl %eax,%ebx andl %edx,%ebx movl %ebx,%eax shrl $16,%eax sall $7,%eax movl -232(%ebp),%edx shrl $16,%edx addl %edx,%eax movl -120(%ebp),%esi movl (%esi,%eax,4),%eax movl -116(%ebp),%edi movl %eax,(%edi) addl $4,%edi movl %edi,-116(%ebp) L1209: decl %ecx cmpl $-1,%ecx jne L1220 And the first 12 instructions are here in question... What do they do? Why are they here? 2) I know that the intel processors has troubles with domains, but is there no standard behaviour for the Gnu C about what to expect on this matter? Kind regards and a Happy New Year! Henning Semler