xref: /openbsd-src/lib/libc/arch/sh/gen/infinity.c (revision be9b70502a319be1934f8cfd5be7f470be741ce6)
1*be9b7050Sguenther /*	$OpenBSD: infinity.c,v 1.4 2014/07/21 01:51:10 guenther Exp $	*/
2cf252584Smiod 
3cf252584Smiod /* infinity.c */
4cf252584Smiod 
5*be9b7050Sguenther #include <endian.h>
6cf252584Smiod #include <math.h>
7cf252584Smiod 
8cf252584Smiod /* bytes for +Infinity on a SH4 FPU (double precision) */
9cf252584Smiod char __infinity[] __attribute__((__aligned__(sizeof(double)))) =
10*be9b7050Sguenther #if BYTE_ORDER == LITTLE_ENDIAN
11c7005bdbSotto     { 0, 0, 0, 0, 0, 0, (char)0xf0, 0x7f };
12c7005bdbSotto #else
131d8cadeaSotto     { 0x7f, (char)0xf0, 0, 0, 0, 0, 0, 0 };
14c7005bdbSotto #endif
15