mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
accel/tcg: Add pc and host_pc params to gen_intermediate_code
Pass these along to translator_loop -- pc may be used instead of tb->pc, and host_pc is currently unused. Adjust all targets at one time. Acked-by: Alistair Francis <alistair.francis@wdc.com> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Tested-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
@@ -39,7 +39,6 @@ typedef ram_addr_t tb_page_addr_t;
|
||||
#define TB_PAGE_ADDR_FMT RAM_ADDR_FMT
|
||||
#endif
|
||||
|
||||
void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_insns);
|
||||
void restore_state_to_opc(CPUArchState *env, TranslationBlock *tb,
|
||||
target_ulong *data);
|
||||
|
||||
|
||||
@@ -26,6 +26,19 @@
|
||||
#include "exec/translate-all.h"
|
||||
#include "tcg/tcg.h"
|
||||
|
||||
/**
|
||||
* gen_intermediate_code
|
||||
* @cpu: cpu context
|
||||
* @tb: translation block
|
||||
* @max_insns: max number of instructions to translate
|
||||
* @pc: guest virtual program counter address
|
||||
* @host_pc: host physical program counter address
|
||||
*
|
||||
* This function must be provided by the target, which should create
|
||||
* the target-specific DisasContext, and then invoke translator_loop.
|
||||
*/
|
||||
void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_insns,
|
||||
target_ulong pc, void *host_pc);
|
||||
|
||||
/**
|
||||
* DisasJumpType:
|
||||
@@ -123,11 +136,13 @@ typedef struct TranslatorOps {
|
||||
|
||||
/**
|
||||
* translator_loop:
|
||||
* @ops: Target-specific operations.
|
||||
* @db: Disassembly context.
|
||||
* @cpu: Target vCPU.
|
||||
* @tb: Translation block.
|
||||
* @max_insns: Maximum number of insns to translate.
|
||||
* @pc: guest virtual program counter address
|
||||
* @host_pc: host physical program counter address
|
||||
* @ops: Target-specific operations.
|
||||
* @db: Disassembly context.
|
||||
*
|
||||
* Generic translator loop.
|
||||
*
|
||||
@@ -141,8 +156,9 @@ typedef struct TranslatorOps {
|
||||
* - When single-stepping is enabled (system-wide or on the current vCPU).
|
||||
* - When too many instructions have been translated.
|
||||
*/
|
||||
void translator_loop(const TranslatorOps *ops, DisasContextBase *db,
|
||||
CPUState *cpu, TranslationBlock *tb, int max_insns);
|
||||
void translator_loop(CPUState *cpu, TranslationBlock *tb, int max_insns,
|
||||
target_ulong pc, void *host_pc,
|
||||
const TranslatorOps *ops, DisasContextBase *db);
|
||||
|
||||
void translator_loop_temp_check(DisasContextBase *db);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user