/openbmc/phosphor-logging/test/openpower-pels/ |
H A D | bcd_time_test.cpp | 38 BCDTime bcd; in TEST() local 41 stream >> bcd; in TEST() 43 EXPECT_EQ(bcd.yearMSB, 1); in TEST() 44 EXPECT_EQ(bcd.yearLSB, 2); in TEST() 45 EXPECT_EQ(bcd.month, 3); in TEST() 46 EXPECT_EQ(bcd.day, 4); in TEST() 47 EXPECT_EQ(bcd.hour, 5); in TEST() 48 EXPECT_EQ(bcd.minutes, 6); in TEST() 49 EXPECT_EQ(bcd.seconds, 7); in TEST() 50 EXPECT_EQ(bcd.hundredths, 8); in TEST() [all …]
|
/openbmc/qemu/include/libdecnumber/ |
H A D | decNumberLocal.h | 479 #define GETCOEFF(df, bcd) { \ argument 481 *(bcd)=(uByte)DECCOMBMSD[sourhi>>26]; \ 482 dpd2bcd8(bcd+1, sourhi>>10); \ 483 dpd2bcd83(bcd+4, sourhi);} 484 #define GETWCOEFF(df, bcd) { \ argument 487 *(bcd)=(uByte)DECCOMBMSD[sourhi>>26]; \ 488 dpd2bcd8(bcd+1, sourhi>>8); \ 489 dpd2bcd8(bcd+4, (sourhi<<2) | (sourlo>>30)); \ 490 dpd2bcd8(bcd+7, sourlo>>20); \ 491 dpd2bcd8(bcd+10, sourlo>>10); \ [all …]
|
/openbmc/phosphor-logging/extensions/openpower-pels/ |
H A D | bcd_time.cpp | 42 BCDTime bcd; in getBCDTime() local 50 bcd.yearMSB = toBCD(year / 100); in getBCDTime() 51 bcd.yearLSB = toBCD(year % 100); in getBCDTime() 52 bcd.month = toBCD(gmTime->tm_mon + 1); in getBCDTime() 53 bcd.day = toBCD(gmTime->tm_mday); in getBCDTime() 54 bcd.hour = toBCD(gmTime->tm_hour); in getBCDTime() 55 bcd.minutes = toBCD(gmTime->tm_min); in getBCDTime() 56 bcd.seconds = toBCD(gmTime->tm_sec); in getBCDTime() 60 bcd.hundredths = toBCD(hundredths); in getBCDTime() 62 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 | 168 uint8_t bcd2dec8(uint8_t bcd) in bcd2dec8() argument 170 return (bcd >> 4) * 10 + (bcd & 0x0f); in bcd2dec8() 180 uint16_t bcd2dec16(uint16_t bcd) in bcd2dec16() argument 182 return bcd2dec8(bcd >> 8) * 100 + bcd2dec8(bcd & 0xff); in bcd2dec16() 192 uint32_t bcd2dec32(uint32_t bcd) in bcd2dec32() argument 194 return bcd2dec16(bcd >> 16) * 10000 + bcd2dec16(bcd & 0xffff); in bcd2dec32()
|
/openbmc/linux/arch/m68k/fpsp040/ |
H A D | decbin.S | 4 | Description: Converts normalized packed bcd value pointed to by 7 | Input: Normalized packed bcd value in ETEMP(a6). 9 | Output: Exact floating-point representation of the packed bcd value. 20 | Expected is a normal bcd (i.e. non-exceptional; all inf, zero, 24 | A1. Convert the bcd exponent to binary by successive adds and muls. 30 | A2. Convert the bcd mantissa to binary by successive 37 | bcd string. If SE is positive, count the leading zeros; 41 | mantissa the equivalent of forcing in the bcd value: 124 | 1. Copy bcd value in memory for use as a working copy. 137 | ( ) d4: first word of bcd [all …]
|
H A D | binstr.S | 5 | Description: Converts a 64-bit binary integer to bcd. 8 | d0, and a pointer to start in memory for bcd characters 12 | Output: LEN bcd digits representing the 64-bit integer. 36 | into d2:d3. D1 will contain the bcd digit formed. 57 | a0: pointer into memory for packed bcd string formation
|
H A D | bindec.S | 8 | to bcd format. 55 | in the output before conversion to bcd. LAMBDA is the 92 | A14. Convert the mantissa to bcd. 94 | mantissa to bcd in memory. The input to binstr is 97 | The bcd digits are stored in the correct position in 100 | A15. Convert the exponent to bcd. 101 | As in A14 above, the exp is converted to bcd and the 331 | in the output before conversion to bcd. LAMBDA is the sign 626 | a0: pointer into memory for packed bcd string formation
|
/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/linux/drivers/usb/storage/ |
H A D | usual-tables.c | 94 unsigned vid, pid, bcd; in usb_usual_ignore_device() local 100 bcd = le16_to_cpu(udev->descriptor.bcdDevice); in usb_usual_ignore_device() 104 p->bcdmin <= bcd && p->bcdmax >= bcd) in usb_usual_ignore_device()
|
/openbmc/libpldm/include/libpldm/ |
H A D | utils.h | 57 uint8_t bcd2dec8(uint8_t bcd); 69 uint16_t bcd2dec16(uint16_t bcd); 81 uint32_t bcd2dec32(uint32_t bcd);
|
/openbmc/qemu/libdecnumber/dpd/ |
H A D | decimal64.c | 753 uInt bcd; /* BCD result */ in decDigitsFromDPD() local 795 bcd=DPD2BCD[dpd]; /* convert 10 bits to 12 bits BCD */ in decDigitsFromDPD() 798 nibble=bcd & 0x00f; in decDigitsFromDPD() 802 bcd>>=4; in decDigitsFromDPD() 808 if (n==0 && !bcd) break; in decDigitsFromDPD() 810 nibble=bcd & 0x00f; in decDigitsFromDPD() 814 bcd>>=4; in decDigitsFromDPD() 816 nibble=bcd & 0x00f; in decDigitsFromDPD()
|
/openbmc/linux/drivers/rtc/ |
H A D | rtc-ds1305.c | 105 static unsigned bcd2hour(u8 bcd) in bcd2hour() argument 107 if (bcd & DS1305_HR_12) { in bcd2hour() 110 bcd &= ~DS1305_HR_12; in bcd2hour() 111 if (bcd & DS1305_HR_PM) { in bcd2hour() 113 bcd &= ~DS1305_HR_PM; in bcd2hour() 115 hour += bcd2bin(bcd); in bcd2hour() 118 return bcd2bin(bcd); in bcd2hour()
|
/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/pldm/common/ |
H A D | utils.hpp | 151 T bcd = 0; in decimalToBcd() local 158 bcd = bcd + (rem << cnt); in decimalToBcd() 163 return bcd; in decimalToBcd()
|
/openbmc/linux/Documentation/ABI/testing/ |
H A D | configfs-usb-gadget | 28 bcdDevice bcd device release number 29 bcdUSB bcd USB specification version number 155 bcdVersion bcd WebUSB specification version number
|
/openbmc/libcper/include/libcper/ |
H A D | common-utils.h | 6 int bcd_to_int(UINT8 bcd);
|
/openbmc/linux/include/linux/ |
H A D | bsg.h | 17 void bsg_unregister_queue(struct bsg_device *bcd);
|
/openbmc/linux/tools/perf/pmu-events/arch/powerpc/ |
H A D | mapfile.csv | 16 004[bcd][[:xdigit:]]{4},1,power8,core
|
/openbmc/linux/drivers/media/platform/aspeed/ |
H A D | aspeed-video.c | 314 struct aspeed_video_addr bcd; member 598 if (bcd_buf_need && !video->bcd.size) { in aspeed_video_start_frame() 599 if (!aspeed_video_alloc_buf(video, &video->bcd, in aspeed_video_start_frame() 605 aspeed_video_write(video, VE_BCD_ADDR, video->bcd.dma); in aspeed_video_start_frame() 607 &video->bcd.dma, video->bcd.size); in aspeed_video_start_frame() 608 } else if (!bcd_buf_need && video->bcd.size) { in aspeed_video_start_frame() 609 aspeed_video_free_buf(video, &video->bcd); in aspeed_video_start_frame() 717 memset((u8 *)v->bcd.virt, 0x00, VE_BCD_BUFF_SIZE); in aspeed_video_swap_src_buf() 1335 if (video->bcd.size) in aspeed_video_stop() 1336 aspeed_video_free_buf(video, &video->bcd); in aspeed_video_stop()
|
/openbmc/qemu/include/hw/timer/ |
H A D | i8254_internal.h | 43 uint8_t bcd; /* not supported */ member
|
/openbmc/linux/arch/x86/kvm/ |
H A D | i8254.h | 20 u8 bcd; /* not supported */ member
|
/openbmc/linux/include/dt-bindings/usb/ |
H A D | pd.h | 150 #define VDO_PRODUCT(pid, bcd) (((pid) & 0xffff) << 16 | ((bcd) & 0xffff)) argument
|
/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()
|