From: GAMMELJL AT SLU DOT EDU Date: Sat, 03 Jan 1998 19:23:11 -0600 (CST) Subject: Re: code which won't compile with -O2 on To: djgpp AT delorie DOT com Message-id: <01IRY8PU5APMBW9MXI@SLU.EDU> Organization: SAINT LOUIS UNIVERSITY St. Louis, MO MIME-version: 1.0 Precedence: bulk I do not understand what you mean by ri. I assume that you mean r1,r2,etc. So I write the input line: : "r0" (z), "r1" (x), "r2" (y) \ and leave the output line blank ( : \ ). The compilation and running goes ok except the compiler issues warnings "operand 0 has constraint 0", "operand 1 has constraints 1", etc. While the compiler does not recognize ri, it does recognize rm which seems to be very similar to g. If I use all g's (not followed by a numeral) the compiler issues "inconsistent constraints". It is quite interesting that you mentioned %%ebx(,%%ecx,4) because that is exactly what I would like to do, namely, get a register for a pointer. Brennan mentions that immed32(basepointer,indexpointer,indexscale) and the formula address=immediate32+basepointer+indexpointer+indexscale go together. Now, I suppose ebp can contain a basepointer--can it? Suppose immediate32=_array--is it? I also suppose that the (, in the form _array(,%%ecx,4) implies that basepointer=0. Here comes the question: If there were a null pointer so that immediate32=0, and if one could set basepointer=_array, then maybe (just maybe), one could write 0(%%ebp,%%ecx,4) with "ebp" (array) on the input line. So one would have the x in my example in a register (ebp). That might really speed up some codes, but is it obvious nonsense? All very interesting: my djgpp codes are 33% faster than codes I have generated heretofore, and about 10% faster than codes generated with pmodew and the Watcom C/C++ compiler--I am grasping for more and more speed.