diff options
author | br <br@FreeBSD.org> | 2016-01-17 15:21:23 +0000 |
---|---|---|
committer | br <br@FreeBSD.org> | 2016-01-17 15:21:23 +0000 |
commit | e0daa8fb6535861d32643e7056fb5025d04e772e (patch) | |
tree | dc2c17b47c2052a9bdd63857fff9be0a1be00232 /lib/libc/riscv/gen/infinity.c | |
parent | 7d0828c94e6533f7d0d139b0242cf16e417eab8b (diff) | |
download | FreeBSD-src-e0daa8fb6535861d32643e7056fb5025d04e772e.zip FreeBSD-src-e0daa8fb6535861d32643e7056fb5025d04e772e.tar.gz |
Bring in initial libc and libstand support for RISC-V.
Reviewed by: andrew, emaste, kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D4943
Diffstat (limited to 'lib/libc/riscv/gen/infinity.c')
-rw-r--r-- | lib/libc/riscv/gen/infinity.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/libc/riscv/gen/infinity.c b/lib/libc/riscv/gen/infinity.c new file mode 100644 index 0000000..115c470 --- /dev/null +++ b/lib/libc/riscv/gen/infinity.c @@ -0,0 +1,14 @@ +/* + * infinity.c + */ + +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +#include <math.h> + +/* bytes for +Infinity on riscv */ +const union __infinity_un __infinity = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } }; + +/* bytes for NaN */ +const union __nan_un __nan = { { 0, 0, 0xc0, 0xff } }; |