[PATCH 4/8] scripts/ci/setup: spice-server only on x86 aarch64

2022-07-27 Thread Lucas Mateus Castro(alqotel)
Changed build-environment.yml to only install spice-server on x86_64 and aarch64 as this package is only available on those architectures. Signed-off-by: Lucas Mateus Castro(alqotel) --- scripts/ci/setup/build-environment.yml | 12 +++- 1 file changed, 11 insertions(+), 1 deletion

[PATCH 0/8] Patch series to set up a ppc64le CI

2022-07-27 Thread Lucas Mateus Castro(alqotel)
way to run the docker tests in PPC64LE. Lucas Mateus Castro(alqotel) (8): tests/docker: Fix alpine dockerfile scripts/ci/setup: ninja missing from build-environment scripts/ci/setup: Fix libxen requirements scripts/ci/setup: spice-server only on x86 aarch64 scripts/ci/setup: Add ppc64le

[PATCH 1/8] tests/docker: Fix alpine dockerfile

2022-07-27 Thread Lucas Mateus Castro(alqotel)
Currently the run script uses 'readlink -e' but the image only has the busybox readlink, this commit add the coreutils package which contains the readlink with the '-e' option. Signed-off-by: Lucas Mateus Castro(alqotel) --- tests/docker/dockerfiles/alpine.docker | 1

[PATCH 5/8] scripts/ci/setup: Add ppc64le to vars.yml template

2022-07-27 Thread Lucas Mateus Castro(alqotel)
Added ppc64le so that the gitlab-runner.yml could be used to set up ppc64le runners. Signed-off-by: Lucas Mateus Castro(alqotel) --- scripts/ci/setup/vars.yml.template | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci/setup/vars.yml.template b/scripts/ci/setup/vars.yml.template

[PATCH 7/8] scripts/ci/setup: Added debian to build-environment.yml

2022-07-27 Thread Lucas Mateus Castro(alqotel)
Minicloud has a PPC64 BE Debian11 image which can be used for the CI, so add Debian to the build-environment.yml so it can be configured with ansible-playbook. Signed-off-by: Lucas Mateus Castro(alqotel) --- scripts/ci/setup/build-environment.yml | 31 +- 1 file changed

[PATCH 3/8] scripts/ci/setup: Fix libxen requirements

2022-07-27 Thread Lucas Mateus Castro(alqotel)
XEN hypervisor is only available in ARM and x86, but the yaml only checked if the architecture is different from s390x, changed it to a more accurate test. Tested this change on a Ubuntu 20.04 ppc64le. Signed-off-by: Lucas Mateus Castro(alqotel) --- scripts/ci/setup/build-environment.yml | 2

[PATCH 2/8] scripts/ci/setup: ninja missing from build-environment

2022-07-27 Thread Lucas Mateus Castro(alqotel)
ninja-build is missing from the RHEL environment, so a system prepared with that script would still fail to compile QEMU. Tested on a Fedora 36 Signed-off-by: Lucas Mateus Castro(alqotel) --- scripts/ci/setup/build-environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci

[PATCH 6/8] scripts/ci/setup: Add Fedora to build-environment.yml

2022-07-27 Thread Lucas Mateus Castro(alqotel)
Minicloud doesn't have a RHEL image, but it does have Fedora 34 and 35 images and both use DNF as package manager, so just change the ansible facts to check if it's RHEL or Fedora Signed-off-by: Lucas Mateus Castro(alqotel) --- scripts/ci/setup/build-environment.yml | 12 --

[RFC PATCH 8/8] tests/docker: Selective line reading by python script

2022-07-27 Thread Lucas Mateus Castro(alqotel)
e used in the docker command. Signed-off-by: Lucas Mateus Castro(alqotel) --- tests/docker/docker.py | 15 --- tests/docker/dockerfiles/alpine.docker | 2 ++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker/docker

[RFC PATCH 1/3] target/ppc: Bugfix fadd/fsub result with OE/UE set

2022-08-03 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" As mentioned in the functions float_overflow_excp and float_underflow_excp, the result should be adjusted as mentioned in the ISA (subtracted 192/1536 from the exponent of the intermediate result if an overflow occurs with OE set and added 192/1

[RFC PATCH 2/3] target/ppc: Bugfix fmul result with OE/UE set

2022-08-03 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Change fmul in the same way of fadd/fsub to handle overflow/underflow if OE/UE is set (i.e. function that receives a value to add/subtract from the exponent if an overflow/underflow occurs). Signed-off-by: Lucas Mateus Castro (alqotel) --- fpu/s

[RFC PATCH 3/3] target/ppc: Bugfix fdiv result with OE/UE set

2022-08-03 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Change fdiv in the same way of fadd/fsub to handle overflow/underflow if OE/UE is set (i.e. function that receives a value to add/subtract from the exponent if an overflow/underflow occurs). Signed-off-by: Lucas Mateus Castro (alqotel) --- fpu/s

[PATCH] tests/tcg/ppc64le: Added OE/UE enabled exception test

2022-08-03 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" DO NOT MERGE This patch adds a test to check if the add/sub of the intermediate result when an overflow or underflow exception with the corresponding enabling bit being set (i.e. OE/UE), but linux-user currently can't disable MSR.FE0 and MSR

[PATCH 0/2] Floating-point OE/UE exception bug

2022-08-05 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Changes in v2: - Completely reworked the solution: * Created re_bias in FloatFmt, it is 3/4 of the total exponent range of a FP type * Added rebias bools that dictates if the result should have its ex

[PATCH 2/2] target/ppc: Bugfix FP when OE/UE are set

2022-08-05 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" When an overflow exception occurs and OE is set the intermediate result should be adjusted (by subtracting from the exponent) to avoid rounding to inf. The same applies to an underflow exceptionion and UE (but adding to the exponent). To do th

[PATCH 1/2] fpu: Add rebias bool, value and operation

2022-08-05 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Added the possibility of recalculating a result if it overflows or underflows, if the result overflow and the rebias bool is true then the intermediate result should have 3/4 of the total range subtracted from the exponent. The same for underf

[PATCH v2 0/3] Fix mtfsf, mtfsfi and mtfsb1 bug

2021-11-18 Thread Lucas Mateus Castro (alqotel)
anges from v1: - added a test for mtfsf (patch 3) - moved "Resolves" to second patch - removed gen_reset_fpstatus() from mtfsf,mtfsfi and mtfsb1 instructions Lucas Mateus Castro (alqotel) (3): target/ppc: Fixed call to deferred exception target/ppc: ppc_store_fpscr doesn't

[PATCH v2 1/3] target/ppc: Fixed call to deferred exception

2021-11-18 Thread Lucas Mateus Castro (alqotel)
r9. Signed-off-by: Lucas Mateus Castro (alqotel) --- target/ppc/fpu_helper.c| 41 ++ target/ppc/helper.h| 1 + target/ppc/translate/fp-impl.c.inc | 9 +++ 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/target/ppc/

[PATCH v2 2/3] target/ppc: ppc_store_fpscr doesn't update bit 52

2021-11-18 Thread Lucas Mateus Castro (alqotel)
u/-/issues/266 Signed-off-by: Lucas Mateus Castro (alqotel) --- target/ppc/cpu.c | 2 +- target/ppc/cpu.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/target/ppc/cpu.c b/target/ppc/cpu.c index f933d9f2bd..d7b42bae52 100644 --- a/target/ppc/cpu.c +++ b/target/ppc/cpu.c @@

[PATCH v2 3/3] test/tcg/ppc64le: test mtfsf

2021-11-18 Thread Lucas Mateus Castro (alqotel)
Added tests for the mtfsf to check if FI bit of FPSCR is being set and if exception calls are being made correctly. Signed-off-by: Lucas Mateus Castro (alqotel) --- tests/tcg/ppc64/Makefile.target | 1 + tests/tcg/ppc64le/Makefile.target | 1 + tests/tcg/ppc64le/mtfsf.c | 56

[PATCH v3 0/3] Fix mtfsf, mtfsfi and mtfsb1 bug

2021-11-24 Thread Lucas Mateus Castro (alqotel)
8 can't be set anymore as they're reserved bits - changed (11ull << 11) in FPSCR_MTFS_MASK to PPC_BIT(52) to make it clearer Changes from v1: - added a test for mtfsf (patch 3) - moved "Resolves" to second patch - removed gen_reset_fpstatus() from mtfsf,mtfsfi and mtfs

[PATCH v3 2/3] test/tcg/ppc64le: test mtfsf

2021-11-24 Thread Lucas Mateus Castro (alqotel)
Added tests for the mtfsf to check if FI bit of FPSCR is being set and if exception calls are being made correctly. Signed-off-by: Lucas Mateus Castro (alqotel) --- tests/tcg/ppc64/Makefile.target | 1 + tests/tcg/ppc64le/Makefile.target | 1 + tests/tcg/ppc64le/mtfsf.c | 61

