this repo has no description
1/*
2 * Adapted from original written by J.T. Conklin <jtc@netbsd.org>.
3 * Public domain.
4 *
5 * by Ian Ollmann, Apple Computer 2006
6 */
7
8#include <machine/asm.h>
9#include "abi.h"
10
11
12PRIVATE_ENTRY(__cosl) //currently required for single and double
13ENTRY(cosl)
14 fldt FIRST_ARG_OFFSET(STACKP)
15 fcos
16 fnstsw %ax
17 andw $0x400,%ax
18 jnz 1f
19 ret
20
211: fldpi
22 fadd %st(0)
23 fxch %st(1)
242: fprem1
25 fnstsw %ax
26 andw $0x400,%ax
27 jnz 2b
28 fstp %st(1)
29 fcos
30 ret
31