openrisc.lists.librecores.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] OpenRISC updates for user space FPU
@ 2023-05-02 18:57 Stafford Horne
  2023-05-02 18:57 ` [PATCH 1/3] target/openrisc: Allow fpcsr access in user mode Stafford Horne
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Stafford Horne @ 2023-05-02 18:57 UTC (permalink / raw)
  To: QEMU Development; +Cc: Linux OpenRISC, Stafford Horne

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        |  5 +++
 target/openrisc/fpu_helper.c |  4 ++
 target/openrisc/sys_helper.c | 45 +++++++++++++++++-----
 target/openrisc/translate.c  | 72 ++++++++++++++++--------------------
 4 files changed, 76 insertions(+), 50 deletions(-)

-- 
2.39.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-05-03 16:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 18:57 [PATCH 0/3] OpenRISC updates for user space FPU Stafford Horne
2023-05-02 18:57 ` [PATCH 1/3] target/openrisc: Allow fpcsr access in user mode Stafford Horne
2023-05-03  6:29   ` Stafford Horne
2023-05-02 18:57 ` [PATCH 2/3] target/openrisc: Set PC to cpu state on FPU exception Stafford Horne
2023-05-03  7:36   ` Richard Henderson
2023-05-03  9:12     ` Stafford Horne
2023-05-02 18:57 ` [PATCH 3/3] target/openrisc: Setup FPU for detecting tininess before rounding Stafford Horne
2023-05-03  7:37   ` Richard Henderson
2023-05-03  9:14     ` Stafford Horne
2023-05-03  9:41       ` Richard Henderson
2023-05-03 16:31         ` Stafford Horne

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).