[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/4] Refactor get_fpstatus_ptr() ready for AArch32 fp16
From: |
Peter Maydell |
Subject: |
[PATCH 0/4] Refactor get_fpstatus_ptr() ready for AArch32 fp16 |
Date: |
Thu, 6 Aug 2020 11:44:49 +0100 |
This patchset refactors the existing get_fpstatus_ptr() functions,
and fixes a bug where we weren't getting FZ16 right for AArch32
VCMLA, VCADD of fp16 types.
We currently have two versions of get_fpstatus_ptr(), which both take
an effectively boolean argument:
* the one for A64 takes "bool is_f16" to distinguish fp16 from other ops
* the one for A32/T32 takes "int neon" to distinguish Neon from other ops
This is confusing, and to implement ARMv8.2-FP16 the A32/T32 one will
need to make a four-way distinction between "non-Neon, FP16",
"non-Neon, single/double", "Neon, FP16" and "Neon, single/double".
The A64 version will then be a strict subset of the A32/T32 version.
The patchset creates a single fpstatus_ptr() function which takes
an enum selecting between the 4 possible fpstatus options.
It then adds the implementation of the "Neon standard FPST for f16".
Finally, we can then use to fix a bug in the VCMLA/VCADD fp16
handling where we were using FPST_STD rather than FPST_STD_F16.
(The difference is that the former will not honour FPSCR.FZ16.)
Based-on: 20200803111849.13368-1-peter.maydell@linaro.org
("[PATCH 0/7] target/arm: copro decode cleanup)
but only textually; there are no semantic dependencies to that series.
thanks
-- PMM
Peter Maydell (4):
target/arm: Replace A64 get_fpstatus_ptr() with generic fpstatus_ptr()
target/arm: Make A32/T32 use new fpstatus_ptr() API
target/arm: Implement FPST_STD_F16 fpstatus
target/arm: Use correct FPST for VCMLA, VCADD on fp16
target/arm/cpu.h | 9 +++-
target/arm/translate-a64.h | 1 -
target/arm/translate.h | 52 +++++++++++++++++++
target/arm/cpu.c | 3 ++
target/arm/translate-a64.c | 89 +++++++++++++--------------------
target/arm/translate-neon.inc.c | 28 +++++------
target/arm/translate-sve.c | 34 ++++++-------
target/arm/translate-vfp.inc.c | 44 ++++++++--------
target/arm/translate.c | 13 -----
target/arm/vfp_helper.c | 5 ++
10 files changed, 156 insertions(+), 122 deletions(-)
--
2.20.1
- [PATCH 0/4] Refactor get_fpstatus_ptr() ready for AArch32 fp16,
Peter Maydell <=
- [PATCH 1/4] target/arm: Replace A64 get_fpstatus_ptr() with generic fpstatus_ptr(), Peter Maydell, 2020/08/06
- [PATCH 3/4] target/arm: Implement FPST_STD_F16 fpstatus, Peter Maydell, 2020/08/06
- [PATCH 2/4] target/arm: Make A32/T32 use new fpstatus_ptr() API, Peter Maydell, 2020/08/06
- [PATCH 4/4] target/arm: Use correct FPST for VCMLA, VCADD on fp16, Peter Maydell, 2020/08/06
- Re: [PATCH 0/4] Refactor get_fpstatus_ptr() ready for AArch32 fp16, Richard Henderson, 2020/08/06