[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 77/77] ppc: Fix CFAR updates
From: |
Benjamin Herrenschmidt |
Subject: |
[Qemu-ppc] [PATCH 77/77] ppc: Fix CFAR updates |
Date: |
Wed, 11 Nov 2015 11:28:30 +1100 |
We need to remove 4 from the NIP since it's already been moved by
4 by the dispatcher before the helper is called
Signed-off-by: Benjamin Herrenschmidt <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 b46ad72..d3e7d5b 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -4035,7 +4035,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);
}
@@ -4100,7 +4100,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)) {
@@ -4211,7 +4211,7 @@ static void gen_rfi(DisasContext *ctx)
#else
/* 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
@@ -4225,7 +4225,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.5.0
- [Qemu-ppc] [PATCH 58/77] ppc: Initial HDEC support, (continued)
- [Qemu-ppc] [PATCH 58/77] ppc: Initial HDEC support, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 59/77] ppc: Add placeholder SPRs for DPDES and DHDES on P8, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 62/77] ppc: Add dummy SPR_IC for POWER8, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 60/77] ppc: LPCR is a HV resource, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 64/77] ppc: Fix writing to AMR/UAMOR, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 65/77] ppc: Add POWER8 IAMR register, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 67/77] ppc: Add dummy write to VTB, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 66/77] ppc: Add a few more P8 PMU SPRs, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 68/77] ppc: Add dummy POWER8 MPPR register, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 72/77] ppc: A couple more dummy POWER8 Book4 regs, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 77/77] ppc: Fix CFAR updates,
Benjamin Herrenschmidt <=
- [Qemu-ppc] [PATCH 70/77] ppc: Add dummy CIABR SPR, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 69/77] ppc: Add dummy POWER8 PSPB SPR, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 71/77] ppc: Add dummy ACOP SPR, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 73/77] ppc: Add KVM numbers to some P8 SPRs, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 74/77] ppc: Print HSRR0/HSRR1 in "info registers", Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 76/77] ppc: Add slbfee. instruction, Benjamin Herrenschmidt, 2015/11/10
- [Qemu-ppc] [PATCH 75/77] ppc: Add dummy logmpp instruction, Benjamin Herrenschmidt, 2015/11/10
- Re: [Qemu-ppc] [PATCH 00/77] ppc: Add "native" POWER8 platform, Benjamin Herrenschmidt, 2015/11/10
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 00/77] ppc: Add "native" POWER8 platform, Eric Blake, 2015/11/10