On Sat, 31 Mar 2001, Greg Hughes wrote:
>Inline assembly experts,
>
>I've been palying with RedHat 7.1 Beta. This ships with gcc 2.96.77,
>which is much better than the 2.96 bundled with RedHat 7.0. This
>compiler can build the xc tree from the trunk, but it chokes trying to
>build the mesa-3-5-branch. It doesn't like the COPY_DWORDS macro in the
>r128, radeon, and i810 directories.
>
>
>#define COPY_DWORDS( j, vb, vertsize, v ) \
> __asm__ __volatile__( "rep ; movsl" \
> : "=%c" (j), "=D" (vb) \
> : "0" (vertsize), \
> "D" ((long)vb), \
> "S" ((long)v) \
> : "esi" )
>
>The error is:
>
> Can't find a register in class `SIREG' while reloading `asm'.
>
>My question: Is this a compiler defect, or is the compiler just being
>more strict?
I asked Jakub Jelinek about this and here is his response to the
question for you:
-----------------------------------------------------------------
This is wrong. Either is "S" used in input (or output or both
lists), or it is a clobber, never both. The above pattern
requests that v is to be passed in one-register class containing
%esi (SIREG) but compiler is not allowed to use %esi for that.
Doing something like:
#define COPY_DWORDS( j, vb, vertsize, v ) \
do { \
unsigned int __x; \
__asm__ __volatile__( "rep ; movsl" \
: "=%c" (j), "=D" (vb),\
"=S" (__x) \
: "0" (vertsize), \
"1" ((long)vb), \
"2" ((long)v)); \
} while (0)
should fix it.
Jakub
----------------------------------------------------------------
Hope this helps.
Take care!
TTYL
--
Mike A. Harris Shipping/mailing address:
OS Systems Engineer 190 Pittsburgh Ave., Sault Ste. Marie,
Red Hat Inc. Ontario, Canada, P6C 5B3
http://www.redhat.com Phone: (705)949-2136
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dri-devel