|
|
298366 |
From 52f99b02e5ff1004fb3b41846d2c34f190127456 Mon Sep 17 00:00:00 2001
|
|
|
298366 |
From: Aurelien Jarno <aurelien@aurel32.net>
|
|
|
298366 |
Date: Thu, 15 Aug 2013 13:32:38 +0200
|
|
|
298366 |
Subject: [PATCH] target-ppc: fix bit extraction for FPBF and FPL
|
|
|
298366 |
|
|
|
298366 |
Bit extraction for the FP BF and L field of the MTFSFI and MTFSF
|
|
|
298366 |
instructions is wrong and doesn't match the reference manual (which
|
|
|
298366 |
explain the bit number in big endian format). It has been broken in
|
|
|
298366 |
commit 7d08d85645def18eac2a9d672c1868a35e0bcf79.
|
|
|
298366 |
|
|
|
298366 |
This patch fixes this, which in turn fixes the problem reported by
|
|
|
298366 |
Khem Raj about the floor() function of libm.
|
|
|
298366 |
|
|
|
298366 |
Reported-by: Khem Raj <raj.khem@gmail.com>
|
|
|
298366 |
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
|
|
298366 |
CC: qemu-stable@nongnu.org (1.6)
|
|
|
298366 |
Signed-off-by: Alexander Graf <agraf@suse.de>
|
|
|
298366 |
(cherry picked from commit 779f659021d1754117bce1aab9370dc22f37ae07)
|
|
|
298366 |
|
|
|
298366 |
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
|
|
|
298366 |
---
|
|
|
298366 |
target-ppc/translate.c | 4 ++--
|
|
|
298366 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
298366 |
|
|
|
298366 |
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
|
|
|
298366 |
index f07d70d..41f4048 100644
|
|
|
298366 |
--- a/target-ppc/translate.c
|
|
|
298366 |
+++ b/target-ppc/translate.c
|
|
|
298366 |
@@ -428,9 +428,9 @@ EXTRACT_HELPER(CRM, 12, 8);
|
|
|
298366 |
EXTRACT_HELPER(SR, 16, 4);
|
|
|
298366 |
|
|
|
298366 |
/* mtfsf/mtfsfi */
|
|
|
298366 |
-EXTRACT_HELPER(FPBF, 19, 3);
|
|
|
298366 |
+EXTRACT_HELPER(FPBF, 23, 3);
|
|
|
298366 |
EXTRACT_HELPER(FPIMM, 12, 4);
|
|
|
298366 |
-EXTRACT_HELPER(FPL, 21, 1);
|
|
|
298366 |
+EXTRACT_HELPER(FPL, 25, 1);
|
|
|
298366 |
EXTRACT_HELPER(FPFLM, 17, 8);
|
|
|
298366 |
EXTRACT_HELPER(FPW, 16, 1);
|
|
|
298366 |
|