Revision 3b46e624 target-arm/nwfpe/fpa11_cpdo.c
b/target-arm/nwfpe/fpa11_cpdo.c | ||
---|---|---|
30 | 30 |
{ |
31 | 31 |
FPA11 *fpa11 = GET_FPA11(); |
32 | 32 |
unsigned int Fd, nType, nDest, nRc = 1; |
33 |
|
|
33 |
|
|
34 | 34 |
//printk("EmulateCPDO(0x%08x)\n",opcode); |
35 | 35 |
|
36 | 36 |
/* Get the destination size. If not valid let Linux perform |
37 | 37 |
an invalid instruction trap. */ |
38 | 38 |
nDest = getDestinationSize(opcode); |
39 | 39 |
if (typeNone == nDest) return 0; |
40 |
|
|
40 |
|
|
41 | 41 |
SetRoundingMode(opcode); |
42 |
|
|
42 |
|
|
43 | 43 |
/* Compare the size of the operands in Fn and Fm. |
44 | 44 |
Choose the largest size and perform operations in that size, |
45 | 45 |
in order to make use of all the precision of the operands. |
... | ... | |
49 | 49 |
nType = nDest; |
50 | 50 |
else |
51 | 51 |
nType = fpa11->fType[getFn(opcode)]; |
52 |
|
|
52 |
|
|
53 | 53 |
if (!CONSTANT_FM(opcode)) |
54 | 54 |
{ |
55 | 55 |
register unsigned int Fm = getFm(opcode); |
... | ... | |
86 | 86 |
floatx80_to_float32(fpa11->fpreg[Fd].fExtended, &fpa11->fp_status); |
87 | 87 |
} |
88 | 88 |
break; |
89 |
|
|
89 |
|
|
90 | 90 |
case typeDouble: |
91 | 91 |
{ |
92 | 92 |
if (typeSingle == nType) |
... | ... | |
97 | 97 |
floatx80_to_float64(fpa11->fpreg[Fd].fExtended, &fpa11->fp_status); |
98 | 98 |
} |
99 | 99 |
break; |
100 |
|
|
100 |
|
|
101 | 101 |
case typeExtended: |
102 | 102 |
{ |
103 | 103 |
if (typeSingle == nType) |
... | ... | |
109 | 109 |
} |
110 | 110 |
break; |
111 | 111 |
} |
112 |
|
|
112 |
|
|
113 | 113 |
fpa11->fType[Fd] = nDest; |
114 | 114 |
} |
115 |
|
|
115 |
|
|
116 | 116 |
return nRc; |
117 | 117 |
} |
Also available in: Unified diff