Lines Matching refs:res

106 	systime_func_ptr res;
108 res = systime_func;
113 return res;
244 vint64 res;
251 res.D_s.hi = 0;
253 res.D_s.lo = (uint32_t)-tt;
254 M_NEG(res.D_s.hi, res.D_s.lo);
256 res.D_s.lo = (uint32_t)tt;
261 res.q_s = tt;
271 res.D_s.lo = (uint32_t)tt;
272 res.D_s.hi = (uint32_t)(tt >> 32);
273 M_NEG(res.D_s.hi, res.D_s.lo);
275 res.D_s.lo = (uint32_t)tt;
276 res.D_s.hi = (uint32_t)(tt >> 32);
281 return res;
290 time_t res;
294 res = (time_t)tv->D_s.lo;
298 res = (time_t)tv->q_s;
302 res = ((time_t)tv->d_s.hi << 32) | tv->D_s.lo;
306 return res;
458 * The result 'res' is a number that holds to the following properties:
460 * 1) res MOD cycle == value MOD cycle
461 * 2) pivot <= res < pivot + cycle
551 * res.Q_s -= 0x80000000;
591 vint64 res;
595 res.q_s = (pivot != NULL)
598 res.Q_s -= 0x80000000u; /* unshift of half range */
600 ntp -= res.D_s.lo; /* cycle difference */
601 res.Q_s += (uint64_t)ntp; /* get expanded time */
610 res = time_to_vint64(&tmp);
611 M_SUB(res.D_s.hi, res.D_s.lo, 0, 0x80000000u);
613 ntp -= res.D_s.lo; /* cycle difference */
614 M_ADD(res.D_s.hi, res.D_s.lo, 0, ntp);
618 return res;
640 vint64 res;
644 res.q_s = (pivot)
647 res.Q_s -= 0x80000000u; /* unshift of half range */
648 res.Q_s += (uint32_t)JAN_1970; /* warp into NTP domain */
649 ntp -= res.D_s.lo; /* cycle difference */
650 res.Q_s += (uint64_t)ntp; /* get expanded time */
659 res = time_to_vint64(&tmp);
660 M_SUB(res.D_s.hi, res.D_s.lo, 0, 0x80000000u);
661 M_ADD(res.D_s.hi, res.D_s.lo, 0, (uint32_t)JAN_1970);/*into NTP */
662 ntp -= res.D_s.lo; /* cycle difference */
663 M_ADD(res.D_s.hi, res.D_s.lo, 0, ntp);
667 return res;
681 * Split a 64bit seconds value into elapsed days in 'res.hi' and
682 * elapsed seconds since midnight in 'res.lo' using explicit floor
692 ntpcal_split res;
759 res.hi = uint32_2cpl_to_int32(Q);
760 res.lo = ts->D_s.lo - Q * SECSPERDAY;
762 return res;
805 * number into the number of elapsed years in 'res.hi' and the number
806 * of elapsed days of that year in 'res.lo'.
825 ntpcal_split res;
844 res.hi = n100 * 100 + n001;
845 res.lo = uday / 4u;
857 return res;
864 * 'res.hi' and the number of elapsed days of that month in 'res.lo'.
876 ntpcal_split res;
883 res.hi = eyd >> 5; /* approx month; might be 1 too low */
884 if (lt[res.hi + 1] <= eyd) /* fixup approximative month value */
885 res.hi += 1;
886 res.lo = eyd - lt[res.hi];
888 res.lo = res.hi = -1;
891 return res;
1102 vint64 res;
1106 res.q_s = days;
1107 res.q_s *= SECSPERDAY;
1108 res.q_s += secs;
1116 * res = days *86400 + secs, using manual 16/32 bit
1124 res.D_s.lo = (days & 0xFFFF) * 675u;
1125 res.D_s.hi = 0;
1129 M_ADD(res.D_s.hi, res.D_s.lo, p2, p1);
1132 res.D_s.hi = (res.D_s.hi << 7) | (res.D_s.lo >> 25);
1133 res.D_s.lo = (res.D_s.lo << 7);
1137 M_NEG(res.D_s.hi, res.D_s.lo);
1147 M_ADD(res.D_s.hi, res.D_s.lo, p2, p1);
1151 return res;
1206 * The month will be normalized, and 'res.hi' will contain the
1208 * while 'res.lo' will contain the number of elapsed days since start
1223 ntpcal_split res;
1226 res.lo = m + 10;
1227 res.hi = (res.lo >= 12);
1228 if (res.hi)
1229 res.lo -= 12;
1232 if (res.lo < 0 || res.lo >= 12) {
1234 sflag = int32_sflag(res.lo);
1235 mu = int32_to_uint32_2cpl(res.lo);
1237 res.hi += uint32_2cpl_to_int32(Q);
1238 res.lo = mu - Q * 12u;
1242 res.lo = shift_month_table[res.lo] - 306;
1244 return res;
1264 int32_t res;
1268 res = ntpcal_days_in_years(years + tmp.hi) + tmp.lo;
1270 res = ntpcal_days_in_years(years);
1271 res += mdays;
1273 return res;
1324 int32_t res;
1326 res = (hours * MINSPERHR + minutes) * SECSPERMIN + seconds;
1328 return res;
1683 * era, split this number into the number of elapsed years in res.hi
1684 * and the excessive number of weeks in res.lo. (That is, res.lo is
1698 ntpcal_split res;
1728 res.hi = 100*cc + cy;
1729 res.lo = sw / 157u;
1731 return res;