xref: /openbsd/lib/libc/arch/mips64/gen/nan.c (revision 274d7c50)
1 /*	$OpenBSD: nan.c,v 1.3 2014/07/21 01:51:10 guenther Exp $	*/
2 
3 /* Written by Martynas Venckus.  Public Domain. */
4 
5 #include <endian.h>
6 #include <math.h>
7 
8 /* bytes for qNaN on a mips64 (IEEE single format) */
9 char __nan[] __attribute__((__aligned__(sizeof(float)))) =
10 #if BYTE_ORDER == BIG_ENDIAN
11 					{ 0x7f, 0xc0, 0, 0 };
12 #else /* BYTE_ORDER == BIG_ENDIAN */
13 					{ 0, 0, 0xc0, 0x7f };
14 #endif /* BYTE_ORDER == BIG_ENDIAN */
15