tcg: Constify tcg_code_gen_epilogue
Now that all native tcg hosts support splitwx, make this pointer const. Reviewed-by: Joelle van Dyne <j@getutm.app> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
de2fac62d2
commit
c8bc1168ad
|
@ -677,7 +677,7 @@ struct TCGContext {
|
||||||
|
|
||||||
extern TCGContext tcg_init_ctx;
|
extern TCGContext tcg_init_ctx;
|
||||||
extern __thread TCGContext *tcg_ctx;
|
extern __thread TCGContext *tcg_ctx;
|
||||||
extern void *tcg_code_gen_epilogue;
|
extern const void *tcg_code_gen_epilogue;
|
||||||
extern uintptr_t tcg_splitwx_diff;
|
extern uintptr_t tcg_splitwx_diff;
|
||||||
extern TCGv_env cpu_env;
|
extern TCGv_env cpu_env;
|
||||||
|
|
||||||
|
|
|
@ -2900,8 +2900,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
|
||||||
* Return path for goto_ptr. Set return value to 0, a-la exit_tb,
|
* Return path for goto_ptr. Set return value to 0, a-la exit_tb,
|
||||||
* and fall through to the rest of the epilogue.
|
* and fall through to the rest of the epilogue.
|
||||||
*/
|
*/
|
||||||
/* TODO: Cast goes away when all hosts converted */
|
tcg_code_gen_epilogue = tcg_splitwx_to_rx(s->code_ptr);
|
||||||
tcg_code_gen_epilogue = (void *)tcg_splitwx_to_rx(s->code_ptr);
|
|
||||||
tcg_out_movi(s, TCG_TYPE_REG, TCG_REG_X0, 0);
|
tcg_out_movi(s, TCG_TYPE_REG, TCG_REG_X0, 0);
|
||||||
|
|
||||||
/* TB epilogue */
|
/* TB epilogue */
|
||||||
|
|
|
@ -2301,8 +2301,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
|
||||||
* Return path for goto_ptr. Set return value to 0, a-la exit_tb,
|
* Return path for goto_ptr. Set return value to 0, a-la exit_tb,
|
||||||
* and fall through to the rest of the epilogue.
|
* and fall through to the rest of the epilogue.
|
||||||
*/
|
*/
|
||||||
/* TODO: Cast goes away when all hosts converted */
|
tcg_code_gen_epilogue = tcg_splitwx_to_rx(s->code_ptr);
|
||||||
tcg_code_gen_epilogue = (void *)tcg_splitwx_to_rx(s->code_ptr);
|
|
||||||
tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_R0, 0);
|
tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_R0, 0);
|
||||||
tcg_out_epilogue(s);
|
tcg_out_epilogue(s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3804,8 +3804,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
|
||||||
* Return path for goto_ptr. Set return value to 0, a-la exit_tb,
|
* Return path for goto_ptr. Set return value to 0, a-la exit_tb,
|
||||||
* and fall through to the rest of the epilogue.
|
* and fall through to the rest of the epilogue.
|
||||||
*/
|
*/
|
||||||
/* TODO: Cast goes away when all hosts converted */
|
tcg_code_gen_epilogue = tcg_splitwx_to_rx(s->code_ptr);
|
||||||
tcg_code_gen_epilogue = (void *)tcg_splitwx_to_rx(s->code_ptr);
|
|
||||||
tcg_out_movi(s, TCG_TYPE_REG, TCG_REG_EAX, 0);
|
tcg_out_movi(s, TCG_TYPE_REG, TCG_REG_EAX, 0);
|
||||||
|
|
||||||
/* TB epilogue */
|
/* TB epilogue */
|
||||||
|
|
|
@ -2473,8 +2473,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
|
||||||
* Return path for goto_ptr. Set return value to 0, a-la exit_tb,
|
* Return path for goto_ptr. Set return value to 0, a-la exit_tb,
|
||||||
* and fall through to the rest of the epilogue.
|
* and fall through to the rest of the epilogue.
|
||||||
*/
|
*/
|
||||||
/* TODO: Cast goes away when all hosts converted */
|
tcg_code_gen_epilogue = tcg_splitwx_to_rx(s->code_ptr);
|
||||||
tcg_code_gen_epilogue = (void *)tcg_splitwx_to_rx(s->code_ptr);
|
|
||||||
tcg_out_mov(s, TCG_TYPE_REG, TCG_REG_V0, TCG_REG_ZERO);
|
tcg_out_mov(s, TCG_TYPE_REG, TCG_REG_V0, TCG_REG_ZERO);
|
||||||
|
|
||||||
/* TB epilogue */
|
/* TB epilogue */
|
||||||
|
|
|
@ -2346,8 +2346,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
|
||||||
tcg_out32(s, BCCTR | BO_ALWAYS);
|
tcg_out32(s, BCCTR | BO_ALWAYS);
|
||||||
|
|
||||||
/* Epilogue */
|
/* Epilogue */
|
||||||
/* TODO: Cast goes away when all hosts converted */
|
tcg_code_gen_epilogue = tcg_splitwx_to_rx(s->code_ptr);
|
||||||
tcg_code_gen_epilogue = (void *)tcg_splitwx_to_rx(s->code_ptr);
|
|
||||||
|
|
||||||
tcg_out_ld(s, TCG_TYPE_PTR, TCG_REG_R0, TCG_REG_R1, FRAME_SIZE+LR_OFFSET);
|
tcg_out_ld(s, TCG_TYPE_PTR, TCG_REG_R0, TCG_REG_R1, FRAME_SIZE+LR_OFFSET);
|
||||||
for (i = 0; i < ARRAY_SIZE(tcg_target_callee_save_regs); ++i) {
|
for (i = 0; i < ARRAY_SIZE(tcg_target_callee_save_regs); ++i) {
|
||||||
|
|
|
@ -1784,8 +1784,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
|
||||||
tcg_out_opc_imm(s, OPC_JALR, TCG_REG_ZERO, tcg_target_call_iarg_regs[1], 0);
|
tcg_out_opc_imm(s, OPC_JALR, TCG_REG_ZERO, tcg_target_call_iarg_regs[1], 0);
|
||||||
|
|
||||||
/* Return path for goto_ptr. Set return value to 0 */
|
/* Return path for goto_ptr. Set return value to 0 */
|
||||||
/* TODO: Cast goes away when all hosts converted */
|
tcg_code_gen_epilogue = tcg_splitwx_to_rx(s->code_ptr);
|
||||||
tcg_code_gen_epilogue = (void *)tcg_splitwx_to_rx(s->code_ptr);
|
|
||||||
tcg_out_mov(s, TCG_TYPE_REG, TCG_REG_A0, TCG_REG_ZERO);
|
tcg_out_mov(s, TCG_TYPE_REG, TCG_REG_A0, TCG_REG_ZERO);
|
||||||
|
|
||||||
/* TB epilogue */
|
/* TB epilogue */
|
||||||
|
|
|
@ -2551,8 +2551,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
|
||||||
* Return path for goto_ptr. Set return value to 0, a-la exit_tb,
|
* Return path for goto_ptr. Set return value to 0, a-la exit_tb,
|
||||||
* and fall through to the rest of the epilogue.
|
* and fall through to the rest of the epilogue.
|
||||||
*/
|
*/
|
||||||
/* TODO: Cast goes away when all hosts converted */
|
tcg_code_gen_epilogue = tcg_splitwx_to_rx(s->code_ptr);
|
||||||
tcg_code_gen_epilogue = (void *)tcg_splitwx_to_rx(s->code_ptr);
|
|
||||||
tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_R2, 0);
|
tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_R2, 0);
|
||||||
|
|
||||||
/* TB epilogue */
|
/* TB epilogue */
|
||||||
|
|
|
@ -1039,8 +1039,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
|
||||||
tcg_out_nop(s);
|
tcg_out_nop(s);
|
||||||
|
|
||||||
/* Epilogue for goto_ptr. */
|
/* Epilogue for goto_ptr. */
|
||||||
/* TODO: Cast goes away when all hosts converted */
|
tcg_code_gen_epilogue = tcg_splitwx_to_rx(s->code_ptr);
|
||||||
tcg_code_gen_epilogue = (void *)tcg_splitwx_to_rx(s->code_ptr);
|
|
||||||
tcg_out_arithi(s, TCG_REG_G0, TCG_REG_I7, 8, RETURN);
|
tcg_out_arithi(s, TCG_REG_G0, TCG_REG_I7, 8, RETURN);
|
||||||
/* delay slot */
|
/* delay slot */
|
||||||
tcg_out_movi_imm13(s, TCG_REG_O0, 0);
|
tcg_out_movi_imm13(s, TCG_REG_O0, 0);
|
||||||
|
|
|
@ -161,7 +161,7 @@ static int tcg_out_ldst_finalize(TCGContext *s);
|
||||||
static TCGContext **tcg_ctxs;
|
static TCGContext **tcg_ctxs;
|
||||||
static unsigned int n_tcg_ctxs;
|
static unsigned int n_tcg_ctxs;
|
||||||
TCGv_env cpu_env = 0;
|
TCGv_env cpu_env = 0;
|
||||||
void *tcg_code_gen_epilogue;
|
const void *tcg_code_gen_epilogue;
|
||||||
uintptr_t tcg_splitwx_diff;
|
uintptr_t tcg_splitwx_diff;
|
||||||
|
|
||||||
#ifndef CONFIG_TCG_INTERPRETER
|
#ifndef CONFIG_TCG_INTERPRETER
|
||||||
|
|
Loading…
Reference in a new issue