I am trying to understand assembly to be able to solve a puzzle. However I encountered the following instructions:
0x0000000000401136 <+44>: cmpl $0x7,0x14(%rsp)
0x000000000040113b <+49>: ja 0x401230 <phase_3+294>
What I think it's doing is:
The value of 0x14(%rsp)
is -7380. According to my understanding cmpl
compares unsigned. Also the jump is performed.
So can it be that (unsigned)-7380 > 7
--> jump
I actually don't want it to jump. But is this the correct explanation or not? Am I flipping arguments?
Also if you have any advice about how to manipulate this jump!
cmpl
. I re-added thex86
tag (along with AT&T, which this question is specific to. Well I guess goasm syntax for x86 also uses operand-size suffixes...) – Enmity