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 


How works exactly movups and movaps

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
TheFireAnubis
Newbie cheater
Reputation: 0

Joined: 29 Nov 2018
Posts: 10

PostPosted: Wed Apr 07, 2021 8:17 am    Post subject: How works exactly movups and movaps Reply with quote

I'm trying to understand the xmm registers better. So I played around with the xmm registers until something went wrong.
I have a value (let's name it fltValue) that contains four floats.

Code:
fltValue:
  dd (float)3.12
  dd (float)4.36
  dd (float)14.03
  dd (float)7.74


And when I do this, that doesn't work!

Code:
movaps xmm0,[fltValue]


I edit because I just tried with movups and it works but in this case why my four values ​​are not aligned?

So I am wondering why this is not working, thanks in advance for your help.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 90

Joined: 06 Jul 2014
Posts: 2921

PostPosted: Wed Apr 07, 2021 10:25 am    Post subject: Reply with quote

Quote:
When the source or destination operand is a memory operand, the operand must be aligned on a 16-byte (128-bit version), 32-byte (VEX.256 encoded version) or 64-byte (EVEX.512 encoded version) boundary or a general-protection exception (#GP) will be generated.
https://www.felixcloutier.com/x86/movaps
tldr: you need 16 byte alignment, not just 4 byte alignment (floats).
Code:
alloc(foo,32)
label(fltValue)
foo:
  align 10 cc
fltValue:
  dd...

_________________
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
TheFireAnubis
Newbie cheater
Reputation: 0

Joined: 29 Nov 2018
Posts: 10

PostPosted: Wed Apr 07, 2021 10:40 am    Post subject: Reply with quote

Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions 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