doukong5394 2015-05-10 01:06
浏览 259
已采纳

Go的汇编程序的条件跳转指令是什么?

Go's 6a assembler has conditional jump instructions:

JCC
JCS
JCXZL
JEQ
JGE
JGT
JHI
JLE
JLS
JLT
JMI
JNE
JOC
JOS
JPC
JPL
JPS

But how do they map to x86 conditional jumps?

  • 写回答

2条回答 默认 最新

  • dongliang9682 2015-05-10 01:06
    关注

    I'm answering this so I don't lose the information, and so other people don't have to go through the same sleuthing game as me. Looking at optab.c and the x86 jumps we can match up the instruction encodings to solve the puzzle.

    JCC     JAE
    JCS     JB
    JCXZL   JECXZ
    JEQ     JE,JZ
    JGE     JGE
    JGT     JG
    JHI     JA
    JLE     JLE
    JLS     JBE
    JLT     JL
    JMI     JS
    JNE     JNE, JNZ
    JOC     JNO
    JOS     JO
    JPC     JNP, JPO
    JPL     JNS
    JPS     JP, JPE
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?