public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/4] riscv: Use current pseudo-instructions to access the FCSR register
@ 2020-01-21  6:47 Keith Packard
  2020-01-21  6:47 ` [PATCH 4/4] riscv: Addfpgetroundtoi and fpsetroundtoi stubs Keith Packard
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Keith Packard @ 2020-01-21  6:47 UTC (permalink / raw)
  To: newlib; +Cc: Keith Packard

Use fscsr and frcsr to store and read the FCSR register instead of
fssr and frsr.

Signed-off-by: Keith Packard <keithp@keithp.com>
---
 newlib/libc/machine/riscv/ieeefp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/machine/riscv/ieeefp.c b/newlib/libc/machine/riscv/ieeefp.c
index 9094cc651..68ace0b09 100644
--- a/newlib/libc/machine/riscv/ieeefp.c
+++ b/newlib/libc/machine/riscv/ieeefp.c
@@ -15,14 +15,14 @@
 static void
 fssr(unsigned value)
 {
-  asm volatile ("fssr %0" :: "r"(value));
+  asm volatile ("fscsr %0" :: "r"(value));
 }
 
 static unsigned
 frsr()
 {
   unsigned value;
-  asm volatile ("frsr %0" : "=r" (value));
+  asm volatile ("frcsr %0" : "=r" (value));
   return value;
 }
 
-- 
2.25.0.rc1

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

end of thread, other threads:[~2020-01-22  7:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21  6:47 [PATCH 1/4] riscv: Use current pseudo-instructions to access the FCSR register Keith Packard
2020-01-21  6:47 ` [PATCH 4/4] riscv: Addfpgetroundtoi and fpsetroundtoi stubs Keith Packard
2020-01-21  7:23   ` Kito Cheng
2020-01-21  8:13     ` Keith Packard
2020-01-21  8:23     ` Keith Packard
2020-01-21 22:43       ` Jim Wilson
2020-01-22  7:06         ` Kito Cheng
2020-01-21  6:47 ` [PATCH 3/4] riscv: Map between ieeefp.h exception bits and RISC-V FCSR bits Keith Packard
2020-01-21  6:47 ` [PATCH 2/4] riscv: Add 'break' statements to fpsetround switch Keith Packard
2020-01-21  7:25   ` Kito Cheng
2020-01-21  7:24 ` [PATCH 1/4] riscv: Use current pseudo-instructions to access the FCSR register Kito Cheng
2020-01-21  9:31 ` Corinna Vinschen
2020-01-21  9:36   ` Kito Cheng
2020-01-21 22:03   ` Keith Packard

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 read-only IMAP folder(s) and NNTP newsgroup(s).