Skip to content

OpenRISC updates for user space FPU

Stafford Horne openrisc qemu-devel 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesNew
  2. v23 patches 5 repliesSuperseded
  3. v13 patches 7 repliesSuperseded

Changes in v3 from the cover letter

- Add reviewed-by's from Richard
- Pull cpu definition out of ifdef in helper_mfspr

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3target/openrisc: Allow fpcsr access in user modetarget/openrisc/sys_helper.c target/openrisc/translate.c+66 -510 replies
2/3target/openrisc: Set PC to cpu state on FPU exceptiontarget/openrisc/fpu_helper.c+11 -20 replies
3/3target/openrisc: Setup FPU for detecting tininess before roundingtarget/openrisc/cpu.c+4 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchRichard Henderson
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] OpenRISC updates for user space FPU

Hello,

Since v2:
- Add reviewed-by's from Richard
- Pull cpu definition out of ifdef in helper_mfspr
Since v1:
- Fixups suggested by Richard Henderson

This series adds support for the FPU related architecture changes defined in architecture spec revision v1.4.

- https://openrisc.io/revisions/r1.4

In summary the architecture changes are:

- Change FPCSR SPR permissions to allow for reading and writing from user space.
- Clarify that FPU underflow detection is done by detecting tininess before rounding.

Previous to this series FPCSR reads and writes from user-mode in QEMU would throw an illegal argument exception. The proper behavior should have been to treat these operations as no-ops as the cpu implementations do. As mentioned series changes FPCSR read/write to follow the spec.

The series has been tested with the FPU support added in glibc test suite and all math tests are passing.

Stafford Horne (3):
target/openrisc: Allow fpcsr access in user mode target/openrisc: Set PC to cpu state on FPU exception target/openrisc: Setup FPU for detecting tininess before rounding

 target/openrisc/cpu.c        |  4 ++
 target/openrisc/fpu_helper.c | 13 ++++++-
 target/openrisc/sys_helper.c | 45 ++++++++++++++++------
 target/openrisc/translate.c  | 72 ++++++++++++++++--------------------
 4 files changed, 81 insertions(+), 53 deletions(-)
Signature · 1 line
2.39.1