This source file includes following definitions.
- fadd__
- fmul__
- fsub__
- fsubr_
- fdiv__
- fdivr_
- fadd_i
- fmul_i
- fsubri
- fsub_i
- fdivri
- fdiv_i
- faddp_
- fmulp_
- fsubrp
- fsubp_
- fdivrp
- fdivp_
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #include "fpu_system.h"
15 #include "fpu_emu.h"
16 #include "control_w.h"
17 #include "status_w.h"
18
19 void fadd__(void)
20 {
21
22 int i = FPU_rm;
23 clear_C1();
24 FPU_add(&st(i), FPU_gettagi(i), 0, control_word);
25 }
26
27 void fmul__(void)
28 {
29
30 int i = FPU_rm;
31 clear_C1();
32 FPU_mul(&st(i), FPU_gettagi(i), 0, control_word);
33 }
34
35 void fsub__(void)
36 {
37
38 clear_C1();
39 FPU_sub(0, FPU_rm, control_word);
40 }
41
42 void fsubr_(void)
43 {
44
45 clear_C1();
46 FPU_sub(REV, FPU_rm, control_word);
47 }
48
49 void fdiv__(void)
50 {
51
52 clear_C1();
53 FPU_div(0, FPU_rm, control_word);
54 }
55
56 void fdivr_(void)
57 {
58
59 clear_C1();
60 FPU_div(REV, FPU_rm, control_word);
61 }
62
63 void fadd_i(void)
64 {
65
66 int i = FPU_rm;
67 clear_C1();
68 FPU_add(&st(i), FPU_gettagi(i), i, control_word);
69 }
70
71 void fmul_i(void)
72 {
73
74 clear_C1();
75 FPU_mul(&st(0), FPU_gettag0(), FPU_rm, control_word);
76 }
77
78 void fsubri(void)
79 {
80
81 clear_C1();
82 FPU_sub(DEST_RM, FPU_rm, control_word);
83 }
84
85 void fsub_i(void)
86 {
87
88 clear_C1();
89 FPU_sub(REV | DEST_RM, FPU_rm, control_word);
90 }
91
92 void fdivri(void)
93 {
94
95 clear_C1();
96 FPU_div(DEST_RM, FPU_rm, control_word);
97 }
98
99 void fdiv_i(void)
100 {
101
102 clear_C1();
103 FPU_div(REV | DEST_RM, FPU_rm, control_word);
104 }
105
106 void faddp_(void)
107 {
108
109 int i = FPU_rm;
110 clear_C1();
111 if (FPU_add(&st(i), FPU_gettagi(i), i, control_word) >= 0)
112 FPU_pop();
113 }
114
115 void fmulp_(void)
116 {
117
118 clear_C1();
119 if (FPU_mul(&st(0), FPU_gettag0(), FPU_rm, control_word) >= 0)
120 FPU_pop();
121 }
122
123 void fsubrp(void)
124 {
125
126 clear_C1();
127 if (FPU_sub(DEST_RM, FPU_rm, control_word) >= 0)
128 FPU_pop();
129 }
130
131 void fsubp_(void)
132 {
133
134 clear_C1();
135 if (FPU_sub(REV | DEST_RM, FPU_rm, control_word) >= 0)
136 FPU_pop();
137 }
138
139 void fdivrp(void)
140 {
141
142 clear_C1();
143 if (FPU_div(DEST_RM, FPU_rm, control_word) >= 0)
144 FPU_pop();
145 }
146
147 void fdivp_(void)
148 {
149
150 clear_C1();
151 if (FPU_div(REV | DEST_RM, FPU_rm, control_word) >= 0)
152 FPU_pop();
153 }