示例#1
0
文件: _gt_sd.c 项目: ChaosJohn/gcc
CMPtype
__bid_gtsd2 (_Decimal32 x, _Decimal32 y) {
  CMPtype res;
  UINT64 x64, y64;
  union decimal32 ux, uy;
 
  ux.d = x;
  uy.d = y;
  x64 = __bid32_to_bid64 (ux.i);
  y64 = __bid32_to_bid64 (uy.i);
  res = __bid64_quiet_greater (x64, y64);
  return (res);
}
示例#2
0
_Decimal32
__bid_divsd3 (_Decimal32 x, _Decimal32 y) {
  UINT64 x64, y64, res64;
  union decimal32 ux, uy, res;

  ux.d = x;
  uy.d = y;
  x64 = __bid32_to_bid64 (ux.i);
  y64 = __bid32_to_bid64 (uy.i);
  res64 = __bid64_div (x64, y64);
  res.i = __bid64_to_bid32 (res64);
  return (res.d);
}
示例#3
0
文件: _eq_sd.c 项目: AlexMioMio/gcc
CMPtype
__bid_eqsd2 (_Decimal32 x, _Decimal32 y) {
  CMPtype res;
  UINT64 x64, y64;
  union decimal32 ux, uy;

  ux.d = x;
  uy.d = y;
  x64 = __bid32_to_bid64 (ux.i);
  y64 = __bid32_to_bid64 (uy.i);
  res = __bid64_quiet_equal (x64, y64);
  if (res == 0)
    res = 1;
  else
    res = 0;
  return (res);
}
示例#4
0
文件: _sd_to_dd.c 项目: abumaryam/gcc
_Decimal64
__bid_extendsddd2 (_Decimal32 x) {
  union decimal64 res;
  union decimal32 ux;

  ux.d = x;
  res.i = __bid32_to_bid64 (ux.i);
  return (res.d);
}
示例#5
0
int
isinfd32 (_Decimal32 x) {
  int res;
  UINT64 x64;
  union decimal32 ux;

  ux.d = x;
  x64 = __bid32_to_bid64 (ux.i);
  res = __bid64_isInf (x64);
  return (res);
}
示例#6
0
文件: _sd_to_si.c 项目: 0day-ci/gcc
SItype
__bid_fixsdsi (_Decimal32 x) {
  SItype res = 0xbaddbadd;
  UINT64 x64;
  union decimal32 ux;

  ux.d = x;
  x64 = __bid32_to_bid64 (ux.i);
  res = __bid64_to_int32_xint (x64);

  return (res);
}
示例#7
0
USItype
__bid_fixunssdsi (_Decimal32 x) {
  USItype res = 0xbaddbadd;
  UINT64 x64;
  union decimal32 ux;

  ux.d = x;
  x64 = __bid32_to_bid64 (ux.i);
  res = __bid64_to_uint32_xint (x64);

  if (res == 0x80000000) res = 0; // for NaNs too
  return (res);
}