[SDL] Alpha blending bug - fixed?
Frank Mehnert
fm3 at os.inf.tu-dresden.de
Tue Dec 5 04:57:08 PST 2006
On Monday 04 December 2006 18:51, Alex Volkov wrote:
> Frank Mehnert wrote:
> > > + : /* nothing */ : "m" (amask), "rm" ((Uint32) sf->Ashift) );
> >
> > "rm" is senseless as the compiler can never choose "m".
> > It _must_ choose "r" since using "m" he would complain
> > memory input 1 is not directly addressable
>
> That is not entirely correct, Frank. The compiler may elect to
> pre-calculate ((Uint32) sf->Ashift) and put it in a temp stack var to be
> used later in the MOVD. That is if the compiler decides it would make code
> faster, for example, not that it would make any difference in this case.
Yes, you are right, it seems that compiler is able to do that. Just tested
with an appropriate test case. However, it is interesting that gcc > 3.4
refuses to compile the same statement without 'r' . gcc-3.3 and 3.4 would
warn in this case
warning: use of memory input without lvalue in asm operand 0 is deprecated
while gcc-4.0 and gcc-4.1 would refuse to compile.
Kind regards,
Frank
--
## Dept. of Computer Science, Dresden University of Technology, Germany ##
## http://os.inf.tu-dresden.de/~fm3 ##
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20061205/ace05026/attachment.pgp
More information about the SDL
mailing list