Edouard Gomez ([EMAIL PROTECTED]) wrote:
> - Moved a "femms" before calling littleCMS. There is no guarantee
>   that this lib doesn't need a valid context FPU. So we have to make
>   sure the FPU context is right.

About this bug, I think it's even worse, the littleCMS lib may use
floating point that's why i moved the femms call before the cms call.

But our code should restore the mmx registers it uses after the cms call
too !

I even have a doubt about the SSE version as ia32 and x86_64 ABIs don't
require any xmm register to be preserved accross function calls iirc.

See section 3.2.1 Registers and the Stack Frame from
http://www.x86-64.org/documentation/abi.pdf

So if we expect from registers to hold values such as 65535.f, we should
restore them...

The current code is error prone if littleCMS is ever optimized for use
with SSE or MMX/3DNow or FPU on x86/x86_64 CPUs.

-- 
Edouard Gomez

_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev

Reply via email to