[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 06/12] ppc: Fix sign extension issue in mtmsr(d) emulat
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 06/12] ppc: Fix sign extension issue in mtmsr(d) emulation |
Date: |
Tue, 31 May 2016 10:41:11 +1000 |
From: Michael Neuling <address@hidden>
Signed-off-by: Michael Neuling <address@hidden>
Signed-off-by: Benjamin Herrenschmidt <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target-ppc/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 868ef31..51f6eb1 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -4381,7 +4381,7 @@ static void gen_mtmsrd(DisasContext *ctx)
/* Special form that does not need any synchronisation */
TCGv t0 = tcg_temp_new();
tcg_gen_andi_tl(t0, cpu_gpr[rS(ctx->opcode)], (1 << MSR_RI) | (1 <<
MSR_EE));
- tcg_gen_andi_tl(cpu_msr, cpu_msr, ~((1 << MSR_RI) | (1 << MSR_EE)));
+ tcg_gen_andi_tl(cpu_msr, cpu_msr, ~(target_ulong)((1 << MSR_RI) | (1
<< MSR_EE)));
tcg_gen_or_tl(cpu_msr, cpu_msr, t0);
tcg_temp_free(t0);
} else {
@@ -4412,7 +4412,7 @@ static void gen_mtmsr(DisasContext *ctx)
/* Special form that does not need any synchronisation */
TCGv t0 = tcg_temp_new();
tcg_gen_andi_tl(t0, cpu_gpr[rS(ctx->opcode)], (1 << MSR_RI) | (1 <<
MSR_EE));
- tcg_gen_andi_tl(cpu_msr, cpu_msr, ~((1 << MSR_RI) | (1 << MSR_EE)));
+ tcg_gen_andi_tl(cpu_msr, cpu_msr, ~(target_ulong)((1 << MSR_RI) | (1
<< MSR_EE)));
tcg_gen_or_tl(cpu_msr, cpu_msr, t0);
tcg_temp_free(t0);
} else {
--
2.5.5
- [Qemu-ppc] [PULL 09/12] exec: Remove cpu from cpus list during cpu_exec_exit(), (continued)
- [Qemu-ppc] [PULL 09/12] exec: Remove cpu from cpus list during cpu_exec_exit(), David Gibson, 2016/05/30
- [Qemu-ppc] [PULL 01/12] ppc: Remove MMU_MODEn_SUFFIX definitions, David Gibson, 2016/05/30
- [Qemu-ppc] [PULL 02/12] ppc: Use split I/D mmu modes to avoid flushes on interrupts, David Gibson, 2016/05/30
- [Qemu-ppc] [PULL 03/12] ppc: Do some batching of TCG tlb flushes, David Gibson, 2016/05/30
- [Qemu-ppc] [PULL 05/12] ppc: Change 'invalid' bit mask of tlbiel and tlbie, David Gibson, 2016/05/30
- [Qemu-ppc] [PULL 10/12] exec: Do vmstate unregistration from cpu_exec_exit(), David Gibson, 2016/05/30
- [Qemu-ppc] [PULL 08/12] ppc: Add PPC_64H instruction flag to POWER7 and POWER8, David Gibson, 2016/05/30
- [Qemu-ppc] [PULL 11/12] cpu: Reclaim vCPU objects, David Gibson, 2016/05/30
- [Qemu-ppc] [PULL 07/12] ppc: Get out of emulation on SMT "OR" ops, David Gibson, 2016/05/30
- [Qemu-ppc] [PULL 12/12] cpu: Add a sync version of cpu_remove(), David Gibson, 2016/05/30
- [Qemu-ppc] [PULL 06/12] ppc: Fix sign extension issue in mtmsr(d) emulation,
David Gibson <=