Home
last modified time | relevance | path

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

/mcuboot-latest/boot/zcbor/src/
Dzcbor_common.c315 #define F16_EXPO_OFFS 10 /* Bit offset of the exponent. */ macro
336 #define NORM_ROUND_MSK (F32_MANTISSA_MSK >> (F16_EXPO_OFFS - 1)) /* excess mantissa when going from
339 #define NORM_ROUND_BIT_MSK (1 << (F32_EXPO_OFFS - F16_EXPO_OFFS - 1)) /* bit 12 (0x1000) */
345 uint32_t expo = (input >> F16_EXPO_OFFS) & F16_EXPO_MSK; in zcbor_float16_to_32()
357 | (mantissa << (F32_EXPO_OFFS - F16_EXPO_OFFS)); in zcbor_float16_to_32()
409 value16 |= (uint16_t)((expo - (F32_BIAS - F16_BIAS)) << F16_EXPO_OFFS); in zcbor_float32_to_16()
410 value16 |= (uint16_t)(mantissa >> (F32_EXPO_OFFS - F16_EXPO_OFFS)); in zcbor_float32_to_16()
414 value16 |= (F16_EXPO_MSK << F16_EXPO_OFFS); in zcbor_float32_to_16()
418 uint16_t new_mantissa = (uint16_t)(mantissa >> (F32_EXPO_OFFS - F16_EXPO_OFFS)); in zcbor_float32_to_16()
419 value16 |= (F16_EXPO_MSK << F16_EXPO_OFFS) | (new_mantissa ? new_mantissa : 1); in zcbor_float32_to_16()