Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Need some explanations about this opcode, thanks.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Mon Jun 05, 2017 12:10 pm    Post subject: Need some explanations about this opcode, thanks. Reply with quote

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#?

_________________
**************

A simple example is better then ten links. Very Happy
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4706

PostPosted: Mon Jun 05, 2017 12:51 pm    Post subject: Reply with quote

http://x86.renejeschke.de/html/file_module_x86_id_47.html

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.
Back to top
View user's profile Send private message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Mon Jun 05, 2017 3:58 pm    Post subject: Reply with quote

ParkourPenguin wrote:
http://x86.renejeschke.de/html/file_module_x86_id_47.html

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.

_________________
**************

A simple example is better then ten links. Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites