From: Aurelien Jarno Date: Thu, 15 Aug 2013 11:32:38 +0000 (+0200) Subject: target-ppc: fix bit extraction for FPBF and FPL X-Git-Tag: v1.7.0-rc0~142^2~8 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=779f659021d1754117bce1aab9370dc22f37ae07;hp=ad9990acc5ac29ce505fbb2b955928ce335eddfd;p=qemu.git target-ppc: fix bit extraction for FPBF and FPL Bit extraction for the FP BF and L field of the MTFSFI and MTFSF instructions is wrong and doesn't match the reference manual (which explain the bit number in big endian format). It has been broken in commit 7d08d85645def18eac2a9d672c1868a35e0bcf79. This patch fixes this, which in turn fixes the problem reported by Khem Raj about the floor() function of libm. Reported-by: Khem Raj Signed-off-by: Aurelien Jarno CC: qemu-stable@nongnu.org (1.6) Signed-off-by: Alexander Graf --- diff --git a/target-ppc/translate.c b/target-ppc/translate.c index f07d70d86..41f40486e 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -428,9 +428,9 @@ EXTRACT_HELPER(CRM, 12, 8); EXTRACT_HELPER(SR, 16, 4); /* mtfsf/mtfsfi */ -EXTRACT_HELPER(FPBF, 19, 3); +EXTRACT_HELPER(FPBF, 23, 3); EXTRACT_HELPER(FPIMM, 12, 4); -EXTRACT_HELPER(FPL, 21, 1); +EXTRACT_HELPER(FPL, 25, 1); EXTRACT_HELPER(FPFLM, 17, 8); EXTRACT_HELPER(FPW, 16, 1);