mirror of https://github.com/xemu-project/xemu.git
target/alpha: Hoist branch shift to initial decode
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20240503072014.24751-3-philmd@linaro.org>
This commit is contained in:
parent
ab709f13b8
commit
1bcae46aac
|
@ -432,7 +432,7 @@ static bool use_goto_tb(DisasContext *ctx, uint64_t dest)
|
||||||
|
|
||||||
static DisasJumpType gen_bdirect(DisasContext *ctx, int ra, int32_t disp)
|
static DisasJumpType gen_bdirect(DisasContext *ctx, int ra, int32_t disp)
|
||||||
{
|
{
|
||||||
uint64_t dest = ctx->base.pc_next + (disp << 2);
|
uint64_t dest = ctx->base.pc_next + disp;
|
||||||
|
|
||||||
if (ra != 31) {
|
if (ra != 31) {
|
||||||
tcg_gen_movi_i64(ctx->ir[ra], ctx->base.pc_next);
|
tcg_gen_movi_i64(ctx->ir[ra], ctx->base.pc_next);
|
||||||
|
@ -455,7 +455,7 @@ static DisasJumpType gen_bdirect(DisasContext *ctx, int ra, int32_t disp)
|
||||||
static DisasJumpType gen_bcond_internal(DisasContext *ctx, TCGCond cond,
|
static DisasJumpType gen_bcond_internal(DisasContext *ctx, TCGCond cond,
|
||||||
TCGv cmp, uint64_t imm, int32_t disp)
|
TCGv cmp, uint64_t imm, int32_t disp)
|
||||||
{
|
{
|
||||||
uint64_t dest = ctx->base.pc_next + (disp << 2);
|
uint64_t dest = ctx->base.pc_next + disp;
|
||||||
TCGLabel *lab_true = gen_new_label();
|
TCGLabel *lab_true = gen_new_label();
|
||||||
|
|
||||||
if (use_goto_tb(ctx, dest)) {
|
if (use_goto_tb(ctx, dest)) {
|
||||||
|
@ -1382,7 +1382,7 @@ static DisasJumpType translate_one(DisasContext *ctx, uint32_t insn)
|
||||||
real_islit = islit = extract32(insn, 12, 1);
|
real_islit = islit = extract32(insn, 12, 1);
|
||||||
lit = extract32(insn, 13, 8);
|
lit = extract32(insn, 13, 8);
|
||||||
|
|
||||||
disp21 = sextract32(insn, 0, 21);
|
disp21 = sextract32(insn, 0, 21) * 4;
|
||||||
disp16 = sextract32(insn, 0, 16);
|
disp16 = sextract32(insn, 0, 16);
|
||||||
disp12 = sextract32(insn, 0, 12);
|
disp12 = sextract32(insn, 0, 12);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue