• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ FP_DECL_D函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中FP_DECL_D函数的典型用法代码示例。如果您正苦于以下问题:C++ FP_DECL_D函数的具体用法?C++ FP_DECL_D怎么用?C++ FP_DECL_D使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了FP_DECL_D函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: fsqrts

int
fsqrts(void *frD, void *frB)
{
	FP_DECL_D(B);
	FP_DECL_D(R);
	FP_DECL_EX;

#ifdef DEBUG
	printk("%s: %p %p %p %p\n", __func__, frD, frB);
#endif

	FP_UNPACK_DP(B, frB);

#ifdef DEBUG
	printk("B: %ld %lu %lu %ld (%ld)\n", B_s, B_f1, B_f0, B_e, B_c);
#endif

	if (B_s && B_c != FP_CLS_ZERO)
		FP_SET_EXCEPTION(EFLAG_VXSQRT);
	if (B_c == FP_CLS_NAN)
		FP_SET_EXCEPTION(EFLAG_VXSNAN);

	FP_SQRT_D(R, B);

#ifdef DEBUG
	printk("R: %ld %lu %lu %ld (%ld)\n", R_s, R_f1, R_f0, R_e, R_c);
#endif

	__FP_PACK_DS(frD, R);

	return FP_CUR_EXCEPTIONS;
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:32,代码来源:fsqrts.c


示例2: fadds

int
fadds(void *frD, void *frA, void *frB)
{
	FP_DECL_D(A);
	FP_DECL_D(B);
	FP_DECL_D(R);
	FP_DECL_EX;

#ifdef DEBUG
	printk("%s: %p %p %p\n", __func__, frD, frA, frB);
#endif

	FP_UNPACK_DP(A, frA);
	FP_UNPACK_DP(B, frB);

#ifdef DEBUG
	printk("A: %ld %lu %lu %ld (%ld)\n", A_s, A_f1, A_f0, A_e, A_c);
	printk("B: %ld %lu %lu %ld (%ld)\n", B_s, B_f1, B_f0, B_e, B_c);
#endif

	FP_ADD_D(R, A, B);

#ifdef DEBUG
	printk("D: %ld %lu %lu %ld (%ld)\n", R_s, R_f1, R_f0, R_e, R_c);
#endif

	__FP_PACK_DS(frD, R);

	return FP_CUR_EXCEPTIONS;
}
开发者ID:01org,项目名称:thunderbolt-software-kernel-tree,代码行数:30,代码来源:fadds.c


示例3: fmuls

int
fmuls(void *frD, void *frA, void *frB)
{
    FP_DECL_D(A);
    FP_DECL_D(B);
    FP_DECL_D(R);
    int ret = 0;

#ifdef DEBUG
    printk("%s: %p %p %p\n", __func__, frD, frA, frB);
#endif

    __FP_UNPACK_D(A, frA);
    __FP_UNPACK_D(B, frB);

#ifdef DEBUG
    printk("A: %ld %lu %lu %ld (%ld) [%08lx.%08lx %lx]\n",
           A_s, A_f1, A_f0, A_e, A_c, A_f1, A_f0, A_e + 1023);
    printk("B: %ld %lu %lu %ld (%ld) [%08lx.%08lx %lx]\n",
           B_s, B_f1, B_f0, B_e, B_c, B_f1, B_f0, B_e + 1023);
#endif

    if ((A_c == FP_CLS_INF && B_c == FP_CLS_ZERO) ||
        (A_c == FP_CLS_ZERO && B_c == FP_CLS_INF))
        ret |= EFLAG_VXIMZ;

    FP_MUL_D(R, A, B);

#ifdef DEBUG
    printk("D: %ld %lu %lu %ld (%ld) [%08lx.%08lx %lx]\n",
           R_s, R_f1, R_f0, R_e, R_c, R_f1, R_f0, R_e + 1023);
#endif

    return (ret | __FP_PACK_DS(frD, R));
}
开发者ID:274914765,项目名称:C,代码行数:35,代码来源:fmuls.c


示例4: fcmpu

int
fcmpu(u32 *ccr, int crfD, void *frA, void *frB)
{
	FP_DECL_D(A);
	FP_DECL_D(B);
	int code[4] = { (1 << 3), (1 << 1), (1 << 2), (1 << 0) };
	long cmp;

#ifdef DEBUG
	printk("%s: %p (%08x) %d %p %p\n", __FUNCTION__, ccr, *ccr, crfD, frA, frB);
#endif

	__FP_UNPACK_D(A, frA);
	__FP_UNPACK_D(B, frB);

#ifdef DEBUG
	printk("A: %ld %lu %lu %ld (%ld)\n", A_s, A_f1, A_f0, A_e, A_c);
	printk("B: %ld %lu %lu %ld (%ld)\n", B_s, B_f1, B_f0, B_e, B_c);
#endif

	FP_CMP_D(cmp, A, B, 2);
	cmp = code[(cmp + 1) & 3];

	__FPU_FPSCR &= ~(0x1f000);
	__FPU_FPSCR |= (cmp << 12);

	*ccr &= ~(15 << ((7 - crfD) << 2));
	*ccr |= (cmp << ((7 - crfD) << 2));

#ifdef DEBUG
	printk("CR: %08x\n", *ccr);
#endif

	return 0;
}
开发者ID:12019,项目名称:hg556a_source,代码行数:35,代码来源:fcmpu.c


示例5: fadds

int
fadds(void *frD, void *frA, void *frB)
{
	FP_DECL_D(A);
	FP_DECL_D(B);
	FP_DECL_D(R);
	int ret = 0;

#ifdef DEBUG
	printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB);
#endif

	__FP_UNPACK_D(A, frA);
	__FP_UNPACK_D(B, frB);

#ifdef DEBUG
	printk("A: %ld %lu %lu %ld (%ld)\n", A_s, A_f1, A_f0, A_e, A_c);
	printk("B: %ld %lu %lu %ld (%ld)\n", B_s, B_f1, B_f0, B_e, B_c);
#endif

	if (A_s != B_s && A_c == FP_CLS_INF && B_c == FP_CLS_INF)
		ret |= EFLAG_VXISI;

	FP_ADD_D(R, A, B);

#ifdef DEBUG
	printk("D: %ld %lu %lu %ld (%ld)\n", R_s, R_f1, R_f0, R_e, R_c);
#endif

	return (ret | __FP_PACK_DS(frD, R));
}
开发者ID:dmgerman,项目名称:linux-pre-history,代码行数:31,代码来源:fadds.c


