Branch Insts

Tracking the implementation of branch instructions in MIPS target.

References:

Branches is translated in function gen_compute_branch:

gen_compute_branch

Call path:

// target/mips/translate.c

mips_tr_translate_insn()
--> decode_opc() // !(ctx->hflags & MIPS_HFLAG_M16)
    --> gen_compute_branch() // OPC_{BGEZ, BLTZAL, BGEZAL, BPOSGE64, JAL, BLEZC, BGTZC, BLEZALC, BGTZALC, BEQ, BNE, BC1EQZ, BC1NEZ, BC1, ...}
    --> decode_opc_special()
        --> gen_compute_branch() // OPC_JALR
        --> decode_opc_special_tx79() // default: INSN_R5900
            --> gen_compute_branch()
        --> decode_opc_special_legacy() // default: else
            --> gen_compute_branch()
--> decode_micromips_opc() // ctx->insn_flags & ASE_MICROMIPS
    --> decode_micromips32_opc()
        --> gen_compute_branch() // POOL32I -> BLTZ/BLTZAL/BLTZALS/BGEZ/BGEZAL/...

More

Created Sep 16, 2020 // Last Updated Sep 16, 2020

If you could revise
the fundmental principles of
computer system design
to improve security...

... what would you change?