mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
tcg/aarch64: Use full load/store helpers in user-only mode
Instead of using helper_unaligned_{ld,st}, use the full load/store helpers. This will allow the fast path to increase alignment to implement atomicity while not immediately raising an alignment exception. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
30cc7a7e91
commit
e9266ecd8f
1 changed files with 0 additions and 35 deletions
|
@ -1595,7 +1595,6 @@ typedef struct {
|
||||||
TCGType index_ext;
|
TCGType index_ext;
|
||||||
} HostAddress;
|
} HostAddress;
|
||||||
|
|
||||||
#ifdef CONFIG_SOFTMMU
|
|
||||||
static const TCGLdstHelperParam ldst_helper_param = {
|
static const TCGLdstHelperParam ldst_helper_param = {
|
||||||
.ntmp = 1, .tmp = { TCG_REG_TMP }
|
.ntmp = 1, .tmp = { TCG_REG_TMP }
|
||||||
};
|
};
|
||||||
|
@ -1628,40 +1627,6 @@ static bool tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)
|
||||||
tcg_out_goto(s, lb->raddr);
|
tcg_out_goto(s, lb->raddr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
static void tcg_out_adr(TCGContext *s, TCGReg rd, const void *target)
|
|
||||||
{
|
|
||||||
ptrdiff_t offset = tcg_pcrel_diff(s, target);
|
|
||||||
tcg_debug_assert(offset == sextract64(offset, 0, 21));
|
|
||||||
tcg_out_insn(s, 3406, ADR, rd, offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool tcg_out_fail_alignment(TCGContext *s, TCGLabelQemuLdst *l)
|
|
||||||
{
|
|
||||||
if (!reloc_pc19(l->label_ptr[0], tcg_splitwx_to_rx(s->code_ptr))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
tcg_out_mov(s, TCG_TYPE_TL, TCG_REG_X1, l->addrlo_reg);
|
|
||||||
tcg_out_mov(s, TCG_TYPE_PTR, TCG_REG_X0, TCG_AREG0);
|
|
||||||
|
|
||||||
/* "Tail call" to the helper, with the return address back inline. */
|
|
||||||
tcg_out_adr(s, TCG_REG_LR, l->raddr);
|
|
||||||
tcg_out_goto_long(s, (const void *)(l->is_ld ? helper_unaligned_ld
|
|
||||||
: helper_unaligned_st));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *l)
|
|
||||||
{
|
|
||||||
return tcg_out_fail_alignment(s, l);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *l)
|
|
||||||
{
|
|
||||||
return tcg_out_fail_alignment(s, l);
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_SOFTMMU */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For softmmu, perform the TLB load and compare.
|
* For softmmu, perform the TLB load and compare.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue