[newlib-cygwin] riscv: Use current pseudo-instructions to access the FCSR register

Corinna Vinschen corinna@sourceware.org
Tue Jan 21 09:28:00 GMT 2020


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=954504ea1424069c7c8d34fe771a505df8b8e3e1

commit 954504ea1424069c7c8d34fe771a505df8b8e3e1
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Jan 20 22:46:34 2020 -0800

    riscv: Use current pseudo-instructions to access the FCSR register
    
    Use fscsr and frcsr to store and read the FCSR register instead of
    fssr and frsr.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

Diff:
---
 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 9094cc6..68ace0b 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;
 }



More information about the Newlib-cvs mailing list