So every single resource online tells me that something like this:
cmp %eax, %ebx
jg < something >
would jump to < something > if eax was greater than ebx. But I have another piece of code that seems to contradict this:
cmp $0x2, %eax
jg < something>
as it jumps to < something > when eax has the value 3.
Am I missing something, or does cmp a, b - jg execute if b > a and not a>b? And does this apply to other jump statements as well?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…