[cairo] _cairo_color_compute_shorts fails with FPU set to single precision

Alexander Larsson alexl at redhat.com
Wed Aug 30 00:56:16 PDT 2006


On Wed, 2006-08-30 at 03:45 -0400, Behdad Esfahbod wrote:

> Or better yet, use what Ali suggests.  Or even without a branch:
> 
>         int32_t i;
>         i = f * 65536.0;
>         i -= i == 65536;

Are you sure this doesn't generate a branch in the assembly? It might be
able to use a cmov to avoid it, but maybe not.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl at redhat.com    alla at lysator.liu.se 
He's a genetically engineered drug-addicted firefighter in a wheelchair. She's 
a time-travelling paranoid Valkyrie fleeing from a Satanic cult. They fight 
crime! 



More information about the cairo mailing list