View Single Post
Old 18th September 2015, 06:02 PM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
Join Date: Feb 2007
Location: In my hat.
Posts: 16,256

Really the type of solution here that I thought would be best is something like a standard math or <float.h> library call that would handle the R4300 precision manipulation in a cross-platform way.

This way, optimizing compilers would compile the standard library call to the _mm_cvtsd_si32 intrinsic with 64-bit compiles and to the 32-bit FP instructions zilmar wrote in his inline asm for 32-bit compiles. Then, we have a win-win and can remove both zilmar's inline asm AND my non-portable SSE2 (64-bit only?) intrinsics work-around.

However, I'm not good at FP stuff and didn't know what to write for that. I chose the FP intrinsics in this case as a "fast fix".
Reply With Quote