[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/21] target-mips: Fix incorrect code and test for
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 05/21] target-mips: Fix incorrect code and test for INSV |
Date: |
Wed, 16 Jan 2013 10:49:07 -0600 |
From: Petar Jovanovic <address@hidden>
Content of register rs should be shifted for pos before applying a mask.
This change contains both fix for the instruction and to the existing test.
Signed-off-by: Petar Jovanovic <address@hidden>
Reviewed-by: Eric Johnson <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>
(cherry picked from commit 34f5606ee101f82a247d09d05644ad2a63c8e342)
Signed-off-by: Michael Roth <address@hidden>
---
target-mips/dsp_helper.c | 2 +-
tests/tcg/mips/mips32-dsp/insv.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/target-mips/dsp_helper.c b/target-mips/dsp_helper.c
index e7949c2..fda5f04 100644
--- a/target-mips/dsp_helper.c
+++ b/target-mips/dsp_helper.c
@@ -3152,7 +3152,7 @@ target_ulong helper_##name(CPUMIPSState *env,
target_ulong rs, \
\
filter = ((int32_t)0x01 << size) - 1; \
filter = filter << pos; \
- temprs = rs & filter; \
+ temprs = (rs << pos) & filter; \
temprt = rt & ~filter; \
temp = temprs | temprt; \
\
diff --git a/tests/tcg/mips/mips32-dsp/insv.c b/tests/tcg/mips/mips32-dsp/insv.c
index 7e3b047..243b007 100644
--- a/tests/tcg/mips/mips32-dsp/insv.c
+++ b/tests/tcg/mips/mips32-dsp/insv.c
@@ -10,7 +10,7 @@ int main()
dsp = 0x305;
rt = 0x12345678;
rs = 0x87654321;
- result = 0x12345338;
+ result = 0x12345438;
__asm
("wrdsp %2, 0x03\n\t"
"insv %0, %1\n\t"
--
1.7.9.5
- [Qemu-devel] Patch Round-up for stable 1.3.1, freeze Monday, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 01/21] Fix semaphores fallback code, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 02/21] Disable semaphores fallback code for OpenBSD, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 03/21] Fix off-by-1 error in RAM migration code, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 04/21] migration: Fix madvise breakage if host and guest have different page sizes, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 05/21] target-mips: Fix incorrect code and test for INSV,
Michael Roth <=
- [Qemu-devel] [PATCH 06/21] target-mips: Fix incorrect shift for SHILO and SHILOV, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 07/21] vfio-pci: Don't use kvm_irqchip_in_kernel, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 11/21] target-xtensa: fix ITLB/DTLB page protection flags, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 12/21] qxl: save qemu_create_displaysurface_from result, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 10/21] pixman: fix vnc tight png/jpeg support, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 08/21] seabios: update to e8a76b0f225bba5ba9d63ab227e0a37b3beb1059, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 13/21] qxl+vnc: register a vm state change handler for dummy spice_server, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 15/21] migration: fix migration_bitmap leak, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 16/21] buffered_file: do not send more than s->bytes_xfer bytes per tick, Michael Roth, 2013/01/16
- [Qemu-devel] [PATCH 20/21] vfio-pci: Loosen sanity checks to allow future features, Michael Roth, 2013/01/16