Re: [PATCH 16/33] target/ppc: Implement Vector Insert Word from GPR using Immediate insns

2021-10-26 Thread Paul A. Clarke
On Tue, Oct 26, 2021 at 09:58:15AM -0700, Richard Henderson wrote: > On 10/26/21 7:33 AM, Matheus K. Ferst wrote: > > It says that "if UIM is greater than N, the result is undefined." My > > first read was also that the outcome is "boundedly undefined," but I > > guess it can be understood as "the

RE: [PATCH v2 02/16] target/ppc: add user read functions for MMCR0 and MMCR2

2021-08-25 Thread Paul A. Clarke
On Wed, Aug 25, 2021 at 02:30:11PM +1000, David Gibson wrote: > On Tue, Aug 24, 2021 at 01:30:18PM -0300, Daniel Henrique Barboza wrote: > > From: Gustavo Romero > > > > This patch adds handling of UMMCR0 and UMMCR2 user read which, > > according to PowerISA 3.1, has some bits ommited to the > >

Re: [PATCH v2] target/ppc: Fix load endianness for lxvwsx/lxvdsx

2021-05-18 Thread Paul A. Clarke
Thanks, all! My original patch which addressed this issue for me probably should've been labeled as an RFC. Thanks for your willingness to review it, in spite of its problems. It was a bit of a stab in the dark. I hope it at least helped get to this solution. Tested-by: Paul A. Clarke

[PATCH] Fix `lxvdsx` (issue #212)

2021-05-17 Thread Paul A. Clarke
`lxvdsx` is byte-swapping the data it loads, which it should not do. Fix it. Fixes #212. Fixes: bcb0b7b1a1c05707304f80ca6f523d557816f85c Signed-off-by: Paul A. Clarke mem_idx, MO_TEQ); +tcg_gen_qemu_ld_i64(data, EA, ctx->mem_idx, MO_LEQ); tcg_gen_gvec_dup_i64(MO_Q, vsr_full_offset

[Qemu-devel] [PATCH] ppc: Use FPSCR defines instead of constants

2019-09-18 Thread Paul A. Clarke
From: "Paul A. Clarke" There are FPSCR-related defines in target/ppc/cpu.h which can be used in place of constants and explicit shifts which arguably improve the code a bit in places. Signed-off-by: Paul A. Clarke --- I confirmed that the generated assembly is identical before and

[Qemu-devel] [PATCH v3 1/2] ppc: Add support for 'mffscrn', 'mffscrni' instructions

2019-09-18 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffscrn' and 'mffscrni' instructions. 'mffscrn' and '

[Qemu-devel] [PATCH v3 2/2] ppc: Add support for 'mffsce' instruction

2019-09-18 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffsce' instruction. 'mffsce' is identical to 'mffs',

[Qemu-devel] [PATCH v2 1/2] ppc: Add support for 'mffscrn', 'mffscrni' instructions

2019-09-16 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffscrn' and 'mffscrni' instructions. 'mffscrn' and '

[Qemu-devel] [PATCH v2 2/2] ppc: Add support for 'mffsce' instruction

2019-09-16 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffsce' instruction. 'mffsce' is identical to 'mffs',

[Qemu-devel] [PATCH] ppc: Add support for 'mffsce' instruction

2019-09-12 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffsce' instruction. 'mffsce' is identical to 'mffs',

[Qemu-devel] [PATCH v2] ppc: Add support for 'mffscrn', 'mffscrni' instructions

2019-09-12 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffscrn' and 'mffscrni' instructions. 'mffscrn' and '

[Qemu-devel] [PATCH] ppc: Add support for 'mffscrn', 'mffscrni' instructions

2019-09-11 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffscrn' and 'mffscrni' instructions. 'mffscrn' and &#x

[Qemu-devel] [PATCH] ppc: Fix xsmaddmdp and friends

2019-08-21 Thread Paul A. Clarke
From: "Paul A. Clarke" A class of instructions of the form: op Target,A,B which operate like: Target = Target * A + B have a bit set which distinguishes them from instructions that operate as: Target = Target * B + A This bit is not being checked properly (using PPC_BIT macr

[Qemu-devel] [PATCH] ppc: Fix xscvdpspn for SNAN

2019-08-20 Thread Paul A. Clarke
From: "Paul A. Clarke" helper_xscvdpspn() uses float64_to_float32() to convert double-precision floating-point to single-precision. Unfortunately, float64_to_float32() converts SNAN to QNAN, which should not happen with xscvdpspn. float64_to_float32() is also used by other i

[Qemu-devel] [PATCH v2] ppc: Fix emulated single to double denormalized conversions

2019-08-19 Thread Paul A. Clarke
From: "Paul A. Clarke" helper_todouble() was not properly converting any denormalized 32 bit float to 64 bit double. Fix-suggested-by: Richard Henderson Signed-off-by: Paul A. Clarke v2: - Splitting patch "ppc: Three floating point fixes"; this is just one part. - Ori

[Qemu-devel] [PATCH] ppc: Fix emulated INFINITY and NAN conversions

2019-08-19 Thread Paul A. Clarke
From: "Paul A. Clarke" helper_todouble() was not properly converting INFINITY from 32 bit float to 64 bit double. (Normalized operand conversion is unchanged, other than indentation.) Signed-off-by: Paul A. Clarke --- target/ppc/fpu_helper.c | 15 +++ 1 file c

[Qemu-devel] [PATCH v2] ppc: conform to processor User's Manual for xscvdpspn

2019-08-19 Thread Paul A. Clarke
From: "Paul A. Clarke" The POWER8 and POWER9 User's Manuals specify the implementation behavior for what the ISA leaves "undefined" behavior for the xscvdpspn and xscvdpsp instructions. This patch corrects the QEMU implementation to match the hardware implementation for

[Qemu-devel] [PATCH] ppc: Three floating point fixes

2019-08-16 Thread Paul A. Clarke
From: "Paul A. Clarke" - target/ppc/fpu_helper.c: - helper_todouble() was not properly converting INFINITY from 32 bit float to 64 bit double. - helper_todouble() was not properly converting any denormalized 32 bit float to 64 bit double. - GCC, as of version 8 or so, takes ad

[Qemu-devel] [PATCH v4] ppc: Add support for 'mffsl' instruction

2019-08-16 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffsl'. 'mffsl' is identical to 'mffs', except it only re

[Qemu-devel] [PATCH v3] ppc: Add support for 'mffsl' instruction

2019-08-14 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffsl'. 'mffsl' is identical to 'mffs', except it only re

[Qemu-devel] [PATCH v2] ppc: Add support for 'mffsl' instruction

2019-08-13 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffsl'. 'mffsl' is identical to 'mffs', except it only re

[Qemu-devel] [PATCH] ppc: Add support for 'mffsl' instruction

2019-08-13 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffsl'. 'mffsl' is identical to 'mffs', except it only re