[PATCH v3 1/3] target/ppc: Fixed call to deferred exception

2021-11-24 Thread Lucas Mateus Castro (alqotel)
r9. Signed-off-by: Lucas Mateus Castro (alqotel) --- target/ppc/fpu_helper.c| 48 ++ target/ppc/helper.h| 1 + target/ppc/translate/fp-impl.c.inc | 9 ++ 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/target/ppc/

[PATCH v3 3/3] target/ppc: ppc_store_fpscr doesn't update bits 0 to 28 and 52

2021-11-24 Thread Lucas Mateus Castro (alqotel)
t's a reserved bit it may be a "don't care" case, as put in the bug report. Looking at the ISA it doesn't explicitly mentions this bit can't be set, like it does for FEX and VX, so I'm unsure if this is necessary. Resolves: https://gitlab.com/qemu-project/qemu/

[RFC PATCH] scripts/checkpatch.pl: Change line limit warning

2022-05-16 Thread Lucas Mateus Castro(alqotel)
: 20201105154208.12442-1-ganqi...@huawei.com Signed-off-by: Lucas Mateus Castro(alqotel) --- Currently there's a disagreement between the checkpatch code and the documentation, this RFC just changes the checkpatch to match the documentation. But there was a discussion in 2020 as the best way to deal

[PATCH v3 1/8] target/ppc: Implement xxm[tf]acc and xxsetaccz

2022-05-17 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xxmfacc: VSX Move From Accumulator xxmtacc: VSX Move To Accumulator xxsetaccz: VSX Set Accumulator to Zero The PowerISA 3.1 mentions that for the current version of the architecture, &qu

[PATCH v3 0/8] VSX MMA Implementation

2022-05-17 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Based-on: <20220517161522.36132-1-victor.colo...@eldorado.org.br> This patch series is a patch series of the Matrix-Multiply Assist (MMA) instructions implementation from the PowerISA 3.1 These and the VDIV/VMOD implementation are the last

[PATCH v3 4/8] target/ppc: Implemented xvf*ger*

2022-05-17 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvf32ger: VSX Vector 32-bit Floating-Point GER (rank-1 update) xvf32gernn: VSX Vector 32-bit Floating-Point GER (rank-1 update) Negative multiply, Negative accumulate xvf32gernp: VSX Vec

[PATCH v3 5/8] target/ppc: Implemented xvf16ger*

2022-05-17 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvf16ger2: VSX Vector 16-bit Floating-Point GER (rank-2 update) xvf16ger2nn: VSX Vector 16-bit Floating-Point GER (rank-2 update) Negative multiply, Negative accumulate xvf16ger2np: VSX Vec

[PATCH v3 2/8] target/ppc: Implemented xvi*ger* instructions

2022-05-17 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvi4ger8: VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) xvi4ger8pp: VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) Positive multiply, Positive accumulate xvi8ger

[PATCH v3 3/8] target/ppc: Implemented pmxvi*ger* instructions

2022-05-17 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: pmxvi4ger8: Prefixed Masked VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) pmxvi4ger8pp: Prefixed Masked VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) Positiv

[PATCH v3 6/8] target/ppc: Implemented pmxvf*ger*

2022-05-17 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: pmxvf16ger2: Prefixed Masked VSX Vector 16-bit Floating-Point GER (rank-2 update) pmxvf16ger2nn: Prefixed Masked VSX Vector 16-bit Floating-Point GER (rank-2 update) Negative multiply, Negative

[PATCH v3 7/8] target/ppc: Implemented [pm]xvbf16ger2*

2022-05-17 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvbf16ger2: VSX Vector bfloat16 GER (rank-2 update) xvbf16ger2nn: VSX Vector bfloat16 GER (rank-2 update) Negative multiply, Negative accumulate xvbf16ger2np: VSX Vector bfloat16 GER (ran

[PATCH v3 8/8] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap

2022-05-17 Thread Lucas Mateus Castro(alqotel)
From: Joel Stanley These are new hwcap bits added for power10. Signed-off-by: Joel Stanley Signed-off-by: Lucas Mateus Castro (alqotel) --- linux-user/elfload.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 61063fd974..0908692e62

[PATCH v4 0/8] VSX MMA Implementation

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Based-on: <20220517161522.36132-1-victor.colo...@eldorado.org.br> This patch series is a patch series of the Matrix-Multiply Assist (MMA) instructions implementation from the PowerISA 3.1 These and the VDIV/VMOD implementation are the last

[PATCH v4 2/8] target/ppc: Implemented xvi*ger* instructions

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvi4ger8: VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) xvi4ger8pp: VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) Positive multiply, Positive accumulate xvi8ger

[PATCH v4 5/8] target/ppc: Implemented xvf16ger*

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvf16ger2: VSX Vector 16-bit Floating-Point GER (rank-2 update) xvf16ger2nn: VSX Vector 16-bit Floating-Point GER (rank-2 update) Negative multiply, Negative accumulate xvf16ger2np: VSX Vec

[PATCH v4 4/8] target/ppc: Implemented xvf*ger*

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvf32ger: VSX Vector 32-bit Floating-Point GER (rank-1 update) xvf32gernn: VSX Vector 32-bit Floating-Point GER (rank-1 update) Negative multiply, Negative accumulate xvf32gernp: VSX Vec

[PATCH v4 8/8] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: Joel Stanley These are new hwcap bits added for power10. Signed-off-by: Joel Stanley Signed-off-by: Lucas Mateus Castro (alqotel) Reviewed-by: Richard Henderson --- linux-user/elfload.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c

[PATCH v4 1/8] target/ppc: Implement xxm[tf]acc and xxsetaccz

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xxmfacc: VSX Move From Accumulator xxmtacc: VSX Move To Accumulator xxsetaccz: VSX Set Accumulator to Zero The PowerISA 3.1 mentions that for the current version of the architecture, &qu

[PATCH v4 7/8] target/ppc: Implemented [pm]xvbf16ger2*

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvbf16ger2: VSX Vector bfloat16 GER (rank-2 update) xvbf16ger2nn: VSX Vector bfloat16 GER (rank-2 update) Negative multiply, Negative accumulate xvbf16ger2np: VSX Vector bfloat16 GER (ran

[PATCH v4 3/8] target/ppc: Implemented pmxvi*ger* instructions

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: pmxvi4ger8: Prefixed Masked VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) pmxvi4ger8pp: Prefixed Masked VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) Positiv

[PATCH v4 6/8] target/ppc: Implemented pmxvf*ger*

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: pmxvf16ger2: Prefixed Masked VSX Vector 16-bit Floating-Point GER (rank-2 update) pmxvf16ger2nn: Prefixed Masked VSX Vector 16-bit Floating-Point GER (rank-2 update) Negative multiply, Negative

[PATCH v5 0/8] VSX MMA Implementation

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Based-on: <20220517161522.36132-1-victor.colo...@eldorado.org.br> This patch series is a patch series of the Matrix-Multiply Assist (MMA) instructions implementation from the PowerISA 3.1 These and the VDIV/VMOD implementation are the last

[PATCH v5 3/8] target/ppc: Implemented pmxvi*ger* instructions

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: pmxvi4ger8: Prefixed Masked VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) pmxvi4ger8pp: Prefixed Masked VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) Positiv

[PATCH v5 2/8] target/ppc: Implemented xvi*ger* instructions

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvi4ger8: VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) xvi4ger8pp: VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) Positive multiply, Positive accumulate xvi8ger

[PATCH v5 4/8] target/ppc: Implemented xvf*ger*

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvf32ger: VSX Vector 32-bit Floating-Point GER (rank-1 update) xvf32gernn: VSX Vector 32-bit Floating-Point GER (rank-1 update) Negative multiply, Negative accumulate xvf32gernp: VSX Vec

[PATCH v5 1/8] target/ppc: Implement xxm[tf]acc and xxsetaccz

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xxmfacc: VSX Move From Accumulator xxmtacc: VSX Move To Accumulator xxsetaccz: VSX Set Accumulator to Zero The PowerISA 3.1 mentions that for the current version of the architecture, &qu

[PATCH v5 8/8] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: Joel Stanley These are new hwcap bits added for power10. Signed-off-by: Joel Stanley Signed-off-by: Lucas Mateus Castro (alqotel) Reviewed-by: Richard Henderson --- linux-user/elfload.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c

