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 


Is there a way to push/pop xmm registers?

 
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: Fri Apr 29, 2016 8:00 am    Post subject: Is there a way to push/pop xmm registers? Reply with quote

Is there a way to push/pop xmm registers? If not, is there a workaround?
Back to top
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Fri Apr 29, 2016 9:42 am    Post subject: Reply with quote

workaround:
-alloc your own variable to use as temp storage.
-mov xmm value into edi,ecx,... then,push that register.

Well push&pop are just like copying value and removing value into/from the stack.Its serve as temporary storage when moving data.

I'm sorry if I'm wrong -_-

_________________
...
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Fri Apr 29, 2016 9:46 am    Post subject: Reply with quote

You can also save the xmm directly on the stack.
Push:
Code:
sup esp,10
movdqu [esp],xmm0


Pop:
Code:
movdqu xmm0,[esp]
add esp,10
Back to top
View user's profile Send private message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Fri Apr 29, 2016 10:38 am    Post subject: Reply with quote

hhhuut wrote:
You can also save the xmm directly on the stack.
Push:
Code:
sup esp,10
movdqu [esp],xmm0


Pop:
Code:
movdqu xmm0,[esp]
add esp,10


Oh, got it.
Thanks for both of you. Very Happy

Two more question:
1. Is it "esp,16" or "esp,10"?
2. how to "xor" xmm registers?


Last edited by Dr.Disrespect on Fri Apr 29, 2016 11:47 am; edited 1 time in total
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Fri Apr 29, 2016 11:47 am    Post subject: Reply with quote

Code:
xorps
Back to top
View user's profile Send private message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Fri Apr 29, 2016 11:48 am    Post subject: Reply with quote

hhhuut wrote:
Code:
xorps


Thanks again, Smile

Just in case you did not see my update, is it "esp,16" or "esp,10"? Shouldn't it be 16?
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Fri Apr 29, 2016 11:51 am    Post subject: Reply with quote

dqu = double quadword so 16 decimal bytes, but since CE interprets the number as hex, it's 10.
Back to top
View user's profile Send private message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Fri Apr 29, 2016 11:52 am    Post subject: Reply with quote

hhhuut wrote:
dqu = double quadword so 16 decimal bytes, but since CE interprets the number as hex, it's 10.


Got it, thanks a lot. Very Happy
Back to top
View user's profile Send private message
HSergi
Newbie cheater
Reputation: 0

Joined: 17 Dec 2017
Posts: 22

PostPosted: Mon Feb 01, 2021 5:09 pm    Post subject: Re: Is there a way to push/pop xmm registers? Reply with quote

Dr.Disrespect wrote:
Is there a way to push/pop xmm registers? If not, is there a workaround?

Yes, there is a way: fld and fstp.

Google: "x86 assembly fstp" and "x86 assembly fld". Can't post urls.

So if you want to save XMM register, use XMM register and then restore original value, you'd do this:

Code:

  fld ST(0)
  // do stuff with xmm1
  fstp ST(0)


Why necro? I forgot the instruction syntax for those and googled it. Google found this. People say it's impossible, which is false. Just decided to post for the next person looking for this kind of instructions.

Cheers


Last edited by HSergi on Mon Feb 01, 2021 5:17 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Mon Feb 01, 2021 5:14 pm    Post subject: Reply with quote

fxsave fxrstr is also quite handy
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
FENIX_145
How do I cheat?
Reputation: 0

Joined: 05 Apr 2015
Posts: 5

PostPosted: Fri Sep 16, 2022 8:31 am    Post subject: Reply with quote

Dark Byte wrote:
fxsave fxrstr is also quite handy

Hello. How can I use it sir?
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