mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
Hexagon (target/hexagon) Add overrides for callr
Add overrides for J2_callr J2_callrt J2_callrf Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Reviewed-by: Anton Johansson <anjo@rev.ng> Message-Id: <20230307025828.1612809-3-tsimpson@quicinc.com>
This commit is contained in:
parent
5ef5fdba17
commit
242af2c0b3
3 changed files with 25 additions and 11 deletions
|
@ -682,6 +682,13 @@ static void gen_call(DisasContext *ctx, int pc_off)
|
|||
gen_write_new_pc_pcrel(ctx, pc_off, TCG_COND_ALWAYS, NULL);
|
||||
}
|
||||
|
||||
static void gen_callr(DisasContext *ctx, TCGv new_pc)
|
||||
{
|
||||
TCGv next_PC = tcg_constant_tl(ctx->next_PC);
|
||||
gen_log_reg_write(HEX_REG_LR, next_PC);
|
||||
gen_write_new_pc_addr(ctx, new_pc, TCG_COND_ALWAYS, NULL);
|
||||
}
|
||||
|
||||
static void gen_cond_call(DisasContext *ctx, TCGv pred,
|
||||
TCGCond cond, int pc_off)
|
||||
{
|
||||
|
@ -697,6 +704,17 @@ static void gen_cond_call(DisasContext *ctx, TCGv pred,
|
|||
gen_set_label(skip);
|
||||
}
|
||||
|
||||
static void gen_cond_callr(DisasContext *ctx,
|
||||
TCGCond cond, TCGv pred, TCGv new_pc)
|
||||
{
|
||||
TCGv lsb = tcg_temp_new();
|
||||
TCGLabel *skip = gen_new_label();
|
||||
tcg_gen_andi_tl(lsb, pred, 1);
|
||||
tcg_gen_brcondi_tl(cond, lsb, 0, skip);
|
||||
gen_callr(ctx, new_pc);
|
||||
gen_set_label(skip);
|
||||
}
|
||||
|
||||
static void gen_endloop0(DisasContext *ctx)
|
||||
{
|
||||
TCGv lpcfg = tcg_temp_new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue