31 static inline void loadSingle(
const unsigned int Fn,
const unsigned int __user *pMem)
35 get_user(fpa11->fpreg[Fn].fSingle, pMem);
38 static inline void loadDouble(
const unsigned int Fn,
const unsigned int __user *pMem)
42 p = (
unsigned int *) &fpa11->fpreg[Fn].fDouble;
53 #ifdef CONFIG_FPE_NWFPE_XP
54 static inline void loadExtended(
const unsigned int Fn,
const unsigned int __user *pMem)
58 p = (
unsigned int *) &fpa11->fpreg[Fn].fExtended;
71 static inline void loadMultiple(
const unsigned int Fn,
const unsigned int __user *pMem)
74 register unsigned int *
p;
77 p = (
unsigned int *) &(fpa11->fpreg[Fn]);
79 fpa11->fType[Fn] = (x >> 14) & 0x00000003;
81 switch (fpa11->fType[Fn]) {
91 #ifdef CONFIG_FPE_NWFPE_XP
96 p[0] = (x & 0x80003fff);
103 static inline void storeSingle(
struct roundingData *roundData,
const unsigned int Fn,
unsigned int __user *pMem)
111 switch (fpa11->fType[Fn]) {
116 #ifdef CONFIG_FPE_NWFPE_XP
118 val.f = floatx80_to_float32(roundData, fpa11->fpreg[Fn].fExtended);
123 val.f = fpa11->fpreg[Fn].fSingle;
129 static inline void storeDouble(
struct roundingData *roundData,
const unsigned int Fn,
unsigned int __user *pMem)
137 switch (fpa11->fType[Fn]) {
142 #ifdef CONFIG_FPE_NWFPE_XP
144 val.f = floatx80_to_float64(roundData, fpa11->fpreg[Fn].fExtended);
149 val.f = fpa11->fpreg[Fn].fDouble;
161 #ifdef CONFIG_FPE_NWFPE_XP
162 static inline void storeExtended(
const unsigned int Fn,
unsigned int __user *pMem)
170 switch (fpa11->fType[Fn]) {
172 val.f = float32_to_floatx80(fpa11->fpreg[Fn].fSingle);
176 val.f = float64_to_floatx80(fpa11->fpreg[Fn].fDouble);
180 val.f = fpa11->fpreg[Fn].fExtended;
194 static inline void storeMultiple(
const unsigned int Fn,
unsigned int __user *pMem)
197 register unsigned int nType, *
p;
199 p = (
unsigned int *) &(fpa11->fpreg[Fn]);
200 nType = fpa11->fType[Fn];
212 #ifdef CONFIG_FPE_NWFPE_XP
217 put_user((p[0] & 0x80003fff) | (nType << 14), &pMem[0]);
226 unsigned int __user *pBase, *pAddress, *pFinal;
227 unsigned int nRc = 1, write_back =
WRITE_BACK(opcode);
229 pBase = (
unsigned int __user *) readRegister(
getRn(opcode));
248 loadSingle(
getFd(opcode), pAddress);
251 loadDouble(
getFd(opcode), pAddress);
253 #ifdef CONFIG_FPE_NWFPE_XP
255 loadExtended(
getFd(opcode), pAddress);
263 writeRegister(
getRn(opcode), (
unsigned long) pFinal);
269 unsigned int __user *pBase, *pAddress, *pFinal;
270 unsigned int nRc = 1, write_back =
WRITE_BACK(opcode);
277 pBase = (
unsigned int __user *) readRegister(
getRn(opcode));
296 storeSingle(&roundData,
getFd(opcode), pAddress);
299 storeDouble(&roundData,
getFd(opcode), pAddress);
301 #ifdef CONFIG_FPE_NWFPE_XP
303 storeExtended(
getFd(opcode), pAddress);
314 writeRegister(
getRn(opcode), (
unsigned long) pFinal);
320 unsigned int __user *pBase, *pAddress, *pFinal;
321 unsigned int i, Fd, write_back =
WRITE_BACK(opcode);
323 pBase = (
unsigned int __user *) readRegister(
getRn(opcode));
341 for (i = getRegisterCount(opcode); i > 0; i--) {
342 loadMultiple(Fd, pAddress);
350 writeRegister(
getRn(opcode), (
unsigned long) pFinal);
356 unsigned int __user *pBase, *pAddress, *pFinal;
357 unsigned int i, Fd, write_back =
WRITE_BACK(opcode);
359 pBase = (
unsigned int __user *) readRegister(
getRn(opcode));
377 for (i = getRegisterCount(opcode); i > 0; i--) {
378 storeMultiple(Fd, pAddress);
386 writeRegister(
getRn(opcode), (
unsigned long) pFinal);
392 unsigned int nRc = 0;
396 }
else if (
LFM_OP(opcode)) {
398 }
else if (
STF_OP(opcode)) {
400 }
else if (
SFM_OP(opcode)) {