Regarding cmp / jg, jle, etc in AT&T syntax assembly

前端 未结 2 428
说谎
说谎 2021-01-22 16:23

So every single resource online tells me that something like this:

cmp %eax, %ebx
jg < something >

would jump to < something > if eax

2条回答
  •  日久生厌
    2021-01-22 16:58

    See if THIS ANSWER helps you. If not, ask for clarification.

    Scroll down past the other guy's source code and stuff in that answer to search for this string...

    This biz, the cmpl %eax,%edx instruction, is one of the forms of the "compare" instructions

    I wrote an explanation of the "sense" of CMP and various conditional jumps. See if it answers your questions here.

    If you are still confused, post a note here and someone else may give you a better answer.

    Hope it helps.

提交回复
热议问题