本文整理汇总了C++中FP_DECL_S函数的典型用法代码示例。如果您正苦于以下问题:C++ FP_DECL_S函数的具体用法?C++ FP_DECL_S怎么用?C++ FP_DECL_S使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FP_DECL_S函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: efsadd
int
efsadd(void *rD, void *rA, void *rB)
{
FP_DECL_S(A);
FP_DECL_S(B);
FP_DECL_S(R);
int ret = 0;
#ifdef DEBUG
printk("%s: %p %p %p\n", __FUNCTION__, rD, rA, rB);
#endif
__FP_UNPACK_S(A, rA);
__FP_UNPACK_S(B, rB);
#ifdef DEBUG
printk("A: %ld %lu %ld (%ld)\n", A_s, A_f, A_e, A_c);
printk("B: %ld %lu %ld (%ld)\n", B_s, B_f, B_e, B_c);
#endif
FP_ADD_S(R, A, B);
#ifdef DEBUG
printk("D: %ld %lu %ld (%ld)\n", R_s, R_f, R_e, R_c);
#endif
return (ret | __FP_PACK_S(rD, R));
}
示例2: __unordsf2
CMPtype __unordsf2(SFtype a, SFtype b)
{
FP_DECL_S(A);
FP_DECL_S(B);
CMPtype r;
FP_UNPACK_RAW_S(A, a);
FP_UNPACK_RAW_S(B, b);
FP_CMP_UNORD_S(r, A, B);
return r;
}
示例3: __c6xabi_gtf
CMPtype __c6xabi_gtf(SFtype a, SFtype b)
{
FP_DECL_EX;
FP_DECL_S(A); FP_DECL_S(B);
CMPtype r;
FP_UNPACK_RAW_S(A, a);
FP_UNPACK_RAW_S(B, b);
FP_CMP_S(r, A, B, -2, 2);
FP_HANDLE_EXCEPTIONS;
return r > 0;
}
示例4: __c6xabi_eqf
CMPtype __c6xabi_eqf(SFtype a, SFtype b)
{
FP_DECL_EX;
FP_DECL_S(A); FP_DECL_S(B);
CMPtype r;
FP_UNPACK_RAW_S(A, a);
FP_UNPACK_RAW_S(B, b);
FP_CMP_EQ_S(r, A, B, 1);
FP_HANDLE_EXCEPTIONS;
return !r;
}
示例5: __negsf2
float __negsf2(float a)
{
FP_DECL_EX;
FP_DECL_S(A); FP_DECL_S(R);
float r;
FP_UNPACK_S(A, a);
FP_NEG_S(R, A);
FP_PACK_S(r, R);
FP_CLEAR_EXCEPTIONS;
FP_HANDLE_EXCEPTIONS;
return r;
}
示例6: __addsf3
SFtype __addsf3(SFtype a, SFtype b)
{
FP_DECL_EX;
FP_DECL_S(A); FP_DECL_S(B); FP_DECL_S(R);
SFtype r;
FP_INIT_ROUNDMODE;
FP_UNPACK_SEMIRAW_S(A, a);
FP_UNPACK_SEMIRAW_S(B, b);
FP_ADD_S(R, A, B);
FP_PACK_SEMIRAW_S(r, R);
FP_HANDLE_EXCEPTIONS;
return r;
}
示例7: __eqsf2
int __eqsf2(SFtype a, SFtype b)
{
FP_DECL_EX;
FP_DECL_S(A); FP_DECL_S(B);
int r;
FP_UNPACK_RAW_S(A, a);
FP_UNPACK_RAW_S(B, b);
FP_CMP_EQ_S(r, A, B);
if (r && (FP_ISSIGNAN_S(A) || FP_ISSIGNAN_S(B)))
FP_SET_EXCEPTION(FP_EX_INVALID);
FP_HANDLE_EXCEPTIONS;
return r;
}
示例8: __c6xabi_ltf
CMPtype __c6xabi_ltf(SFtype a, SFtype b)
{
FP_DECL_EX;
FP_DECL_S(A); FP_DECL_S(B);
CMPtype r;
FP_UNPACK_RAW_S(A, a);
FP_UNPACK_RAW_S(B, b);
FP_CMP_S(r, A, B, 2);
if (r == 2 && (FP_ISSIGNAN_S(A) || FP_ISSIGNAN_S(B)))
FP_SET_EXCEPTION(FP_EX_INVALID);
FP_HANDLE_EXCEPTIONS;
return r < 0;
}
示例9: __eqsf2
CMPtype
__eqsf2 (SFtype a, SFtype b)
{
FP_DECL_EX;
FP_DECL_S (A);
FP_DECL_S (B);
CMPtype r;
FP_INIT_EXCEPTIONS;
FP_UNPACK_RAW_S (A, a);
FP_UNPACK_RAW_S (B, b);
FP_CMP_EQ_S (r, A, B, 1);
FP_HANDLE_EXCEPTIONS;
return r;
}
示例10: stfs
int
stfs(void *frS, void *ea)
{
FP_DECL_D(A);
FP_DECL_S(R);
FP_DECL_EX;
float f;
#ifdef DEBUG
printk("%s: S %p, ea %p\n", __func__, frS, ea);
#endif
FP_UNPACK_DP(A, frS);
#ifdef DEBUG
printk("A: %ld %lu %lu %ld (%ld)\n", A_s, A_f1, A_f0, A_e, A_c);
#endif
FP_CONV(S, D, 1, 2, R, A);
#ifdef DEBUG
printk("R: %ld %lu %ld (%ld)\n", R_s, R_f, R_e, R_c);
#endif
_FP_PACK_CANONICAL(S, 1, R);
if (!FP_CUR_EXCEPTIONS || !__FPU_TRAP_P(FP_CUR_EXCEPTIONS)) {
_FP_PACK_RAW_1_P(S, &f, R);
if (copy_to_user(ea, &f, sizeof(float)))
return -EFAULT;
}
return FP_CUR_EXCEPTIONS;
}
示例11: stfs
int
stfs(void *frS, void *ea)
{
FP_DECL_D(A);
FP_DECL_S(R);
float f;
int err;
#ifdef DEBUG
printk("%s: S %p, ea %p\n", __FUNCTION__, frS, ea);
#endif
__FP_UNPACK_D(A, frS);
#ifdef DEBUG
printk("A: %ld %lu %lu %ld (%ld)\n", A_s, A_f1, A_f0, A_e, A_c);
#endif
FP_CONV(S, D, 1, 2, R, A);
#ifdef DEBUG
printk("R: %ld %lu %ld (%ld)\n", R_s, R_f, R_e, R_c);
#endif
err = _FP_PACK_CANONICAL(S, 1, R);
if (!err || !__FPU_TRAP_P(err)) {
__FP_PACK_RAW_1(S, &f, R);
if (copy_to_user(ea, &f, sizeof(float)))
return -EFAULT;
}
return err;
}
示例12: __sqrtsf2
SFtype
__sqrtsf2 (SFtype a)
{
FP_DECL_EX;
FP_DECL_S (A);
FP_DECL_S (R);
SFtype r;
FP_INIT_ROUNDMODE;
FP_UNPACK_S (A, a);
FP_SQRT_S (R, A);
FP_PACK_S (r, R);
FP_HANDLE_EXCEPTIONS;
return r;
}
示例13: fdivs
void fdivs(void *ft, void *fa, void *fb)
{
FP_DECL_S(A);
FP_DECL_S(B);
FP_DECL_S(R);
FP_DECL_EX;
FP_UNPACK_SP(A, fa);
FP_UNPACK_SP(B, fb);
if (B_c == FP_CLS_ZERO && A_c != FP_CLS_ZERO)
FP_SET_EXCEPTION(FP_EX_DIVZERO);
FP_DIV_S(R, A, B);
FP_PACK_SP(ft, R);
__FPU_FPCSR |= FP_CUR_EXCEPTIONS;
}
示例14: __fmaf
float
__fmaf (float a, float b, float c)
{
FP_DECL_EX;
FP_DECL_S (A);
FP_DECL_S (B);
FP_DECL_S (C);
FP_DECL_S (R);
float r;
FP_INIT_ROUNDMODE;
FP_UNPACK_S (A, a);
FP_UNPACK_S (B, b);
FP_UNPACK_S (C, c);
FP_FMA_S (R, A, B, C);
FP_PACK_S (r, R);
FP_HANDLE_EXCEPTIONS;
return r;
}
示例15: __fixunssfdi
UDItype __fixunssfdi(float a)
{
FP_DECL_EX;
FP_DECL_S(A);
UDItype r;
FP_UNPACK_S(A, a);
FP_TO_INT_S(r, A, 64, 0);
FP_HANDLE_EXCEPTIONS;
return r;
}