Extend risc-v instructions on QEMU

613 Views Asked by At

I want to extend the QEMU TCG (tiny code generator) to accept new instructions for the risc-v guest on my x86 machine. However, I have no experience on how the TCG works, so I was wondering if someone can give me some useful pointers on where to start understanding how the TCG works in the QEMU source code? I know there is a frontend and backend, but I don't really understand where the translation actually happens, and how are the instruction translated.

I also saw the insn32.decode file in target/riscv defining the opcodes for various operators like lui, but I am not sure how that file is used and if it's for the TCG target (ie a risc-v host) or the QEMU guest.

I am looking for something like QEMU - Code Flow [ Instruction cache and TCG] but up-to-date with current QEMU version.

Any help is appreciated.

0

There are 0 best solutions below