NOTE => NOTES
[AROS.git] / arch / m68k-all / mathieeedoubbas / mathieeedoubbas_init.c
blob3859f31c0e3cadb1b3fdc07f34e193ff311e7d44
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Init of 68k/FPU mathieeedoubbas.library
6 Lang: english
7 */
8 #include <aros/symbolsets.h>
9 #include <aros/libcall.h>
10 #include <utility/utility.h> /* this must be before mathieeedoubbas_intern.h */
12 #include "mathieeedoubbas_intern.h"
14 #define SetFunc(a,b) SetFunction((struct Library *)lh, a * -LIB_VECTSIZE, AROS_SLIB_ENTRY(b,MathIeeeDoubBas,a))
16 extern void AROS_SLIB_ENTRY(Fix_6888x,MathIeeeDoubBas,5)(void);
17 extern void AROS_SLIB_ENTRY(Flt_6888x,MathIeeeDoubBas,6)(void);
19 extern void AROS_SLIB_ENTRY(Abs_6888x,MathIeeeDoubBas,9)(void);
20 extern void AROS_SLIB_ENTRY(Neg_6888x,MathIeeeDoubBas,10)(void);
21 extern void AROS_SLIB_ENTRY(Add_6888x,MathIeeeDoubBas,11)(void);
22 extern void AROS_SLIB_ENTRY(Sub_6888x,MathIeeeDoubBas,12)(void);
23 extern void AROS_SLIB_ENTRY(Mul_6888x,MathIeeeDoubBas,13)(void);
24 extern void AROS_SLIB_ENTRY(Div_6888x,MathIeeeDoubBas,14)(void);
25 extern void init_6888x_double(void);
27 static int IEEEDP_Open(struct MathIeeeDoubBasBase *lh)
29 if (SysBase->AttnFlags & (AFF_68881 | AFF_68882 | AFF_FPU40))
30 init_6888x_double();
31 return TRUE;
34 static int IEEEDP_Init(struct MathIeeeDoubBasBase *lh)
36 if (SysBase->AttnFlags & (AFF_68881 | AFF_68882 | AFF_FPU40)) {
37 SetFunc(5, Fix_6888x);
38 SetFunc(6, Flt_6888x);
39 //SetFunc(7, Cmp_6888x); use software
40 //SetFunc(8, Tst_6888x); use software
41 SetFunc(9, Abs_6888x);
42 SetFunc(10, Neg_6888x);
43 SetFunc(11, Add_6888x);
44 SetFunc(12, Sub_6888x);
45 SetFunc(13, Mul_6888x);
46 SetFunc(14, Div_6888x);
47 //SetFunc(15, Floor_6888x); use software
48 //SetFunc(16, Ceil_6888x); use software
50 return TRUE;
53 ADD2INITLIB(IEEEDP_Init, 0)
54 ADD2OPENLIB(IEEEDP_Open, 0)