示例6: fsqrts

int
fsqrts(void *frD, void *frB)
{
    FP_DECL_D(B);
    FP_DECL_D(R);
    int ret = 0;

#ifdef DEBUG
    printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frB);
#endif

    __FP_UNPACK_D(B, frB);

#ifdef DEBUG
    printk("B: %ld %lu %lu %ld (%ld)\n", B_s, B_f1, B_f0, B_e, B_c);
#endif

    if (B_s && B_c != FP_CLS_ZERO)
        ret |= EFLAG_VXSQRT;
    if (B_c == FP_CLS_NAN)
        ret |= EFLAG_VXSNAN;

    FP_SQRT_D(R, B);

#ifdef DEBUG
    printk("R: %ld %lu %lu %ld (%ld)\n", R_s, R_f1, R_f0, R_e, R_c);
#endif

    return (ret | __FP_PACK_DS(frD, R));
}
开发者ID:nhanh0,项目名称:hah,代码行数:30,代码来源:fsqrts.c


示例7: __unorddf2

CMPtype __unorddf2(DFtype a, DFtype b)
{
  FP_DECL_D(A); FP_DECL_D(B);
  CMPtype r;

  FP_UNPACK_RAW_D(A, a);
  FP_UNPACK_RAW_D(B, b);
  FP_CMP_UNORD_D(r, A, B);

  return r;
}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.toolchain,代码行数:11,代码来源:unorddf2.c


示例8: __c6xabi_eqd

CMPtype __c6xabi_eqd(DFtype a, DFtype b)
{
  FP_DECL_EX;
  FP_DECL_D(A); FP_DECL_D(B);
  CMPtype r;

  FP_UNPACK_RAW_D(A, a);
  FP_UNPACK_RAW_D(B, b);
  FP_CMP_EQ_D(r, A, B, 1);
  FP_HANDLE_EXCEPTIONS;

  return !r;
}
开发者ID:0day-ci,项目名称:gcc,代码行数:13,代码来源:eqd.c


示例9: __c6xabi_ged

CMPtype __c6xabi_ged(DFtype a, DFtype b)
{
  FP_DECL_EX;
  FP_DECL_D(A); FP_DECL_D(B);
  CMPtype r;

  FP_UNPACK_RAW_D(A, a);
  FP_UNPACK_RAW_D(B, b);
  FP_CMP_D(r, A, B, -2, 2);
  FP_HANDLE_EXCEPTIONS;

  return r >= 0;
}
开发者ID:gmarkall,项目名称:gcc,代码行数:13,代码来源:ged.c


