summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/sh/gen/nan.c
blob: c1a28f75f0198a9e170ab07171e5adb410990df4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*	$OpenBSD: nan.c,v 1.2 2014/07/21 01:51:10 guenther Exp $	*/

/* Written by Martynas Venckus.  Public Domain. */

#include <endian.h>
#include <math.h>

/* bytes for qNaN on a sh (IEEE single format) */
char __nan[] __attribute__((__aligned__(sizeof(float)))) =
#if BYTE_ORDER == BIG_ENDIAN
					{ 0x7f, 0xa0, 0, 0 };
#else /* BYTE_ORDER == BIG_ENDIAN */
					{ 0, 0, 0xa0, 0x7f };
#endif /* BYTE_ORDER == BIG_ENDIAN */