22 |
#include "fpa11.h" |
#include "fpa11.h" |
23 |
|
|
24 |
/* Read and write floating point status register */ |
/* Read and write floating point status register */ |
25 |
extern __inline__ unsigned int readFPSR(void) |
static inline unsigned int readFPSR(void) |
26 |
{ |
{ |
27 |
FPA11 *fpa11 = GET_FPA11(); |
FPA11 *fpa11 = GET_FPA11(); |
28 |
return(fpa11->fpsr); |
return(fpa11->fpsr); |
29 |
} |
} |
30 |
|
|
31 |
extern __inline__ void writeFPSR(FPSR reg) |
static inline void writeFPSR(FPSR reg) |
32 |
{ |
{ |
33 |
FPA11 *fpa11 = GET_FPA11(); |
FPA11 *fpa11 = GET_FPA11(); |
34 |
/* the sysid byte in the status register is readonly */ |
/* the sysid byte in the status register is readonly */ |
36 |
} |
} |
37 |
|
|
38 |
/* Read and write floating point control register */ |
/* Read and write floating point control register */ |
39 |
extern __inline__ FPCR readFPCR(void) |
static inline FPCR readFPCR(void) |
40 |
{ |
{ |
41 |
FPA11 *fpa11 = GET_FPA11(); |
FPA11 *fpa11 = GET_FPA11(); |
42 |
/* clear SB, AB and DA bits before returning FPCR */ |
/* clear SB, AB and DA bits before returning FPCR */ |
43 |
return(fpa11->fpcr & ~MASK_RFC); |
return(fpa11->fpcr & ~MASK_RFC); |
44 |
} |
} |
45 |
|
|
46 |
extern __inline__ void writeFPCR(FPCR reg) |
static inline void writeFPCR(FPCR reg) |
47 |
{ |
{ |
48 |
FPA11 *fpa11 = GET_FPA11(); |
FPA11 *fpa11 = GET_FPA11(); |
49 |
fpa11->fpcr &= ~MASK_WFC; /* clear SB, AB and DA bits */ |
fpa11->fpcr &= ~MASK_WFC; /* clear SB, AB and DA bits */ |