summaryrefslogtreecommitdiff
path: root/components/external/espruino/libs/math/setprec.688
blob: 104c5b7b163e243d97dd0c82050282ae32cc9f7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* Set 68881/2 floating point rounding precision */
/* Reference: MC68881/MC68882 Floating-Point Coprocessor */
/* User's Manual, Motorola, Prentice-Hall, 1987 (First Edition) */
/* Pages 1-14, 2-3, 4-68. */
/* FPcr code $80 sets the 68882 coprocessor to */
/*    rounding precision = 53 bits */
/*    rounding mode = nearest or even */
/*    all exceptions (bits 8-15) disabled */
/* The instruction is */
/*	FMOVE.L	#$80,Fcr */
/* if the assembler will understand it. */

	.align 2
.text

/* set to single precision */
.globl _sprec
_sprec
	.word 0xf23c,0x9000,0x0000,0x0040
	rts

/* set to double precision */
.globl _dprec

_dprec:
	.word	0xf23c,0x9000,0x0000,0x0080
	rts

/* set to extended (long double) precision */
.globl _ldprec

_ldprec:
	.word	0xf23c,0x9000,0x0000,0x0000
	rts