Due to optimization reasons I thought about calling directly (with inline assembler)
to the functions “fldl” and “fist”. Sadly I don’t get how to run it since i’m not that god in assembler.
i didn’t get further than this:
double* input;
long long output;
__asm fldl input;
__asm fist output;
__asm fld inputwill actually attempt to read your pointer value as if it were a floating-point value. If you want to read a floating-point value pointed by a pointer, you have to go through a two-step process: read the address into a register and then read the data using the address in the register. On a 32-bit platform it will be something along the lines ofI just tried it in VS2005 and it works. (Note that as other people stated in the comments,
fistdoes not support storing to 64-bitlong long, whilefistpdoes. But you probably needfistpanyway, i.e. a popping store.)