示例10: __negdf2

DFtype
__negdf2 (DFtype a)
{
    FP_DECL_D (A);
    FP_DECL_D (R);
    DFtype r;

    FP_UNPACK_RAW_D (A, a);
    FP_NEG_D (R, A);
    FP_PACK_RAW_D (r, R);

    return r;
}
开发者ID:JamesLinus,项目名称:glibc-mips,代码行数:13,代码来源:negdf2.c


示例11: __sqrtdf2

double __sqrtdf2(double a)
{
  FP_DECL_EX;
  FP_DECL_D(A); FP_DECL_D(R);
  double r;

  FP_INIT_ROUNDMODE;
  FP_UNPACK_D(A, a);
  FP_SQRT_D(R, A);
  FP_PACK_D(r, R);
  FP_HANDLE_EXCEPTIONS;

  return r;
}
开发者ID:christianrober,项目名称:R05R4-RC2,代码行数:14,代码来源:sqrtdf2.c


示例12: fsqrtd

void fsqrtd(void *ft, void *fa)
{
	FP_DECL_D(A);
	FP_DECL_D(R);
	FP_DECL_EX;

	FP_UNPACK_DP(A, fa);

	FP_SQRT_D(R, A);

	FP_PACK_DP(ft, R);

	__FPU_FPCSR |= FP_CUR_EXCEPTIONS;
}
开发者ID:150balbes,项目名称:Amlogic_s905-kernel,代码行数:14,代码来源:fsqrtd.c


示例13: fdivs

int
fdivs(void *frD, void *frA, void *frB)
{
	FP_DECL_D(A);
	FP_DECL_D(B);
	FP_DECL_D(R);
	FP_DECL_EX;

#ifdef DEBUG
	printk("%s: %p %p %p\n", __func__, frD, frA, frB);
#endif

	FP_UNPACK_DP(A, frA);
	FP_UNPACK_DP(B, frB);

#ifdef DEBUG
	printk("A: %ld %lu %lu %ld (%ld)\n", A_s, A_f1, A_f0, A_e, A_c);
	printk("B: %ld %lu %lu %ld (%ld)\n", B_s, B_f1, B_f0, B_e, B_c);
#endif

	if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) {
		FP_SET_EXCEPTION(EFLAG_VXZDZ);
#ifdef DEBUG
		printk("%s: FPSCR_VXZDZ raised\n", __func__);
#endif
	}
	if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) {
		FP_SET_EXCEPTION(EFLAG_VXIDI);
#ifdef DEBUG
		printk("%s: FPSCR_VXIDI raised\n", __func__);
#endif
	}

	if (B_c == FP_CLS_ZERO && A_c != FP_CLS_ZERO) {
		FP_SET_EXCEPTION(EFLAG_DIVZERO);
		if (__FPU_TRAP_P(EFLAG_DIVZERO))
			return FP_CUR_EXCEPTIONS;
	}

	FP_DIV_D(R, A, B);

#ifdef DEBUG
	printk("D: %ld %lu %lu %ld (%ld)\n", R_s, R_f1, R_f0, R_e, R_c);
#endif

	__FP_PACK_DS(frD, R);

	return FP_CUR_EXCEPTIONS;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:49,代码来源:fdivs.c


示例14: fnmsub

int
fnmsub(void *frD, void *frA, void *frB, void *frC)
{
	FP_DECL_D(R);
	FP_DECL_D(A);
	FP_DECL_D(B);
	FP_DECL_D(C);
	FP_DECL_D(T);
	FP_DECL_EX;

#ifdef DEBUG
	printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC);
#endif

	FP_UNPACK_DP(A, frA);
	FP_UNPACK_DP(B, frB);
	FP_UNPACK_DP(C, frC);

#ifdef DEBUG
	printk("A: %ld %lu %lu %ld (%ld)\n", A_s, A_f1, A_f0, A_e, A_c);
	printk("B: %ld %lu %lu %ld (%ld)\n", B_s, B_f1, B_f0, B_e, B_c);
	printk("C: %ld %lu %lu %ld (%ld)\n", C_s, C_f1, C_f0, C_e, C_c);