[PATCH v5 7/8] target/ppc: Implemented [pm]xvbf16ger2*

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvbf16ger2: VSX Vector bfloat16 GER (rank-2 update) xvbf16ger2nn: VSX Vector bfloat16 GER (rank-2 update) Negative multiply, Negative accumulate xvbf16ger2np: VSX Vector bfloat16 GER (ran

[PATCH v5 5/8] target/ppc: Implemented xvf16ger*

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvf16ger2: VSX Vector 16-bit Floating-Point GER (rank-2 update) xvf16ger2nn: VSX Vector 16-bit Floating-Point GER (rank-2 update) Negative multiply, Negative accumulate xvf16ger2np: VSX Vec

[PATCH v5 6/8] target/ppc: Implemented pmxvf*ger*

2022-05-20 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: pmxvf16ger2: Prefixed Masked VSX Vector 16-bit Floating-Point GER (rank-2 update) pmxvf16ger2nn: Prefixed Masked VSX Vector 16-bit Floating-Point GER (rank-2 update) Negative multiply, Negative

[PATCH 1/2] target/ppc: Fixed call to deferred exception

2021-10-20 Thread Lucas Mateus Castro (alqotel)
From: "Lucas Mateus Castro (alqotel)" mtfsf, mtfsfi and mtfsb1 instructions call helper_float_check_status after updating the value of FPSCR, but helper_float_check_status checks fp_status and fp_status isn't updated based on FPSCR and since the value of fp_status is reset

[PATCH 2/2] target/ppc: ppc_store_fpscr doesn't update bit 52

2021-10-20 Thread Lucas Mateus Castro (alqotel)
From: "Lucas Mateus Castro (alqotel)" This commit fixes the difference reported in the bug in the reserved bit 52, it does this by adding this bit to the mask of bits to not be directly altered in the ppc_store_fpscr function (the hardware used to compare to QEMU was a Power9). Althou

[PATCH 0/2] Fix mtfsf, mtfsfi and mtfsb1 bug

2021-10-20 Thread Lucas Mateus Castro (alqotel)
From: "Lucas Mateus Castro (alqotel)" The instructions mtfsf, mtfsfi and mtfsb, when called, fail to set the FI bit (bit 46 in the FPSCR) and can set to 1 the reserved bit 52 of the FPSCR, as reported in https://gitlab.com/qemu-project/qemu/-/issues/266 (although the bug report is only

[RFC PATCH v2 3/7] target/ppc: Implemented pmxvi*ger* instructions

2022-05-06 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: pmxvi4ger8: Prefixed Masked VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) pmxvi4ger8pp: Prefixed Masked VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) Positiv

[RFC PATCH v2 1/7] target/ppc: Implement xxm[tf]acc and xxsetaccz

2022-05-06 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xxmfacc: VSX Move From Accumulator xxmtacc: VSX Move To Accumulator xxsetaccz: VSX Set Accumulator to Zero The PowerISA 3.1 mentions that for the current version of the architecture, &qu

[RFC PATCH v2 6/7] target/ppc: Implemented pmxvf*ger*

2022-05-06 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: pmxvf16ger2: Prefixed Masked VSX Vector 16-bit Floating-Point GER (rank-2 update) pmxvf16ger2nn: Prefixed Masked VSX Vector 16-bit Floating-Point GER (rank-2 update) Negative multiply, Negative

[RFC PATCH v2 0/7] VSX MMA Implementation

2022-05-06 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" This patch series is an RFC of the Matrix-Multiply Assist (MMA) instructions implementation from the PowerISA 3.1 These and the VDIV/VMOD implementation are the last new PowerISA 3.1 instructions left to be implemented. The XVFGER instructions

[RFC PATCH v2 5/7] target/ppc: Implemented xvf16ger*

2022-05-06 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvf16ger2: VSX Vector 16-bit Floating-Point GER (rank-2 update) xvf16ger2nn: VSX Vector 16-bit Floating-Point GER (rank-2 update) Negative multiply, Negative accumulate xvf16ger2np: VSX Vec

[RFC PATCH v2 2/7] target/ppc: Implemented xvi*ger* instructions

2022-05-06 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvi4ger8: VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) xvi4ger8pp: VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) Positive multiply, Positive accumulate xvi8ger

[RFC PATCH v2 7/7] target/ppc: Implemented [pm]xvbf16ger2*

2022-05-06 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvbf16ger2: VSX Vector bfloat16 GER (rank-2 update) xvbf16ger2nn: VSX Vector bfloat16 GER (rank-2 update) Negative multiply, Negative accumulate xvbf16ger2np: VSX Vector bfloat16 GER (ran

[RFC PATCH v2 4/7] target/ppc: Implemented xvf*ger*

2022-05-06 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvf32ger: VSX Vector 32-bit Floating-Point GER (rank-1 update) xvf32gernn: VSX Vector 32-bit Floating-Point GER (rank-1 update) Negative multiply, Negative accumulate xvf32gernp: VSX Vec

[PATCH 1/2] tests/tcg/ppc64le: Added an overflow with OE=1 test

2022-08-17 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Added a test to see if the adjustment is being made correctly when an overflow occurs and OE is set. Signed-off-by: Lucas Mateus Castro (alqotel) --- The prctl patch is not ready yet, so this patch does as Richard Henderson suggested and ch

[PATCH 2/2] tests/tcg/ppc64le: Added an underflow with UE=1 test

2022-08-17 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Added a test to see if the adjustment is being made correctly when an underflow occurs and UE is set. Signed-off-by: Lucas Mateus Castro (alqotel) --- This patch will also fail without the underflow with UE set bugfix Message-Id:<2022080514

[PATCH v2 1/2] tests/tcg/ppc64le: Added an overflow with OE=1 test

2022-08-18 Thread Lucas Mateus Castro(alqotel)
Added a test to see if the adjustment is being made correctly when an overflow occurs and OE is set. Signed-off-by: Lucas Mateus Castro (alqotel) --- The prctl patch is not ready yet, so this patch does as Richard Henderson suggested and check the fp register in the signal handler This patch

[PATCH v2 2/2] tests/tcg/ppc64le: Added an underflow with UE=1 test

2022-08-18 Thread Lucas Mateus Castro(alqotel)
Added a test to see if the adjustment is being made correctly when an underflow occurs and UE is set. Signed-off-by: Lucas Mateus Castro (alqotel) --- This patch will also fail without the underflow with UE set bugfix Message-Id:<20220805141522.412864-3-lucas.ara...@eldorado.org.br> ---

[PATCH 02/12] target/ppc: Move VMH[R]ADDSHS instruction to decodetree

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" This patch moves VMHADDSHS and VMHRADDSHS to decodetree I couldn't find a satisfactory implementation with TCG inline. vmhaddshs: reptloopmaster patch 8 12500 0,02983400 0,02648500 (-11.2%) 25 400

[PATCH 00/12] VMX/VSX instructions with gvec

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" This patch series moves some instructions from decode legacy to decodetree and translate said instructions with gvec. Some cases using gvec ended up with a bigger, more complex and slower so those instructions were only moved to decodetree. In

[PATCH 04/12] target/ppc: Move VNEG[WD] to decodtree and use gvec

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved the instructions VNEGW and VNEGD to decodetree and used gvec to decode it. vnegw: reptloopmaster patch 8 12500 0,01053200 0,00548400 (-47.9%) 25 40000,01030500 0,0039 (-62.2%) 10

[PATCH 09/12] target/ppc: Use gvec to decode XVCPSGN[SD]P

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved XVCPSGNSP and XVCPSGNDP to decodetree and used gvec to translate them. xvcpsgnsp: reptloopmaster patch 8 12500 0,00722000 0,00587700 (-18.6%) 25 40000,00604300 0,00521500 (-13.7%) 10

[PATCH 01/12] target/ppc: Moved VMLADDUHM to decodetree and use gvec

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" This patch moves VMLADDUHM to decodetree a creates a gvec implementation using mul_vec and add_vec. reptloopmaster patch 8 12500 0,01810500 0,00903100 (-50.1%) 25 40000,01739400 0,00747700 (-

[PATCH 03/12] target/ppc: Move V(ADD|SUB)CUW to decodetree and use gvec

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" This patch moves VADDCUW and VSUBCUW to decodtree with gvec using an implementation based on the helper, with the main difference being changing the -1 (aka all bits set to 1) result returned by cmp when true to +1 vaddcuw: reptloop

[PATCH 07/12] target/ppc: Move VABSDU[BHW] to decodetree and use gvec

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved VABSDUB, VABSDUH and VABSDUW to decodetree and use gvec to translate them. vabsdub: reptloopmaster patch 8 12500 0,03601600 0,00688500 (-80.9%) 25 40000,03651000 0,00532100 (-85.4%) 10

[PATCH 05/12] target/ppc: Move VPRTYB[WDQ] to decodetree and use gvec

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved VPRTYBW and VPRTYBD to use gvec and both of them and VPRTYBQ to decodetree. vprtybw: reptloopmaster patch 8 12500 0,01215900 0,00705600 (-42.0%) 25 40000,01198700 0,00574400 (-52.1%) 10

[PATCH 08/12] target/ppc: Use gvec to decode XV[N]ABS[DS]P/XVNEG[DS]P

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved XVABSSP, XVABSDP, XVNABSSP,XVNABSDP, XVNEGSP and XVNEGDP to decodetree and used gvec to translate them. xvabssp: reptloopmaster patch 8 12500 0,00477900 0,00476000 (-0.4%) 25 4000

[PATCH 06/12] target/ppc: Move VAVG[SU][BHW] to decodetree and use gvec

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved the instructions VAVGUB, VAVGUH, VAVGUW, VAVGSB, VAVGSH, VAVGSW, to decodetree and use gvec with them. For these one the right shift had to be made before the sum as to avoid an overflow, so add 1 at the end if any of the entries had 1 in its

[PATCH 10/12] target/ppc: Moved XVTSTDC[DS]P to decodetree

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved XVTSTDCSP and XVTSTDCDP to decodetree an restructured the helper to be simpler and do all decoding in the decodetree (so XB, XT and DCMX are all calculated outside the helper). Obs: The tests in this one are slightly different, these are

[PATCH 11/12] target/ppc: Moved XSTSTDC[QDS]P to decodetree

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved XSTSTDCSP, XSTSTDCDP and XSTSTDCQP to decodetree and moved some of its decoding away from the helper as previously the DCMX, XB and BF were calculated in the helper with the help of cpu_env, now that part was moved to the decodetree wit

[PATCH 12/12] target/ppc: Use gvec to decode XVTSTDC[DS]P

2022-09-23 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Used gvec to translate XVTSTDCSP and XVTSTDCDP. xvtstdcsp: reptlooppatch10 patch12 8 12500 2,70288900 1,24050300 (-54.1%) 25 40002,65665700 1,14078900 (-57.1%) 100 1000

[PATCH v6 2/8] target/ppc: Implemented xvi*ger* instructions

2022-05-24 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvi4ger8: VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) xvi4ger8pp: VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) Positive multiply, Positive accumulate xvi8ger

[PATCH v6 0/8] VSX MMA Implementation

2022-05-24 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Based-on: https://gitlab.com/danielhb/qemu/-/tree/ppc-next This patch series is a patch series of the Matrix-Multiply Assist (MMA) instructions implementation from the PowerISA 3.1 This patch series was created based on Victor's target/pp

[PATCH v6 5/8] target/ppc: Implemented xvf16ger*

2022-05-24 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvf16ger2: VSX Vector 16-bit Floating-Point GER (rank-2 update) xvf16ger2nn: VSX Vector 16-bit Floating-Point GER (rank-2 update) Negative multiply, Negative accumulate xvf16ger2np: VSX Vec

[PATCH v6 4/8] target/ppc: Implemented xvf*ger*

2022-05-24 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvf32ger: VSX Vector 32-bit Floating-Point GER (rank-1 update) xvf32gernn: VSX Vector 32-bit Floating-Point GER (rank-1 update) Negative multiply, Negative accumulate xvf32gernp: VSX Vec

[PATCH v6 1/8] target/ppc: Implement xxm[tf]acc and xxsetaccz

2022-05-24 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xxmfacc: VSX Move From Accumulator xxmtacc: VSX Move To Accumulator xxsetaccz: VSX Set Accumulator to Zero The PowerISA 3.1 mentions that for the current version of the architecture, &qu

[PATCH v6 6/8] target/ppc: Implemented pmxvf*ger*

2022-05-24 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: pmxvf16ger2: Prefixed Masked VSX Vector 16-bit Floating-Point GER (rank-2 update) pmxvf16ger2nn: Prefixed Masked VSX Vector 16-bit Floating-Point GER (rank-2 update) Negative multiply, Negative

[PATCH v6 3/8] target/ppc: Implemented pmxvi*ger* instructions

2022-05-24 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: pmxvi4ger8: Prefixed Masked VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) pmxvi4ger8pp: Prefixed Masked VSX Vector 8-bit Signed/Unsigned Integer GER (rank-4 update) Positiv

[PATCH v6 7/8] target/ppc: Implemented [pm]xvbf16ger2*

2022-05-24 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: xvbf16ger2: VSX Vector bfloat16 GER (rank-2 update) xvbf16ger2nn: VSX Vector bfloat16 GER (rank-2 update) Negative multiply, Negative accumulate xvbf16ger2np: VSX Vector bfloat16 GER (ran

[PATCH v6 8/8] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap

2022-05-24 Thread Lucas Mateus Castro(alqotel)
From: Joel Stanley These are new hwcap bits added for power10. Signed-off-by: Joel Stanley Signed-off-by: Lucas Mateus Castro (alqotel) Reviewed-by: Richard Henderson --- linux-user/elfload.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c

[PATCH RESEND v3 6/8] target/ppc: Implemented remaining vector divide extended

2022-05-25 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: vdivesd: Vector Divide Extended Signed Doubleword vdiveud: Vector Divide Extended Unsigned Doubleword vdivesq: Vector Divide Extended Signed Quadword vdiveuq: Vector Divide Extended Unsigne

[PATCH RESEND v3 2/8] target/ppc: Implemented vector divide quadword

2022-05-25 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: vdivsq: Vector Divide Signed Quadword vdivuq: Vector Divide Unsigned Quadword Signed-off-by: Lucas Mateus Castro (alqotel) Reviewed-by: Richard Henderson --- target/ppc/helper.h

[PATCH RESEND v3 1/8] target/ppc: Implemented vector divide instructions

2022-05-25 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: vdivsw: Vector Divide Signed Word vdivuw: Vector Divide Unsigned Word vdivsd: Vector Divide Signed Doubleword vdivud: Vector Divide Unsigned Doubleword Signed-off-by: Lucas Mateus Castr

[PATCH RESEND v3 5/8] host-utils: Implemented signed 256-by-128 division

2022-05-25 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Based on already existing QEMU implementation created a signed 256 bit by 128 bit division needed to implement the vector divide extended signed quadword instruction from PowerISA 3.1 Signed-off-by: Lucas Mateus Castro (alqotel) Reviewed-b

[PATCH RESEND v3 7/8] target/ppc: Implemented vector module word/doubleword

2022-05-25 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: vmodsw: Vector Modulo Signed Word vmoduw: Vector Modulo Unsigned Word vmodsd: Vector Modulo Signed Doubleword vmodud: Vector Modulo Unsigned Doubleword Signed-off-by: Lucas Mateus Castr

[PATCH RESEND v3 3/8] target/ppc: Implemented vector divide extended word

2022-05-25 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: vdivesw: Vector Divide Extended Signed Word vdiveuw: Vector Divide Extended Unsigned Word Signed-off-by: Lucas Mateus Castro (alqotel) --- target/ppc/insn32.decode| 3 ++

[PATCH RESEND v3 4/8] host-utils: Implemented unsigned 256-by-128 division

2022-05-25 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Based on already existing QEMU implementation, created an unsigned 256 bit by 128 bit division needed to implement the vector divide extended unsigned instruction from PowerISA3.1 Signed-off-by: Lucas Mateus Castro (alqotel) --- This patch ha

[PATCH RESEND v3 8/8] target/ppc: Implemented vector module quadword

2022-05-25 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: vmodsq: Vector Modulo Signed Quadword vmoduq: Vector Modulo Unsigned Quadword Signed-off-by: Lucas Mateus Castro (alqotel) Reviewed-by: Richard Henderson Resolves: https://gitlab.com/qemu-pr

[RFC PATCH RESEND] scripts/checkpatch.pl: Change line limit warning

2022-06-06 Thread Lucas Mateus Castro(alqotel)
: 20201105154208.12442-1-ganqi...@huawei.com Signed-off-by: Lucas Mateus Castro(alqotel) --- Currently there's a disagreement between the checkpatch code and the documentation, this RFC just changes the checkpatch to match the documentation. But there was a discussion in 2020 as the best way to deal

[PATCH 00/10] VDIV/VMOD Implementation

2022-03-30 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" This patch series is an implementation of the vector divide, vector divide extended and vector modulo instructions from PowerISA 3.1 The first 2 patches are Matheus' patches used here since the divs256 and divu256 functions use in

[PATCH 04/10] target/ppc: Implemented vector divide quadword

2022-03-30 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Implement the following PowerISA v3.1 instructions: vdivsq: Vector Divide Signed Quadword vdivuq: Vector Divide Unsigned Quadword Undefined behavior based on mambo. Signed-off-by: Lucas Mateus Castro (alqotel) --- target/ppc/helper.h

  1   2   3   >