From: Philippe Mathieu-Daudé <[email protected]> In order to avoid symbol name clash when building a single binary, rename TCG helpers prefixing with the target name.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Brian Cain <[email protected]> Reviewed-by: Pierrick Bouvier <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- target/hexagon/gen_tcg.h | 2 +- target/hexagon/helper.h | 2 +- target/i386/helper.h | 2 +- target/m68k/helper.h | 2 +- target/microblaze/helper.h | 2 +- target/ppc/helper.h | 2 +- target/sparc/helper.h | 2 +- target/hexagon/op_helper.c | 2 +- target/hexagon/translate.c | 2 +- target/i386/tcg/excp_helper.c | 2 +- target/i386/tcg/translate.c | 2 +- target/m68k/op_helper.c | 2 +- target/m68k/translate.c | 2 +- target/microblaze/op_helper.c | 2 +- target/microblaze/translate.c | 2 +- target/ppc/tcg-excp_helper.c | 2 +- target/ppc/translate.c | 6 +++--- target/sparc/helper.c | 2 +- target/sparc/translate.c | 6 +++--- 19 files changed, 23 insertions(+), 23 deletions(-) diff --git a/target/hexagon/gen_tcg.h b/target/hexagon/gen_tcg.h index 0159e5c2d5f..e9d3aece85d 100644 --- a/target/hexagon/gen_tcg.h +++ b/target/hexagon/gen_tcg.h @@ -1345,7 +1345,7 @@ uiV = uiV; \ tcg_gen_movi_tl(hex_gpr[HEX_REG_PC], ctx->pkt.pc); \ TCGv excp = tcg_constant_tl(HEX_EVENT_TRAP0); \ - gen_helper_raise_exception(tcg_env, excp); \ + gen_helper_hexagon_raise_exception(tcg_env, excp); \ } while (0) #endif diff --git a/target/hexagon/helper.h b/target/hexagon/helper.h index 64456822bc1..021f9364ad8 100644 --- a/target/hexagon/helper.h +++ b/target/hexagon/helper.h @@ -18,7 +18,7 @@ #include "internal.h" #include "helper_protos_generated.h.inc" -DEF_HELPER_FLAGS_2(raise_exception, TCG_CALL_NO_RETURN, noreturn, env, i32) +DEF_HELPER_FLAGS_2(hexagon_raise_exception, TCG_CALL_NO_RETURN, noreturn, env, i32) DEF_HELPER_2(commit_store, void, env, int) DEF_HELPER_3(gather_store, void, env, i32, int) DEF_HELPER_1(commit_hvx_stores, void, env) diff --git a/target/i386/helper.h b/target/i386/helper.h index 3f67098f11f..8099c40cc90 100644 --- a/target/i386/helper.h +++ b/target/i386/helper.h @@ -56,7 +56,7 @@ DEF_HELPER_2(syscall, void, env, int) DEF_HELPER_2(sysret, void, env, int) DEF_HELPER_FLAGS_1(pause, TCG_CALL_NO_WG, noreturn, env) DEF_HELPER_FLAGS_3(raise_interrupt, TCG_CALL_NO_WG, noreturn, env, int, int) -DEF_HELPER_FLAGS_2(raise_exception, TCG_CALL_NO_WG, noreturn, env, int) +DEF_HELPER_FLAGS_2(x86_raise_exception, TCG_CALL_NO_WG, noreturn, env, int) DEF_HELPER_FLAGS_1(icebp, TCG_CALL_NO_WG, noreturn, env) DEF_HELPER_3(boundw, void, env, tl, int) DEF_HELPER_3(boundl, void, env, tl, int) diff --git a/target/m68k/helper.h b/target/m68k/helper.h index 0bda8f8152d..a76d455cde1 100644 --- a/target/m68k/helper.h +++ b/target/m68k/helper.h @@ -111,7 +111,7 @@ DEF_HELPER_3(set_mac_extu, void, env, i32, i32) DEF_HELPER_2(flush_flags, void, env, i32) DEF_HELPER_2(set_ccr, void, env, i32) DEF_HELPER_FLAGS_1(get_ccr, TCG_CALL_NO_WG_SE, i32, env) -DEF_HELPER_2(raise_exception, noreturn, env, i32) +DEF_HELPER_2(m68k_raise_exception, noreturn, env, i32) DEF_HELPER_FLAGS_3(bfffo_reg, TCG_CALL_NO_RWG_SE, i32, i32, i32, i32) diff --git a/target/microblaze/helper.h b/target/microblaze/helper.h index 1429c1727ef..e589a8422f0 100644 --- a/target/microblaze/helper.h +++ b/target/microblaze/helper.h @@ -1,4 +1,4 @@ -DEF_HELPER_FLAGS_2(raise_exception, TCG_CALL_NO_WG, noreturn, env, i32) +DEF_HELPER_FLAGS_2(microblaze_raise_exception, TCG_CALL_NO_WG, noreturn, env, i32) DEF_HELPER_FLAGS_3(divs, TCG_CALL_NO_WG, i32, env, i32, i32) DEF_HELPER_FLAGS_3(divu, TCG_CALL_NO_WG, i32, env, i32, i32) diff --git a/target/ppc/helper.h b/target/ppc/helper.h index e99c8c824b4..3548af5f1c0 100644 --- a/target/ppc/helper.h +++ b/target/ppc/helper.h @@ -1,5 +1,5 @@ DEF_HELPER_FLAGS_3(raise_exception_err, TCG_CALL_NO_WG, noreturn, env, i32, i32) -DEF_HELPER_FLAGS_2(raise_exception, TCG_CALL_NO_WG, noreturn, env, i32) +DEF_HELPER_FLAGS_2(ppc_raise_exception, TCG_CALL_NO_WG, noreturn, env, i32) DEF_HELPER_FLAGS_4(TW, TCG_CALL_NO_WG, void, env, tl, tl, i32) #if defined(TARGET_PPC64) DEF_HELPER_FLAGS_4(TD, TCG_CALL_NO_WG, void, env, tl, tl, i32) diff --git a/target/sparc/helper.h b/target/sparc/helper.h index 3a7f7dc1296..6de773445fe 100644 --- a/target/sparc/helper.h +++ b/target/sparc/helper.h @@ -53,7 +53,7 @@ DEF_HELPER_FLAGS_3(fcmpq, TCG_CALL_NO_WG, i32, env, i128, i128) DEF_HELPER_FLAGS_3(fcmpeq, TCG_CALL_NO_WG, i32, env, i128, i128) DEF_HELPER_FLAGS_3(flcmps, TCG_CALL_NO_RWG_SE, i32, env, f32, f32) DEF_HELPER_FLAGS_3(flcmpd, TCG_CALL_NO_RWG_SE, i32, env, f64, f64) -DEF_HELPER_2(raise_exception, noreturn, env, int) +DEF_HELPER_2(sparc_raise_exception, noreturn, env, int) DEF_HELPER_FLAGS_3(faddd, TCG_CALL_NO_WG, f64, env, f64, f64) DEF_HELPER_FLAGS_3(fsubd, TCG_CALL_NO_WG, f64, env, f64, f64) diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c index 0a946433644..12656259cc4 100644 --- a/target/hexagon/op_helper.c +++ b/target/hexagon/op_helper.c @@ -47,7 +47,7 @@ G_NORETURN void hexagon_raise_exception_err(CPUHexagonState *env, cpu_loop_exit_restore(cs, pc); } -G_NORETURN void HELPER(raise_exception)(CPUHexagonState *env, uint32_t excp) +G_NORETURN void HELPER(hexagon_raise_exception)(CPUHexagonState *env, uint32_t excp) { hexagon_raise_exception_err(env, excp, 0); } diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index 0b9337d9120..5f584accb05 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon/translate.c @@ -119,7 +119,7 @@ intptr_t ctx_tmp_vreg_off(DisasContext *ctx, int regnum, static void gen_exception_raw(int excp) { - gen_helper_raise_exception(tcg_env, tcg_constant_i32(excp)); + gen_helper_hexagon_raise_exception(tcg_env, tcg_constant_i32(excp)); } static void gen_exec_counters(DisasContext *ctx) diff --git a/target/i386/tcg/excp_helper.c b/target/i386/tcg/excp_helper.c index 1eaa602c91d..a603770084a 100644 --- a/target/i386/tcg/excp_helper.c +++ b/target/i386/tcg/excp_helper.c @@ -32,7 +32,7 @@ G_NORETURN void helper_raise_interrupt(CPUX86State *env, int intno, raise_interrupt(env, intno, next_eip_addend); } -G_NORETURN void helper_raise_exception(CPUX86State *env, int exception_index) +G_NORETURN void helper_x86_raise_exception(CPUX86State *env, int exception_index) { raise_exception(env, exception_index); } diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 2115c5cd24b..e15a284ab60 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -1515,7 +1515,7 @@ static void gen_exception(DisasContext *s, int trapno) { gen_update_cc_op(s); gen_update_eip_cur(s); - gen_helper_raise_exception(tcg_env, tcg_constant_i32(trapno)); + gen_helper_x86_raise_exception(tcg_env, tcg_constant_i32(trapno)); s->base.is_jmp = DISAS_NORETURN; } diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index 38f7a689814..7e36aed0cb6 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -553,7 +553,7 @@ G_NORETURN static void raise_exception(CPUM68KState *env, int tt) raise_exception_ra(env, tt, 0); } -void HELPER(raise_exception)(CPUM68KState *env, uint32_t tt) +void HELPER(m68k_raise_exception)(CPUM68KState *env, uint32_t tt) { raise_exception(env, tt); } diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 138c89d3e53..67946c2c20b 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -252,7 +252,7 @@ static void gen_jmp(DisasContext *s, TCGv dest) static void gen_raise_exception(int nr) { - gen_helper_raise_exception(tcg_env, tcg_constant_i32(nr)); + gen_helper_m68k_raise_exception(tcg_env, tcg_constant_i32(nr)); } static void gen_raise_exception_format2(DisasContext *s, int nr, diff --git a/target/microblaze/op_helper.c b/target/microblaze/op_helper.c index 3da0c68da39..488f95de468 100644 --- a/target/microblaze/op_helper.c +++ b/target/microblaze/op_helper.c @@ -62,7 +62,7 @@ uint32_t helper_get(uint32_t id, uint32_t ctrl) return 0xdead0000 | id; } -void helper_raise_exception(CPUMBState *env, uint32_t index) +void helper_microblaze_raise_exception(CPUMBState *env, uint32_t index) { CPUState *cs = env_cpu(env); diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index a93f14d6e09..d767217a869 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -100,7 +100,7 @@ static void t_sync_flags(DisasContext *dc) static void gen_raise_exception(DisasContext *dc, uint32_t index) { - gen_helper_raise_exception(tcg_env, tcg_constant_i32(index)); + gen_helper_microblaze_raise_exception(tcg_env, tcg_constant_i32(index)); dc->base.is_jmp = DISAS_NORETURN; } diff --git a/target/ppc/tcg-excp_helper.c b/target/ppc/tcg-excp_helper.c index b04f07a6377..d71132f0a1f 100644 --- a/target/ppc/tcg-excp_helper.c +++ b/target/ppc/tcg-excp_helper.c @@ -50,7 +50,7 @@ void helper_raise_exception_err(CPUPPCState *env, uint32_t exception, raise_exception_err_ra(env, exception, error_code, 0); } -void helper_raise_exception(CPUPPCState *env, uint32_t exception) +void helper_ppc_raise_exception(CPUPPCState *env, uint32_t exception) { raise_exception_err_ra(env, exception, 0, 0); } diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 3f6d326cef3..d302112840d 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -334,7 +334,7 @@ static void gen_exception_nip(DisasContext *ctx, uint32_t excp, gen_update_nip(ctx, nip); t0 = tcg_constant_i32(excp); - gen_helper_raise_exception(tcg_env, t0); + gen_helper_ppc_raise_exception(tcg_env, t0); ctx->base.is_jmp = DISAS_NORETURN; } @@ -377,8 +377,8 @@ static void gen_debug_exception(DisasContext *ctx, bool rfi_type) gen_load_spr(t0, SPR_BOOKE_DBSR); tcg_gen_ori_tl(t0, t0, dbsr); gen_store_spr(SPR_BOOKE_DBSR, t0); - gen_helper_raise_exception(tcg_env, - tcg_constant_i32(POWERPC_EXCP_DEBUG)); + gen_helper_ppc_raise_exception(tcg_env, + tcg_constant_i32(POWERPC_EXCP_DEBUG)); ctx->base.is_jmp = DISAS_NORETURN; } else { if (!rfi_type) { /* BookS does not single step rfi type instructions */ diff --git a/target/sparc/helper.c b/target/sparc/helper.c index 8de261b0e30..8667f97a63d 100644 --- a/target/sparc/helper.c +++ b/target/sparc/helper.c @@ -33,7 +33,7 @@ void cpu_raise_exception_ra(CPUSPARCState *env, int tt, uintptr_t ra) cpu_loop_exit_restore(cs, ra); } -void helper_raise_exception(CPUSPARCState *env, int tt) +void helper_sparc_raise_exception(CPUSPARCState *env, int tt) { CPUState *cs = env_cpu(env); diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 3156be6a94c..b47c79e8894 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -1048,7 +1048,7 @@ static void gen_exception(DisasContext *dc, int which) { finishing_insn(dc); save_state(dc); - gen_helper_raise_exception(tcg_env, tcg_constant_i32(which)); + gen_helper_sparc_raise_exception(tcg_env, tcg_constant_i32(which)); dc->base.is_jmp = DISAS_NORETURN; } @@ -2811,7 +2811,7 @@ static bool do_tcc(DisasContext *dc, int cond, int cc, /* Trap always. */ if (cond == 8) { save_state(dc); - gen_helper_raise_exception(tcg_env, trap); + gen_helper_sparc_raise_exception(tcg_env, trap); dc->base.is_jmp = DISAS_NORETURN; return true; } @@ -5833,7 +5833,7 @@ static void sparc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) if (e->npc % 4 == 0) { tcg_gen_movi_tl(cpu_npc, e->npc); } - gen_helper_raise_exception(tcg_env, e->excp); + gen_helper_sparc_raise_exception(tcg_env, e->excp); e_next = e->next; g_free(e); -- 2.53.0