#endif

	if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) ||
	    (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF))
		FP_SET_EXCEPTION(EFLAG_VXIMZ);

	FP_MUL_D(T, A, C);

	if (B_c != FP_CLS_NAN)
		B_s ^= 1;

	if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF)
		FP_SET_EXCEPTION(EFLAG_VXISI);

	FP_ADD_D(R, T, B);

	if (R_c != FP_CLS_NAN)
		R_s ^= 1;

#ifdef DEBUG
	printk("D: %ld %lu %lu %ld (%ld)\n", R_s, R_f1, R_f0, R_e, R_c);
#endif

	__FP_PACK_D(frD, R);

	return FP_CUR_EXCEPTIONS;
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:49,代码来源:fnmsub.c


示例15: __c6xabi_ltd

CMPtype __c6xabi_ltd(DFtype a, DFtype b)
{
  FP_DECL_EX;
  FP_DECL_D(A); FP_DECL_D(B);
  CMPtype r;

  FP_UNPACK_RAW_D(A, a);
  FP_UNPACK_RAW_D(B, b);
  FP_CMP_D(r, A, B, 2);
  if (r == 2 && (FP_ISSIGNAN_D(A) || FP_ISSIGNAN_D(B)))
    FP_SET_EXCEPTION(FP_EX_INVALID);
  FP_HANDLE_EXCEPTIONS;

  return r < 0;
}
开发者ID:AsherBond,项目名称:MondocosmOS-Dependencies,代码行数:15,代码来源:ltd.c


示例16: __gedf2

int __gedf2(double a, double b)
{
  FP_DECL_EX;
  FP_DECL_D(A); FP_DECL_D(B);
  int r;

  FP_UNPACK_RAW_D(A, a);
  FP_UNPACK_RAW_D(B, b);
  FP_CMP_D(r, A, B, -2);
  if (r == -2 && (FP_ISSIGNAN_D(A) || FP_ISSIGNAN_D(B)))
    FP_SET_EXCEPTION(FP_EX_INVALID);
  FP_HANDLE_EXCEPTIONS;

  return r;
}
开发者ID:christianrober,项目名称:R05R4-RC2,代码行数:15,代码来源:gedf2.c


示例17: __divdf3

DFtype __divdf3(DFtype a, DFtype b)
{
  FP_DECL_EX;
  FP_DECL_D(A); FP_DECL_D(B); FP_DECL_D(R);
  DFtype r;

  FP_INIT_ROUNDMODE;
  FP_UNPACK_D(A, a);
  FP_UNPACK_D(B, b);
  FP_DIV_D(R, A, B);
  FP_PACK_D(r, R);
  FP_HANDLE_EXCEPTIONS;

  return r;
}
开发者ID:KrisChaplin,项目名称:octeon_toolchain-4.1,代码行数:15,代码来源:divdf3.c


示例18: __adddf3

DFtype __adddf3(DFtype a, DFtype b)
{
  FP_DECL_EX;
  FP_DECL_D(A); FP_DECL_D(B); FP_DECL_D(R);
  DFtype r;

  FP_INIT_ROUNDMODE;
  FP_UNPACK_SEMIRAW_D(A, a);
  FP_UNPACK_SEMIRAW_D(B, b);
  FP_ADD_D(R, A, B);
  FP_PACK_SEMIRAW_D(r, R);
  FP_HANDLE_EXCEPTIONS;

  return r;
}
开发者ID:vutung2311,项目名称:chipKIT-cxx,代码行数:15,代码来源:adddf3.c


示例19: 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;
}
开发者ID:dmgerman,项目名称:linux-pre-history,代码行数:33,代码来源:stfs.c


示例20: fctiwz

int
fctiwz(u32 *frD, void *frB)
{
	FP_DECL_D(B);
	FP_DECL_EX;
	u32 fpscr;
	unsigned int r;

	fpscr = __FPU_FPSCR;
	__FPU_FPSCR &= ~(3);
	__FPU_FPSCR |= FP_RND_ZERO;

	FP_UNPACK_DP(B, frB);
	FP_TO_INT_D(r, B, 32, 1);
	frD[1] = r;

	__FPU_FPSCR = fpscr;

#ifdef DEBUG
	printk("%s: D %p, B %p: ", __func__, frD, frB);
	dump_double(frD);
	printk("\n");
#endif

	return 0;
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:26,代码来源:fctiwz.c



注:本文中的FP_DECL_D函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FP_DECL_S函数代码示例发布时间:2022-05-30
下一篇:
C++ FPDF_GetFieldAttr函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap