* [Qemu-devel] [PATCH] target-ppc: fix bit extraction for FPBF and FPL
@ 2013-08-15 11:32 Aurelien Jarno
2013-08-15 11:36 ` Alexander Graf
2013-08-15 13:58 ` Khem Raj
0 siblings, 2 replies; 3+ messages in thread
From: Aurelien Jarno @ 2013-08-15 11:32 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, qemu-ppc, Khem Raj, Aurelien Jarno, Alexander Graf
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 <raj.khem@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
target-ppc/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
I don't know if we still have time to get this into 1.6, hence the Cc:
to stable. In anycase it also needs to be fixed in 1.5.
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index f07d70d..41f4048 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);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] target-ppc: fix bit extraction for FPBF and FPL
2013-08-15 11:32 [Qemu-devel] [PATCH] target-ppc: fix bit extraction for FPBF and FPL Aurelien Jarno
@ 2013-08-15 11:36 ` Alexander Graf
2013-08-15 13:58 ` Khem Raj
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Graf @ 2013-08-15 11:36 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-stable, qemu-ppc, qemu-devel, Khem Raj
On 15.08.2013, at 13:32, Aurelien Jarno wrote:
> 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 <raj.khem@gmail.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Thanks, applied to ppc-next.
Alex
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] target-ppc: fix bit extraction for FPBF and FPL
2013-08-15 11:32 [Qemu-devel] [PATCH] target-ppc: fix bit extraction for FPBF and FPL Aurelien Jarno
2013-08-15 11:36 ` Alexander Graf
@ 2013-08-15 13:58 ` Khem Raj
1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2013-08-15 13:58 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-stable, qemu-ppc, qemu-devel, Alexander Graf
On Aug 15, 2013, at 4:32 AM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> 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 <raj.khem@gmail.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> target-ppc/translate.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> I don't know if we still have time to get this into 1.6, hence the Cc:
> to stable. In anycase it also needs to be fixed in 1.5.
>
> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
> index f07d70d..41f4048 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);
>
> --
> 1.7.10.4
>
Thanks for quick turnaround, I have tested this patch and fixes the said issue.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-15 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-15 11:32 [Qemu-devel] [PATCH] target-ppc: fix bit extraction for FPBF and FPL Aurelien Jarno
2013-08-15 11:36 ` Alexander Graf
2013-08-15 13:58 ` Khem Raj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).