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


C++ FP_DECL_S函数代码示例

本文整理汇总了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));
}
开发者ID:mrtos,项目名称:Logitech-Revue,代码行数:28,代码来源:efsadd.c

示例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;
}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.toolchain,代码行数:12,代码来源:unordsf2.c

示例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;
}
开发者ID:gmarkall,项目名称:gcc,代码行数:13,代码来源:gtf.c

示例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;
}
开发者ID:AlexMioMio,项目名称:gcc,代码行数:13,代码来源:eqf.c

示例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;
}
开发者ID:christianrober,项目名称:R05R4-RC2,代码行数:14,代码来源:negsf2.c

示例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;
}
开发者ID:Dinesh-Ramakrishnan,项目名称:glibc,代码行数:15,代码来源:addsf3.c

示例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;
}
开发者ID:Abioy,项目名称:gccxml,代码行数:15,代码来源:eqsf2.c

示例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;
}
开发者ID:ChaosJohn,项目名称:gcc,代码行数:15,代码来源:ltf.c

示例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;
}
开发者ID:JamesLinus,项目名称:glibc-mips,代码行数:16,代码来源:eqsf2.c

示例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;
}
开发者ID:01org,项目名称:thunderbolt-software-kernel-tree,代码行数:33,代码来源:stfs.c

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

示例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;
}
开发者ID:AubrCool,项目名称:glibc,代码行数:16,代码来源:sqrtsf2.c

示例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;
}
开发者ID:150balbes,项目名称:Amlogic_s905-kernel,代码行数:19,代码来源:fdivs.c

示例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;
}
开发者ID:AubrCool,项目名称:glibc,代码行数:20,代码来源:fmasf4.c

示例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;
}
开发者ID:christianrober,项目名称:R05R4-RC2,代码行数:12,代码来源:fixunssfdi.c


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