[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/13] alpha: Fix fbcond branch offset.
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 05/13] alpha: Fix fbcond branch offset. |
Date: |
Fri, 11 Dec 2009 09:07:29 -0800 |
The instructions use a disp21 like all other branch insns,
not the disp16 that was being passed.
Signed-off-by: Richard Henderson <address@hidden>
---
target-alpha/translate.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 5e139e6..cabf75a 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -314,8 +314,7 @@ static inline void gen_bcond(DisasContext *ctx, TCGCond
cond, int ra,
gen_set_label(l2);
}
-static inline void gen_fbcond(DisasContext *ctx, int opc, int ra,
- int32_t disp16)
+static inline void gen_fbcond(DisasContext *ctx, int opc, int ra, int32_t disp)
{
int l1, l2;
TCGv tmp;
@@ -356,7 +355,7 @@ static inline void gen_fbcond(DisasContext *ctx, int opc,
int ra,
tcg_gen_movi_i64(cpu_pc, ctx->pc);
tcg_gen_br(l2);
gen_set_label(l1);
- tcg_gen_movi_i64(cpu_pc, ctx->pc + (int64_t)(disp16 << 2));
+ tcg_gen_movi_i64(cpu_pc, ctx->pc + (int64_t)(disp << 2));
gen_set_label(l2);
}
@@ -2335,7 +2334,7 @@ static inline int translate_one(DisasContext *ctx,
uint32_t insn)
case 0x31: /* FBEQ */
case 0x32: /* FBLT */
case 0x33: /* FBLE */
- gen_fbcond(ctx, opc, ra, disp16);
+ gen_fbcond(ctx, opc, ra, disp21);
ret = 1;
break;
case 0x34:
@@ -2348,7 +2347,7 @@ static inline int translate_one(DisasContext *ctx,
uint32_t insn)
case 0x35: /* FBNE */
case 0x36: /* FBGE */
case 0x37: /* FBGT */
- gen_fbcond(ctx, opc, ra, disp16);
+ gen_fbcond(ctx, opc, ra, disp21);
ret = 1;
break;
case 0x38:
- [Qemu-devel] [PATCH 00/13] Alpha emulation improvements, round two, Richard Henderson, 2009/12/11
- [Qemu-devel] [PATCH 02/13] alpha: Fix -d in_asm, Richard Henderson, 2009/12/11
- [Qemu-devel] [PATCH 01/13] alpha: Implement missing MVI instructions., Richard Henderson, 2009/12/11
- [Qemu-devel] [PATCH 03/13] alpha: Expand zap/zapnot with immediate inline., Richard Henderson, 2009/12/11
- [Qemu-devel] [PATCH 09/13] alpha: Expand msk*h inline., Richard Henderson, 2009/12/11
- [Qemu-devel] [PATCH 11/13] alpha: Fix FMOV., Richard Henderson, 2009/12/11
- [Qemu-devel] [PATCH 06/13] alpha: Implement RD/WRUNIQUE in the translator, Richard Henderson, 2009/12/11
- [Qemu-devel] [PATCH 10/13] alpha: Expand ins*h inline., Richard Henderson, 2009/12/11
- [Qemu-devel] [PATCH 05/13] alpha: Fix fbcond branch offset.,
Richard Henderson <=
- [Qemu-devel] [PATCH 13/13] alpha: Implement fp branch/cmov inline., Richard Henderson, 2009/12/11
- [Qemu-devel] [PATCH 07/13] alpha: Expand ins*l inline., Richard Henderson, 2009/12/11
- [Qemu-devel] [PATCH 04/13] alpha: Rewrite gen_ext_[hl] in terms of zapnot., Richard Henderson, 2009/12/11
- [Qemu-devel] [PATCH 08/13] alpha: Expand msk*l inline., Richard Henderson, 2009/12/11
- [Qemu-devel] [PATCH 12/13] alpha: Fix double log_cpu_state., Richard Henderson, 2009/12/11