xref: /netbsd-src/lib/libc/arch/m68k/gen/flt_rounds_softfloat.S (revision a5847cc334d9a7029f6352b847e9e8d71a0f9e0c)
1/*	$NetBSD: flt_rounds_softfloat.S,v 1.2 2004/09/26 21:13:27 jmmv Exp $	*/
2
3/*
4 * Written by J.T. Conklin, Apr 6, 1995
5 * Public domain.
6
7 * Broken by Bruce O'Neel Aug 4 2003
8	gcc no longer seems to export fpCCR so this fails.
9	for now just return 0.
10 */
11
12#include <machine/asm.h>
13
14	.text
15	.even
16
17	/* NB: this is tied to the gcc-2.95 lb1sf68.asm: */
18_map:
19	.byte 1		/* round to nearest */
20	.byte 0		/* round to zero */
21	.byte 2		/* round to positive infinity */
22	.byte 3		/* round to negative infinity */
23
24ENTRY(__flt_rounds)
25	/* lea	_C_LABEL(_fpCCR),%a0	| check the rounding mode */
26	/* movew	%a0@(6),%d0	| rounding mode in d0 */
27	/* lea	_map,%a0 */
28	moveb	#0,%d0
29	rts
30
31
32
33