Skip to content

Commit

Permalink
target: Use vaddr in gen_intermediate_code
Browse files Browse the repository at this point in the history
Makes gen_intermediate_code() signature target agnostic so the function
can be called from accel/tcg/translate-all.c without target specifics.

Signed-off-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20240119144024.14289-9-anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
Anton Johansson authored and rth7680 committed Jan 28, 2024
1 parent 61d6a91 commit 32f0c39
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion include/exec/translator.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* 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);
vaddr pc, void *host_pc);

/**
* DisasJumpType:
Expand Down
2 changes: 1 addition & 1 deletion target/alpha/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2971,7 +2971,7 @@ static const TranslatorOps alpha_tr_ops = {
};

void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext dc;
translator_loop(cpu, tb, max_insns, pc, host_pc, &alpha_tr_ops, &dc.base);
Expand Down
2 changes: 1 addition & 1 deletion target/arm/tcg/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -9691,7 +9691,7 @@ static const TranslatorOps thumb_translator_ops = {

/* generate intermediate code for basic block 'tb'. */
void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext dc = { };
const TranslatorOps *ops = &arm_translator_ops;
Expand Down
2 changes: 1 addition & 1 deletion target/avr/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2805,7 +2805,7 @@ static const TranslatorOps avr_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext dc = { };
translator_loop(cs, tb, max_insns, pc, host_pc, &avr_tr_ops, &dc.base);
Expand Down
2 changes: 1 addition & 1 deletion target/cris/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -3172,7 +3172,7 @@ static const TranslatorOps cris_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext dc;
translator_loop(cs, tb, max_insns, pc, host_pc, &cris_tr_ops, &dc.base);
Expand Down
2 changes: 1 addition & 1 deletion target/hexagon/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ static const TranslatorOps hexagon_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext ctx;

Expand Down
2 changes: 1 addition & 1 deletion target/hppa/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -4631,7 +4631,7 @@ static const TranslatorOps hppa_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext ctx;
translator_loop(cs, tb, max_insns, pc, host_pc, &hppa_tr_ops, &ctx.base);
Expand Down
2 changes: 1 addition & 1 deletion target/i386/tcg/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -7088,7 +7088,7 @@ static const TranslatorOps i386_tr_ops = {

/* generate intermediate code for basic block 'tb'. */
void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext dc;

Expand Down
2 changes: 1 addition & 1 deletion target/loongarch/tcg/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ static const TranslatorOps loongarch_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext ctx;

Expand Down
2 changes: 1 addition & 1 deletion target/m68k/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -6088,7 +6088,7 @@ static const TranslatorOps m68k_tr_ops = {
};

void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext dc;
translator_loop(cpu, tb, max_insns, pc, host_pc, &m68k_tr_ops, &dc.base);
Expand Down
2 changes: 1 addition & 1 deletion target/microblaze/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1792,7 +1792,7 @@ static const TranslatorOps mb_tr_ops = {
};

void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext dc;
translator_loop(cpu, tb, max_insns, pc, host_pc, &mb_tr_ops, &dc.base);
Expand Down
2 changes: 1 addition & 1 deletion target/mips/tcg/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -15554,7 +15554,7 @@ static const TranslatorOps mips_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext ctx;

Expand Down
2 changes: 1 addition & 1 deletion target/nios2/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ static const TranslatorOps nios2_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext dc;
translator_loop(cs, tb, max_insns, pc, host_pc, &nios2_tr_ops, &dc.base);
Expand Down
2 changes: 1 addition & 1 deletion target/openrisc/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ static const TranslatorOps openrisc_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext ctx;

Expand Down
2 changes: 1 addition & 1 deletion target/ppc/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -7518,7 +7518,7 @@ static const TranslatorOps ppc_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext ctx;

Expand Down
2 changes: 1 addition & 1 deletion target/riscv/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ static const TranslatorOps riscv_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext ctx;

Expand Down
2 changes: 1 addition & 1 deletion target/rx/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2266,7 +2266,7 @@ static const TranslatorOps rx_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext dc;

Expand Down
2 changes: 1 addition & 1 deletion target/s390x/tcg/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -6547,7 +6547,7 @@ static const TranslatorOps s390x_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext dc;

Expand Down
2 changes: 1 addition & 1 deletion target/sh4/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2317,7 +2317,7 @@ static const TranslatorOps sh4_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext ctx;

Expand Down
2 changes: 1 addition & 1 deletion target/sparc/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -5327,7 +5327,7 @@ static const TranslatorOps sparc_tr_ops = {
};

void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext dc = {};

Expand Down
2 changes: 1 addition & 1 deletion target/tricore/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -8472,7 +8472,7 @@ static const TranslatorOps tricore_tr_ops = {


void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext ctx;
translator_loop(cs, tb, max_insns, pc, host_pc,
Expand Down
2 changes: 1 addition & 1 deletion target/xtensa/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ static const TranslatorOps xtensa_translator_ops = {
};

void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_insns,
target_ulong pc, void *host_pc)
vaddr pc, void *host_pc)
{
DisasContext dc = {};
translator_loop(cpu, tb, max_insns, pc, host_pc,
Expand Down

0 comments on commit 32f0c39

Please sign in to comment.