当前位置: 首页>>代码示例>>C++>>正文


C++ FP_DECL_D函数代码示例

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


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


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