當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。