Inst Trans

References:

decode_opc

Call path:

// cpu_exec ---> translator_loop
cpu_exec
   => tb_find
      => if (not found): tb_gen_code // accel/tcg/translate-all.c 
         => gen_intermediate_code // target/mips/translate.c 
            => translator_loop

// translator_loop calling callbacks
translator_loop  // accel/tcg/translator.c
=> ops->translate_insn 
   => mips_tr_translate_insn // target/mips/translate.c
   => riscv_tr_translate_insn // target/mips/translate.c

// impl of translate_insn

mips_tr_ops.translate_insn
= mips_tr_translate_insn // registered call back // target/mips/translate.c
   => decode_opc         // target/mips/translate.c
   => decode_micromips_opc  // target/mips/translate.c

Steps:

  • check instruction address is on word boundary: ctx->base.pc_next

More

Created Aug 11, 2020 // Last Updated Aug 12, 2020

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

... what would you change?