Home
last modified time | relevance | path

Searched refs:bcd (Results 1 – 24 of 24) sorted by relevance

/openbmc/phosphor-logging/test/openpower-pels/
H A Dbcd_time_test.cpp26 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/libpldm/src/
H A Dbcd.c5 uint8_t pldm_bcd_bcd2dec8(uint8_t bcd) in pldm_bcd_bcd2dec8() argument
7 return (bcd >> 4) * 10 + (bcd & 0x0f); in pldm_bcd_bcd2dec8()
17 uint16_t pldm_bcd_bcd2dec16(uint16_t bcd) in pldm_bcd_bcd2dec16() argument
19 return pldm_bcd_bcd2dec8(bcd >> 8) * 100 + in pldm_bcd_bcd2dec16()
20 pldm_bcd_bcd2dec8(bcd & 0xff); in pldm_bcd_bcd2dec16()
31 uint32_t pldm_bcd_bcd2dec32(uint32_t bcd) in pldm_bcd_bcd2dec32() argument
33 return pldm_bcd_bcd2dec16(bcd >> 16) * 10000 + in pldm_bcd_bcd2dec32()
34 pldm_bcd_bcd2dec16(bcd & 0xffff); in pldm_bcd_bcd2dec32()
H A Dmeson.build1 libpldm_sources = files('bcd.c', 'control.c', 'edac.c', 'responder.c', 'utils.c')
/openbmc/qemu/include/libdecnumber/
H A DdecNumberLocal.h478 #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 Dbcd_time.cpp30 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 Dbcd_time.hpp81 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/libcper/
H A Dcommon-utils.c12 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 Dbcd.h15 uint8_t pldm_bcd_bcd2dec8(uint8_t bcd);
27 uint16_t pldm_bcd_bcd2dec16(uint16_t bcd);
39 uint32_t pldm_bcd_bcd2dec32(uint32_t bcd);
H A Dmeson.build4 'bcd.h',
/openbmc/qemu/libdecnumber/dpd/
H A Ddecimal64.c752 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 Di8254.c119 sc->bcd = kchan->bcd; in kvm_pit_get()
156 kchan->bcd = sc->bcd; in kvm_pit_put()
/openbmc/libcper/include/libcper/
H A Dcommon-utils.h6 int bcd_to_int(UINT8 bcd);
/openbmc/qemu/include/hw/timer/
H A Di8254_internal.h43 uint8_t bcd; /* not supported */ member
/openbmc/pldm/common/
H A Dutils.hpp155 T bcd = 0; in decimalToBcd() local
162 bcd = bcd + (rem << cnt); in decimalToBcd()
167 return bcd; in decimalToBcd()
/openbmc/libpldm/tests/
H A Dmeson.build31 tests = ['bcd', 'edac', 'instance-id', 'msgbuf', 'responder', 'utils']
/openbmc/qemu/tests/tcg/i386/
H A Dtest-i386.c916 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 Ddfp_helper.c1424 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 Dint_helper.c2189 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 Dimx-regs.h483 #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 Dimx-regs.h639 #define CSCR_U(sp, wp, bcd, bcs, psz, pme, sync, dol, \ argument
641 ((sp) << 31 | (wp) << 30 | (bcd) << 28 | (psz) << 22 | (pme) << 21 |\
/openbmc/libpldm/abi/x86_64/
H A Dgcc.dump9 'bcd.h' => 1,
43 'Header' => 'bcd.h',
55 'Header' => 'bcd.h',
59 'name' => 'bcd',
67 'Header' => 'bcd.h',
79 'Header' => 'bcd.h',
83 'name' => 'bcd',
91 'Header' => 'bcd.h',
103 'Header' => 'bcd.h',
107 'name' => 'bcd',
/openbmc/qemu/libdecnumber/
H A DdecNumber.c3604 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/
H A DCHANGELOG.md67 - Split BCD symbols into libpldm/bcd.h from libpldm/utils.h
/openbmc/qemu/tests/data/qobject/
H A Dqdict.txt1656 bcd.c: 257
1657 bcd.h: 195