[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 40/64] ppc: Fix CFAR updates
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 40/64] ppc: Fix CFAR updates |
Date: |
Wed, 7 Sep 2016 20:29:19 +1000 |
From: Benjamin Herrenschmidt <address@hidden>
We were one instruction off
Signed-off-by: Benjamin Herrenschmidt <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target-ppc/translate.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index ac2c79b..bc5b2ee 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -3346,7 +3346,7 @@ static void gen_b(DisasContext *ctx)
if (LK(ctx->opcode)) {
gen_setlr(ctx, ctx->nip);
}
- gen_update_cfar(ctx, ctx->nip);
+ gen_update_cfar(ctx, ctx->nip - 4);
gen_goto_tb(ctx, 0, target);
}
@@ -3411,7 +3411,7 @@ static inline void gen_bcond(DisasContext *ctx, int type)
}
tcg_temp_free_i32(temp);
}
- gen_update_cfar(ctx, ctx->nip);
+ gen_update_cfar(ctx, ctx->nip - 4);
if (type == BCOND_IM) {
target_ulong li = (target_long)((int16_t)(BD(ctx->opcode)));
if (likely(AA(ctx->opcode) == 0)) {
@@ -3526,7 +3526,7 @@ static void gen_rfi(DisasContext *ctx)
*/
/* Restore CPU state */
CHK_SV;
- gen_update_cfar(ctx, ctx->nip);
+ gen_update_cfar(ctx, ctx->nip - 4);
gen_helper_rfi(cpu_env);
gen_sync_exception(ctx);
#endif
@@ -3540,7 +3540,7 @@ static void gen_rfid(DisasContext *ctx)
#else
/* Restore CPU state */
CHK_SV;
- gen_update_cfar(ctx, ctx->nip);
+ gen_update_cfar(ctx, ctx->nip - 4);
gen_helper_rfid(cpu_env);
gen_sync_exception(ctx);
#endif
--
2.7.4
- [Qemu-devel] [PULL 43/64] ppc: load/store multiple and string insns don't do LE, (continued)
- [Qemu-devel] [PULL 43/64] ppc: load/store multiple and string insns don't do LE, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 47/64] target-ppc: add vabsdu[b, h, w] instructions, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 42/64] ppc: Use a helper to generate "LE unsupported" alignment interrupts, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 49/64] target-ppc: add vslv instruction, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 24/64] ppc: Make float_check_status() pass the return address, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 29/64] ppc: Make tlb_fill() use new exception helper, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 51/64] target-ppc: add extswsli[.] instruction, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 53/64] hw/ppc: use error_report instead of fprintf, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 41/64] ppc: Don't set access_type on all load/stores on hash64, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 39/64] ppc: Speed up dcbz, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 40/64] ppc: Fix CFAR updates,
David Gibson <=
- [Qemu-devel] [PULL 55/64] ppc: Fix macio ESCC legacy mapping, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 46/64] target-ppc: add dtstsfi[q] instructions, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 22/64] ppc: Rename fload_invalid_op_excp to float_invalid_op_excp, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 36/64] ppc: Don't update NIP in dcbz and lscbx, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 61/64] ppc: Improve a few more helper flags, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 58/64] ppc: Don't generate dead code on unconditional branches, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 59/64] ppc: Improve flags for helpers loading/writing the time facilities, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 52/64] ppc: Rename #include'd .c files to .inc.c, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 62/64] spapr: implement H_CHANGE_LOGICAL_LAN_MAC h_call, David Gibson, 2016/09/07
- [Qemu-devel] [PULL 56/64] ppc: Fix catching some segfaults in user mode, David Gibson, 2016/09/07