Re: [PATCH 1/4] riscv: Use current pseudo-instructions to access the FCSR register
Kito Cheng <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CA+yXCZC7kwk_YAn6o56eOz2KDwFxp9497oVx2jrsJpDPua1SFQ@mail.gmail.com> |
Hi Keith: LGTM, thanks :) On Tue, Jan 21, 2020 at 2:47 PM Keith Packard <[email protected]> wrote: > > Use fscsr and frcsr to store and read the FCSR register instead of > fssr and frsr. > > Signed-off-by: Keith Packard <[email protected]> > --- > 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 >