[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 06/32] target-ppc: fixed translation of mcrxr instruc
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 06/32] target-ppc: fixed translation of mcrxr instruction |
Date: |
Fri, 27 Jun 2014 13:51:58 +0200 |
From: Sorav Bansal <address@hidden>
Fixed bug in gen_mcrxr() in target-ppc/translate.c:
The XER[SO], XER[OV], and XER[CA] flags are stored in the least
significant bit (bit 0) of their respective registers. They need
to be shifted left (by their respective offsets) to generate the final
XER value. The old translation code for the 'mcrxr' instruction
was assuming that the flags are stored in bit 2, and was shifting them
right (incorrectly)
Signed-off-by: Sorav Bansal <address@hidden>
Reviewed-by: Tom Musta <address@hidden>
Tested-by: Tom Musta <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/translate.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 4801721..c5d73d5 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -4123,8 +4123,9 @@ static void gen_mcrxr(DisasContext *ctx)
tcg_gen_trunc_tl_i32(t0, cpu_so);
tcg_gen_trunc_tl_i32(t1, cpu_ov);
tcg_gen_trunc_tl_i32(dst, cpu_ca);
- tcg_gen_shri_i32(t0, t0, 2);
- tcg_gen_shri_i32(t1, t1, 1);
+ tcg_gen_shli_i32(t0, t0, 3);
+ tcg_gen_shli_i32(t1, t1, 2);
+ tcg_gen_shli_i32(dst, dst, 1);
tcg_gen_or_i32(dst, dst, t0);
tcg_gen_or_i32(dst, dst, t1);
tcg_temp_free_i32(t0);
--
1.8.1.4
- [Qemu-devel] [PULL 22/32] spapr: Add RTAS sysparm UUID, (continued)
- [Qemu-devel] [PULL 22/32] spapr: Add RTAS sysparm UUID, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 19/32] spapr: Define a 2.1 pseries machine, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 10/32] vfio: Add vfio_container_ioctl(), Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 25/32] xics: Add xics_find_source(), Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 29/32] xics: Implement xics_ics_free(), Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 32/32] PPC: e500: Only create dt entries for existing serial ports, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 21/32] spapr: Fix RTAS sysparm DIAGNOSTICS_RUN_MODE, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 24/32] xics: Add flags for interrupts, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 26/32] xics: Disable flags reset on xics reset, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 16/32] uninorth: Fix PCI hole size, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 06/32] target-ppc: fixed translation of mcrxr instruction,
Alexander Graf <=
- [Qemu-devel] [PULL 31/32] spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 28/32] spapr: Remove @next_irq, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 20/32] spapr: Add rtas_st_buffer utility function, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 27/32] spapr: Move interrupt allocator to xics, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 30/32] vmstate: Add preallocation for migrating arrays (VMS_ALLOC flag), Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 23/32] spapr: Add RTAS sysparm SPLPAR Characteristics, Alexander Graf, 2014/06/27
- Re: [Qemu-devel] [PULL 00/32] ppc patch queue 2014-06-27, Peter Maydell, 2014/06/29