Revision 5fafdf24 target-arm/nwfpe/extended_cpdo.c
b/target-arm/nwfpe/extended_cpdo.c | ||
---|---|---|
42 | 42 |
unsigned int Fd, Fm, Fn, nRc = 1; |
43 | 43 |
|
44 | 44 |
//printk("ExtendedCPDO(0x%08x)\n",opcode); |
45 |
|
|
45 |
|
|
46 | 46 |
Fm = getFm(opcode); |
47 | 47 |
if (CONSTANT_FM(opcode)) |
48 | 48 |
{ |
49 | 49 |
rFm = getExtendedConstant(Fm); |
50 | 50 |
} |
51 | 51 |
else |
52 |
{
|
|
52 |
{ |
|
53 | 53 |
switch (fpa11->fType[Fm]) |
54 | 54 |
{ |
55 | 55 |
case typeSingle: |
... | ... | |
59 | 59 |
case typeDouble: |
60 | 60 |
rFm = float64_to_floatx80(fpa11->fpreg[Fm].fDouble, &fpa11->fp_status); |
61 | 61 |
break; |
62 |
|
|
62 |
|
|
63 | 63 |
case typeExtended: |
64 | 64 |
rFm = fpa11->fpreg[Fm].fExtended; |
65 | 65 |
break; |
66 |
|
|
66 |
|
|
67 | 67 |
default: return 0; |
68 | 68 |
} |
69 | 69 |
} |
70 |
|
|
70 |
|
|
71 | 71 |
if (!MONADIC_INSTRUCTION(opcode)) |
72 | 72 |
{ |
73 | 73 |
Fn = getFn(opcode); |
... | ... | |
80 | 80 |
case typeDouble: |
81 | 81 |
rFn = float64_to_floatx80(fpa11->fpreg[Fn].fDouble, &fpa11->fp_status); |
82 | 82 |
break; |
83 |
|
|
83 |
|
|
84 | 84 |
case typeExtended: |
85 | 85 |
rFn = fpa11->fpreg[Fn].fExtended; |
86 | 86 |
break; |
87 |
|
|
87 |
|
|
88 | 88 |
default: return 0; |
89 | 89 |
} |
90 | 90 |
} |
... | ... | |
204 | 204 |
|
205 | 205 |
case NRM_CODE: |
206 | 206 |
break; |
207 |
|
|
207 |
|
|
208 | 208 |
default: |
209 | 209 |
{ |
210 | 210 |
nRc = 0; |
211 | 211 |
} |
212 | 212 |
} |
213 |
|
|
213 |
|
|
214 | 214 |
if (0 != nRc) fpa11->fType[Fd] = typeExtended; |
215 | 215 |
return nRc; |
216 | 216 |
} |
... | ... | |
263 | 263 |
|
264 | 264 |
floatx80 floatx80_pow(floatx80 rFn,floatx80 rFm) |
265 | 265 |
{ |
266 |
return floatx80_exp(floatx80_mul(rFm,floatx80_ln(rFn)));
|
|
266 |
return floatx80_exp(floatx80_mul(rFm,floatx80_ln(rFn))); |
|
267 | 267 |
} |
268 | 268 |
|
269 | 269 |
floatx80 floatx80_pol(floatx80 rFn,floatx80 rFm) |
270 | 270 |
{ |
271 |
return floatx80_arctan(floatx80_div(rFn,rFm));
|
|
271 |
return floatx80_arctan(floatx80_div(rFn,rFm)); |
|
272 | 272 |
} |
273 | 273 |
#endif |
Also available in: Unified diff