freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] FT_MulFix assembly


From: Miles Bader
Subject: Re: [ft-devel] FT_MulFix assembly
Date: Tue, 7 Sep 2010 09:44:57 +0900

On Tue, Sep 7, 2010 at 4:28 AM, James Cloos <address@hidden> wrote:
>>>>>> "MB" == Miles Bader <address@hidden> writes:
>
> MB> The compiler generates the following assembly:
>
> MB>     mov     %esi, %eax
> MB>     mov     %edi, %edi
> MB>     imulq   %rdi, %rax
> MB>     addq    $32768, %rax
> MB>     shrq    $16, %rax
>
> That does not match the C code though; it rounds negative values wrong.
>
> The C version does away-from-zero rounding.

Do you have test cases that show this?  I tried using random inputs,
but even up to billions of iterations, I can't seem to find a set of
inputs where my function yields different results from yours.

Thanks,

-Miles


-- 
Cat is power.  Cat is peace.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]