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 to compare xmm0(double)>0 or <0 then jmp

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
cancandodo
Advanced Cheater
Reputation: 0

Joined: 09 Mar 2012
Posts: 70

PostPosted: Sun Sep 28, 2025 10:37 pm    Post subject: how to compare xmm0(double)>0 or <0 then jmp Reply with quote

alloc(testpoint,10)
testpoint:
registerSymbol(testpoint)
db 0 0 0 0 0 0 0 0

=============
comisd xmm0,[testpoint]
jg code


can not work
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Mon Sep 29, 2025 10:36 am    Post subject: Reply with quote

Instead of `jg` (jump if greater) use `je` (jump if equal) or `jne` (jump if not equal). If the value is not equal to 0, then it's either greater than 0 or less than 0.

Also instead of `db 0 0 0 0 0 0 0 0` use `dq (double)0`. This is the same thing, but it's easier to read.

_________________
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
Csimbi
I post too much
Reputation: 97

Joined: 14 Jul 2007
Posts: 3324

PostPosted: Tue Sep 30, 2025 12:27 pm    Post subject: Reply with quote

Intel manual:
Quote:
COMISD (All Versions)
RESULT := OrderedCompare(DEST[63:0] <> SRC[63:0]) {
(* Set EFLAGS *) CASE (RESULT) OF
UNORDERED: ZF,PF,CF := 111;
GREATER_THAN: ZF,PF,CF := 000;
LESS_THAN: ZF,PF,CF := 001;
EQUAL: ZF,PF,CF := 100;
ESAC;
OF, AF, SF := 0; }


I.e.
Code:
UNORDERED:    ZF,PF,CF 111; jz/jp/jc
EQUAL:        ZF,PF,CF 100; jz  - covers UNORDERED, too.
LESS_THAN:    ZF,PF,CF 001; jc - covers UNORDERED, too.
GREATER_THAN: ZF,PF,CF 000; jnc - covers UNORDERED, too.

So, instead of je, jg, use these.
You will always want to skip if parity, then you can use the others to do what you need to.
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