mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-28 20:43:41 +01:00
Fix fpgetprec and fpsetprec.
This commit is contained in:
parent
2729465a89
commit
2a0d3868ad
1 changed files with 11 additions and 4 deletions
|
@ -45,10 +45,14 @@
|
||||||
* XXX: FP*FLD and FP*OFF are undocumented pollution.
|
* XXX: FP*FLD and FP*OFF are undocumented pollution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* VBS
|
||||||
|
|
||||||
#ifndef _SYS_CDEFS_H_
|
#ifndef _SYS_CDEFS_H_
|
||||||
#error this file needs sys/cdefs.h as a prerequisite
|
#error this file needs sys/cdefs.h as a prerequisite
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Rounding modes.
|
* Rounding modes.
|
||||||
*/
|
*/
|
||||||
|
@ -106,7 +110,8 @@ typedef enum {
|
||||||
*/
|
*/
|
||||||
#define FP_STKY_OFF 0 /* sticky flags offset */
|
#define FP_STKY_OFF 0 /* sticky flags offset */
|
||||||
|
|
||||||
#ifdef __GNUCLIKE_ASM
|
//VBS
|
||||||
|
//#ifdef __GNUCLIKE_ASM
|
||||||
|
|
||||||
#define __fldcw(addr) __asm __volatile("fldcw %0" : : "m" (*(addr)))
|
#define __fldcw(addr) __asm __volatile("fldcw %0" : : "m" (*(addr)))
|
||||||
#define __fldenv(addr) __asm __volatile("fldenv %0" : : "m" (*(addr)))
|
#define __fldenv(addr) __asm __volatile("fldenv %0" : : "m" (*(addr)))
|
||||||
|
@ -166,7 +171,8 @@ fpsetround(fp_rnd_t _m)
|
||||||
return (_p);
|
return (_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline fp_prec_t
|
//static __inline fp_prec_t
|
||||||
|
DLLEXPORT fp_prec_t
|
||||||
fpgetprec(void)
|
fpgetprec(void)
|
||||||
{
|
{
|
||||||
unsigned short _cw;
|
unsigned short _cw;
|
||||||
|
@ -175,7 +181,8 @@ fpgetprec(void)
|
||||||
return ((fp_prec_t)((_cw & FP_PRC_FLD) >> FP_PRC_OFF));
|
return ((fp_prec_t)((_cw & FP_PRC_FLD) >> FP_PRC_OFF));
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline fp_prec_t
|
//static __inline fp_prec_t
|
||||||
|
DLLEXPORT fp_prec_t
|
||||||
fpsetprec(fp_prec_t _m)
|
fpsetprec(fp_prec_t _m)
|
||||||
{
|
{
|
||||||
fp_prec_t _p;
|
fp_prec_t _p;
|
||||||
|
@ -253,6 +260,6 @@ fpresetsticky(fp_except_t _m)
|
||||||
return (_p);
|
return (_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __GNUCLIKE_ASM */
|
//#endif /* __GNUCLIKE_ASM */
|
||||||
|
|
||||||
#endif /* !_MACHINE_IEEEFP_H_ */
|
#endif /* !_MACHINE_IEEEFP_H_ */
|
||||||
|
|
Loading…
Reference in a new issue