Posted: Mon Jun 05, 2017 12:10 pm Post subject: Need some explanations about this opcode, thanks.
The code is like this:
Code:
movd xmm0,[ebp+01] -- the value in [ebp+01] is "0000004B" in hex, which is "(double)0.01"
add esp,04 -- do something to the stack
cvtdq2ps xmm0,xmm0 -- ????
After "cvtdq2ps xmm0,xmm0", the value in xmm0 is: "75.00 - 0.00 - 0.00 - 0.00". So, "0000004b" is turned into "42960000", but how?
So, what exactly does "cvtdp2ps" do? What's its equivalent in C++ or C#? _________________
There are 16 bytes of data in each xmm register. The cvtdq2ps instruction first treats the data in the source operand as 4 4-byte signed integers. Then, it converts those integers to single-precision floats and stores those floats in the respective positions in the destination xmm register. _________________
I don't know where I'm going, but I'll figure it out when I get there.
There are 16 bytes of data in each xmm register. The cvtdq2ps instruction first treats the data in the source operand as 4 4-byte signed integers. Then, it converts those integers to single-precision floats and stores those floats in the respective positions in the destination xmm register.
Thanks Penguin, your link is very helpful. _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum