[PATCH 1/4] riscv: Use current pseudo-instructions to access the FCSR register

Corinna Vinschen vinschen@redhat.com
Tue Jan 21 09:31:00 GMT 2020


On Jan 20 22:46, Keith Packard wrote:
> 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

Patches 1-3 pushed.  Patch 4 is still under discussion, iiuc?

Keith, a --cover-letter for patch series would be nice, if only
to allow patchset-wide discussions to appear in a neutral place :)


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20200121/e93f9606/attachment.sig>


More information about the Newlib mailing list