1. FPU push 436
fild dword ptr [esp]
fstp dword ptr [esp]
pop eax
2. integer instructions mov eax,-436
or eax,eax
jz @f
cdq ; if eax <0 then edx:=-1 else edx:=0
xor eax,edx
sub eax,edx; eax:=|eax|
and edx,256; Sign bit
bsr ecx,eax
ror eax,cl
add eax,edx
lea eax,[eax+ecx+126]
rol eax,23;eax=0C3DA0000h=-436.0
@@:
3. SSE mov eax,436
cvtsi2ss xmm0,eax
movd eax,xmm0
Are there other ways to solve this problem yet? (https://wasm.in/styles/smiles_s/scratch_one-s_head.gif)
deleted
Hi, nidud!
It is not known what integer will appear in EAX-register (https://wasm.in/styles/smiles_s/mosking.gif)
deleted
MASM in 64 bit has no problems loading a floating point value into the right sized integer register, REAL4 = 32 bit, REAL8 = 64 bit but they are not integer values, they are still in floating point format. If you want integer output from floating point, use "fistp".
Olá Mikl__ !
Very well. With SSE, to convert 4 integers to real4 we may use cvtdq2ps :biggrin: . In this way
i start the elements of an allocated matrix with 1,2,3,4,5,... converted to real4 1.0,2.0,3.0,4.0,5.0,... It is used to test SSE procedures. Is there a better way ?
yes, cvtdq2ps :biggrin:
deleted
If it's just a matter of "representing" you can actually treat the integer as an ascii value and append then a ".0" to the end of the string in some buffer where it's stored. :idea:
thank you all for the help! (https://wasm.in/styles/smiles_s/thank_you.gif)