Mail Archives: djgpp/1996/03/24/04:50:49
In article <4ishog$obf AT mack DOT rt66 DOT com>,
Brennan "Mr. Wacko" Underwood <brennan AT mack DOT rt66 DOT com> wrote:
>asm(
> "loopf:\n\t"
> "movb %%dh, (%%edi)\n\t" /* write integer portion of color - U1 */
> "addl %%ebx, %%edx\n\t" /* Add colstep to col - V1 */
> "incl %%edi\n\t" /* increment edi - U2 */
> "decl %ecx\n\t" /* decrement count - V2 */
> "jnz loopf" /* If ecx not zero goto loop - U3 */
> : : "D" (tscreen), "d" (tcol1), "b" (tcolstep), "c" (tlength)/*loaded regs*/
> : "%edi", "%ebx", "%ecx", "%edx"); /* clobbered regs */
I think there is a problem with your clobbered register list. Because
you have already specified the loaded registers gcc already knows that
these registers will be modified. Ordinarily I wouldn't think that
would be a problem, but the GCC info pages state that "The input
operands are guaranteed not to use any of the clobbered registers."
There's clearly a contradiction here, and I would hope GCC flags
this as an error, or at least gives a warning.
Eric
--
Eric Korpela | An object at rest can never be
korpela AT ssl DOT berkeley DOT edu | stopped.
<a href="http://www.cs.indiana.edu/finger/mofo.ssl.berkeley.edu/korpela/w">
Click here for more info.</a>
- Raw text -