| /openbmc/phosphor-logging/test/openpower-pels/ |
| H A D | bcd_time_test.cpp | 26 BCDTime bcd; in TEST() local 29 stream >> bcd; in TEST() 31 EXPECT_EQ(bcd.yearMSB, 1); in TEST() 32 EXPECT_EQ(bcd.yearLSB, 2); in TEST() 33 EXPECT_EQ(bcd.month, 3); in TEST() 34 EXPECT_EQ(bcd.day, 4); in TEST() 35 EXPECT_EQ(bcd.hour, 5); in TEST() 36 EXPECT_EQ(bcd.minutes, 6); in TEST() 37 EXPECT_EQ(bcd.seconds, 7); in TEST() 38 EXPECT_EQ(bcd.hundredths, 8); in TEST() [all …]
|
| /openbmc/qemu/include/libdecnumber/ |
| H A D | decNumberLocal.h | 478 #define GETCOEFF(df, bcd) { \ argument 480 *(bcd)=(uByte)DECCOMBMSD[sourhi>>26]; \ 481 dpd2bcd8(bcd+1, sourhi>>10); \ 482 dpd2bcd83(bcd+4, sourhi);} 483 #define GETWCOEFF(df, bcd) { \ argument 486 *(bcd)=(uByte)DECCOMBMSD[sourhi>>26]; \ 487 dpd2bcd8(bcd+1, sourhi>>8); \ 488 dpd2bcd8(bcd+4, (sourhi<<2) | (sourlo>>30)); \ 489 dpd2bcd8(bcd+7, sourlo>>20); \ 490 dpd2bcd8(bcd+10, sourlo>>10); \ [all …]
|
| /openbmc/phosphor-logging/extensions/openpower-pels/ |
| H A D | bcd_time.cpp | 30 BCDTime bcd; in getBCDTime() local 38 bcd.yearMSB = toBCD(year / 100); in getBCDTime() 39 bcd.yearLSB = toBCD(year % 100); in getBCDTime() 40 bcd.month = toBCD(gmTime->tm_mon + 1); in getBCDTime() 41 bcd.day = toBCD(gmTime->tm_mday); in getBCDTime() 42 bcd.hour = toBCD(gmTime->tm_hour); in getBCDTime() 43 bcd.minutes = toBCD(gmTime->tm_min); in getBCDTime() 44 bcd.seconds = toBCD(gmTime->tm_sec); in getBCDTime() 48 bcd.hundredths = toBCD(hundredths); in getBCDTime() 50 return bcd; in getBCDTime()
|
| H A D | bcd_time.hpp | 81 T bcd = 0; in toBCD() local 88 bcd = bcd + (remainder << count); in toBCD() 93 return bcd; in toBCD() 104 inline int fromBCD(uint8_t bcd) in fromBCD() argument 106 return (((bcd & 0xF0) >> 4) * 10) + (bcd & 0xF); in fromBCD()
|
| /openbmc/libpldm/src/ |
| H A D | utils.c | 184 uint8_t bcd2dec8(uint8_t bcd) in bcd2dec8() argument 186 return (bcd >> 4) * 10 + (bcd & 0x0f); in bcd2dec8() 196 uint16_t bcd2dec16(uint16_t bcd) in bcd2dec16() argument 198 return bcd2dec8(bcd >> 8) * 100 + bcd2dec8(bcd & 0xff); in bcd2dec16() 208 uint32_t bcd2dec32(uint32_t bcd) in bcd2dec32() argument 210 return bcd2dec16(bcd >> 16) * 10000 + bcd2dec16(bcd & 0xffff); in bcd2dec32()
|
| /openbmc/libcper/ |
| H A D | common-utils.c | 12 int bcd_to_int(UINT8 bcd) in bcd_to_int() argument 14 return ((bcd & 0xF0) >> 4) * 10 + (bcd & 0x0F); in bcd_to_int()
|
| /openbmc/libpldm/include/libpldm/ |
| H A D | utils.h | 66 uint8_t bcd2dec8(uint8_t bcd); 78 uint16_t bcd2dec16(uint16_t bcd); 90 uint32_t bcd2dec32(uint32_t bcd);
|
| /openbmc/qemu/libdecnumber/dpd/ |
| H A D | decimal64.c | 752 uInt bcd; /* BCD result */ in decDigitsFromDPD() local 794 bcd=DPD2BCD[dpd]; /* convert 10 bits to 12 bits BCD */ in decDigitsFromDPD() 797 nibble=bcd & 0x00f; in decDigitsFromDPD() 801 bcd>>=4; in decDigitsFromDPD() 807 if (n==0 && !bcd) break; in decDigitsFromDPD() 809 nibble=bcd & 0x00f; in decDigitsFromDPD() 813 bcd>>=4; in decDigitsFromDPD() 815 nibble=bcd & 0x00f; in decDigitsFromDPD()
|
| /openbmc/qemu/hw/i386/kvm/ |
| H A D | i8254.c | 119 sc->bcd = kchan->bcd; in kvm_pit_get() 156 kchan->bcd = sc->bcd; in kvm_pit_put()
|
| /openbmc/libcper/include/libcper/ |
| H A D | common-utils.h | 6 int bcd_to_int(UINT8 bcd);
|
| /openbmc/qemu/include/hw/timer/ |
| H A D | i8254_internal.h | 43 uint8_t bcd; /* not supported */ member
|
| /openbmc/pldm/common/ |
| H A D | utils.hpp | 156 T bcd = 0; in decimalToBcd() local 163 bcd = bcd + (rem << cnt); in decimalToBcd() 168 return bcd; in decimalToBcd()
|
| /openbmc/qemu/hw/timer/ |
| H A D | i8254.c | 152 s->bcd; in pit_ioport_write() 168 s->bcd = val & 1; in pit_ioport_write()
|
| H A D | i8254_common.c | 194 VMSTATE_UINT8(bcd, PITChannelState),
|
| /openbmc/qemu/tests/tcg/i386/ |
| H A D | test-i386.c | 916 unsigned short bcd[5]; in test_fbcd() local 919 asm("fbstp %0" : "=m" (bcd[0]) : "t" (a) : "st"); in test_fbcd() 920 asm("fbld %1" : "=t" (b) : "m" (bcd[0])); in test_fbcd() 922 a, bcd[4], bcd[3], bcd[2], bcd[1], bcd[0], b); in test_fbcd()
|
| /openbmc/qemu/target/ppc/ |
| H A D | dfp_helper.c | 1424 uint8_t bcd[6]; in helper_CDTBCD() local 1435 decNumberGetBCD(&a, bcd); in helper_CDTBCD() 1438 res |= (uint64_t)bcd[i] << sh; in helper_CDTBCD() 1450 uint8_t bcd[6]; in helper_CBCDTD() local 1463 bcd[i] = extract64(s, offs, 4); in helper_CBCDTD() 1464 if (bcd[i] > 9) { in helper_CBCDTD() 1470 bcd[i] &= 9; in helper_CBCDTD() 1475 decNumberSetBCD(&a, bcd, 6); in helper_CBCDTD()
|
| H A D | int_helper.c | 2189 static int bcd_get_sgn(ppc_avr_t *bcd) in bcd_get_sgn() argument 2191 switch (bcd->VsrB(BCD_DIG_BYTE(0)) & 0xF) { in bcd_get_sgn() 2222 static uint8_t bcd_get_digit(ppc_avr_t *bcd, int n, int *invalid) in bcd_get_digit() argument 2226 result = bcd->VsrB(BCD_DIG_BYTE(n)) >> 4; in bcd_get_digit() 2228 result = bcd->VsrB(BCD_DIG_BYTE(n)) & 0xF; in bcd_get_digit() 2237 static void bcd_put_digit(ppc_avr_t *bcd, uint8_t digit, int n) in bcd_put_digit() argument 2240 bcd->VsrB(BCD_DIG_BYTE(n)) &= 0x0F; in bcd_put_digit() 2241 bcd->VsrB(BCD_DIG_BYTE(n)) |= (digit << 4); in bcd_put_digit() 2243 bcd->VsrB(BCD_DIG_BYTE(n)) &= 0xF0; in bcd_put_digit() 2244 bcd->VsrB(BCD_DIG_BYTE(n)) |= digit; in bcd_put_digit() [all …]
|
| /openbmc/u-boot/arch/arm/include/asm/arch-mx25/ |
| H A D | imx-regs.h | 483 #define WEIM_CSCR_U(sp, wp, bcd, bcs, psz, pme, sync, dol, \ argument 485 ((sp) << 31 | (wp) << 30 | (bcd) << 28 | (bcs) << 24 | \
|
| /openbmc/u-boot/arch/arm/include/asm/arch-mx31/ |
| H A D | imx-regs.h | 639 #define CSCR_U(sp, wp, bcd, bcs, psz, pme, sync, dol, \ argument 641 ((sp) << 31 | (wp) << 30 | (bcd) << 28 | (psz) << 22 | (pme) << 21 |\
|
| /openbmc/qemu/linux-headers/asm-x86/ |
| H A D | kvm.h | 278 __u8 bcd; member
|
| /openbmc/qemu/libdecnumber/ |
| H A D | decNumber.c | 3604 uByte * decNumberGetBCD(const decNumber *dn, uint8_t *bcd) { in decNumberGetBCD() argument 3605 uByte *ub=bcd+dn->digits-1; /* -> lsd */ in decNumberGetBCD() 3609 for (; ub>=bcd; ub--, up++) *ub=*up; in decNumberGetBCD() 3613 for (; ub>=bcd; ub--) { in decNumberGetBCD() 3623 return bcd; in decNumberGetBCD() 3638 decNumber * decNumberSetBCD(decNumber *dn, const uByte *bcd, uInt n) { in decNumberSetBCD() argument 3640 const uByte *ub=bcd; /* -> source msd */ in decNumberSetBCD() 3643 for (; ub<bcd+n; ub++, up--) *up=*ub; in decNumberSetBCD()
|
| /openbmc/libpldm/abi/x86_64/ |
| H A D | gcc.dump | 323 'name' => 'bcd', 347 'name' => 'bcd', 371 'name' => 'bcd',
|
| /openbmc/qemu/tests/data/qobject/ |
| H A D | qdict.txt | 1656 bcd.c: 257 1657 bcd.h: 195
|