View previous topic :: View next topic |
Author |
Message |
Meiyoh Master Cheater Reputation: 1
Joined: 14 Mar 2015 Posts: 400
|
Posted: Sun Apr 11, 2021 12:35 pm Post subject: How to decrease/increase value of XMM0? |
|
|
code:
adds xmm0,(float)300
movdqa [rcx+10],xmm0
jmp return
doesnt work
i want XMM0 to be decreased by float 300 but it does not work
so for example when game works it always decreases the value by 300 float before adding it to the rcx register?
_________________
I am the forgotten one the dead one. |
|
Back to top |
|
|
Oxijen Expert Cheater Reputation: 0
Joined: 07 May 2020 Posts: 163 Location: On The Moon
|
Posted: Sun Apr 11, 2021 12:44 pm Post subject: |
|
|
Code: | mov rax,1.0
movq xmm1,rax
addsd xmm0,xmm1 |
this would probably work on x64
_________________
I can see you Hitler
Especially When I am On the Moon!!
You are Right now in cheat engine forum |
|
Back to top |
|
|
Meiyoh Master Cheater Reputation: 1
Joined: 14 Mar 2015 Posts: 400
|
Posted: Sun Apr 11, 2021 1:25 pm Post subject: |
|
|
Oxijen wrote: | Code: | mov rax,1.0
movq xmm1,rax
addsd xmm0,xmm1 |
this would probably work on x64 |
this adds correct?
1.0 to the xmm0
and thanks btw
_________________
I am the forgotten one the dead one. |
|
Back to top |
|
|
MMM-304 Expert Cheater Reputation: 0
Joined: 17 Aug 2020 Posts: 166 Location: Milkey Way
|
Posted: Wed Apr 14, 2021 8:20 am Post subject: |
|
|
This way it will add to only lowest 4 bytes (a float) value
Code: |
push (float)300
addss xmm0,[rsp]
add rsp,8
|
This way it will add to all 4 bytes (all 4-floats) value, same amount (cuz you are using packed data in movdqa [rcx+10],xmm0)
Code: |
sub rsp,#16
movups [rsp],xmm1 //;backing up xmm1
push (float)300
movss xmm1,[rsp]
shufps xmm1,xmm1,0
addss xmm0,xmm1
add rsp,8
movups xmm1,[rsp] //;restoring xmm1
add rsp,#16
|
Last edited by MMM-304 on Wed Apr 14, 2021 10:52 am; edited 1 time in total |
|
Back to top |
|
|
Meiyoh Master Cheater Reputation: 1
Joined: 14 Mar 2015 Posts: 400
|
Posted: Wed Apr 14, 2021 10:03 am Post subject: |
|
|
MMM-304 wrote: | This way it will add to only lowest 4 bytes (a float) value
Code: |
push (float)300
addss xmm0,[rsp]
add rsp,8
|
This way it will add to all 4 bytes (all 4-floats) value, same amount (cuz you are using packed data in movdqa [rcx+10],xmm0)
Code: |
sub rsp,#16
movups [rsp],xmm1 //;backing up xmm1
push (float)300
movss xmm1,[rsp]
shups xmm1,xmm1,0
addss xmm0,xmm1
add rsp,8
movups xmm1,[rsp] //;restoring xmm1
add rsp,#16
|
|
Hello thank you very much
However it gives me error with this line :
shups xmm1,xmm1,0
_________________
I am the forgotten one the dead one. |
|
Back to top |
|
|
MMM-304 Expert Cheater Reputation: 0
Joined: 17 Aug 2020 Posts: 166 Location: Milkey Way
|
Posted: Wed Apr 14, 2021 10:53 am Post subject: |
|
|
oh it was a typo, fixed it (its actually shufps)
|
|
Back to top |
|
|
Meiyoh Master Cheater Reputation: 1
Joined: 14 Mar 2015 Posts: 400
|
|
Back to top |
|
|
|