Using fisttp instruction from SSE3 in vc++

  • Thread starter Thread starter thomsen.anders
  • Start date Start date
T

thomsen.anders

Hi all,

I have an algorithm that truncates doubles to ints for several
minutes. I'm trying to make it go faster.
Currently, I'm using
(int)d;
to do it. I reckon that if I can use the fisttp instruction from SSE3
it would speed things up. However, VS.Net 2005/2008 only has support
for SSE2 instructions. I've never done assembly before.

Does anyone know if this is possible?

Happy holidays,
Anders
 
Hi Anders,

if the VC++ Compiler does not use this instruction,
then you can write e.g, a library with NASM and
import the functions into your application. Writing
such a import library with inline function call in nasm
is not a big task, since you have to use little assembly.

Have a look at NASM Docs:
http://webster.cs.ucr.edu/AsmTools/NASM/Doc/index.html
Search for the word "export"

See here for the "FISTTP " instruction:
http://www.intel.com/cd/ids/developer/asmo-na/eng/dc/xeon/knowledgebase/83759.htm


But keep in your mind: Your Target CPU must be able to
decode the instructions and use them!

Regards

Kerem

--
 
Back
Top