xref: /openbsd/lib/libc/arch/sh/gen/nan.c (revision 404b540a)
1 /*	$OpenBSD: nan.c,v 1.1 2008/07/24 09:31:06 martynas Exp $	*/
2 
3 /* Written by Martynas Venckus.  Public Domain. */
4 
5 #include <sys/types.h>
6 #include <math.h>
7 #include <machine/endian.h>
8 
9 /* bytes for qNaN on a sh (IEEE single format) */
10 char __nan[] __attribute__((__aligned__(sizeof(float)))) =
11 #if BYTE_ORDER == BIG_ENDIAN
12 					{ 0x7f, 0xa0, 0, 0 };
13 #else /* BYTE_ORDER == BIG_ENDIAN */
14 					{ 0, 0, 0xa0, 0x7f };
15 #endif /* BYTE_ORDER == BIG_ENDIAN */
16