Home
last modified time | relevance | path

Searched refs:mantissa (Results 1 – 25 of 45) sorted by relevance

12

/linux/drivers/gpu/drm/amd/display/dc/basics/
H A Dcustom_float.c32 uint32_t *mantissa, in build_custom_float() argument
45 *mantissa = 0; in build_custom_float()
68 *mantissa = 0; in build_custom_float()
95 *mantissa = dc_fixpt_floor(mantiss); in build_custom_float()
102 uint32_t mantissa, in setup_custom_float() argument
120 if (mantissa & ~mantissa_mask) { in setup_custom_float()
122 mantissa = mantissa_mask; in setup_custom_float()
135 if (mantissa & mask) in setup_custom_float()
162 uint32_t mantissa; in convert_to_custom_float_format() local
166 return build_custom_float(value, format, &negative, &mantissa, &exponenta) && in convert_to_custom_float_format()
[all …]
/linux/drivers/hwmon/pmbus/
H A Dzl6100.c61 s32 mantissa; in zl6100_l2d() local
65 mantissa = ((s16)((l & 0x7ff) << 5)) >> 5; in zl6100_l2d()
67 val = mantissa; in zl6100_l2d()
85 s16 exponent = 0, mantissa; in zl6100_d2l() local
109 mantissa = DIV_ROUND_CLOSEST(val, 1000); in zl6100_d2l()
112 if (mantissa > 0x3ff) in zl6100_d2l()
113 mantissa = 0x3ff; in zl6100_d2l()
117 mantissa = -mantissa; in zl6100_d2l()
120 return (mantissa & 0x7ff) | ((exponent << 11) & 0xf800); in zl6100_d2l()
H A Dmp2993.c39 s16 exponent, mantissa, target_exponent; in mp2993_linear11_exponent_transfer() local
42 mantissa = ((s16)((word & 0x7ff) << 5)) >> 5; in mp2993_linear11_exponent_transfer()
46 mantissa = mantissa << (exponent - target_exponent); in mp2993_linear11_exponent_transfer()
48 mantissa = mantissa >> (target_exponent - exponent); in mp2993_linear11_exponent_transfer()
50 return (mantissa & 0x7ff) | ((expect_exponent << 11) & 0xf800); in mp2993_linear11_exponent_transfer()
H A Dbpa-rs600.c49 int ret, exponent, mantissa; in bpa_rs600_read_vin() local
57 mantissa = ret & 0x7ff; in bpa_rs600_read_vin()
60 mantissa >>= 1; in bpa_rs600_read_vin()
62 ret = (exponent << 11) | mantissa; in bpa_rs600_read_vin()
H A Dxdpe12284.c29 s32 mantissa; in xdpe122_read_word_data() local
41 mantissa = ((s16)((ret & GENMASK(10, 0)) << 5)) >> 5; in xdpe122_read_word_data()
42 val = mantissa * 1000L; in xdpe122_read_word_data()
H A Dmp2856.c78 s16 exponent = 0, mantissa; in val2linear11() local
101 mantissa = clamp_val(DIV_ROUND_CLOSEST_ULL(val, 1000), 0, 0x3ff); in val2linear11()
105 mantissa = -mantissa; in val2linear11()
108 return (mantissa & 0x7ff) | ((exponent << 11) & 0xf800); in val2linear11()
H A Dmp2891.c66 s32 mantissa; in mp2891_reg2data_linear11() local
70 mantissa = ((s16)((word & 0x7ff) << 5)) >> 5; in mp2891_reg2data_linear11()
71 val = mantissa; in mp2891_reg2data_linear11()
H A Dmp2975.c179 s16 exponent = 0, mantissa; in mp2975_data2reg_linear11() local
198 mantissa = clamp_val(DIV_ROUND_CLOSEST_ULL(val, 1000), 0, 0x3ff); in mp2975_data2reg_linear11()
202 mantissa = -mantissa; in mp2975_data2reg_linear11()
205 return (mantissa & 0x7ff) | ((exponent << 11) & 0xf800); in mp2975_data2reg_linear11()
/linux/arch/m68k/fpsp040/
H A Dsgetem.S10 | The entry point sGETMAN extracts the mantissa of the
11 | input argument. The mantissa is converted to an
73 | For normalized numbers, leave the mantissa alone, simply load
89 | For denormalized numbers, shift the mantissa until the j-bit = 1,
96 bsr shft |shift mantissa bits till msbit is set
104 | Shifts the mantissa bits until msbit is set.
106 | ms mantissa part in d0
107 | ls mantissa part in d1
H A Dfpsp.h132 .set WBTEMP_HI,WBTEMP+4 | wbtemp mantissa [63:32] (4 bytes)
133 .set WBTEMP_LO,WBTEMP+8 | wbtemp mantissa [31:00] (4 bytes)
165 .set wbtemp66_bit,2 | wbtemp mantissa bit #66
166 .set wbtemp1_bit,1 | wbtemp mantissa bit #1
167 .set wbtemp0_bit,0 | wbtemp mantissa bit #0
201 .set FPTEMP_HI,FPTEMP+4 | fptemp mantissa [63:32] (4 bytes)
202 .set FPTEMP_LO,FPTEMP+8 | fptemp mantissa [31:00] (4 bytes)
208 .set ETEMP_HI,ETEMP+4 | etemp mantissa [63:32] (4 bytes)
209 .set ETEMP_LO,ETEMP+8 | etemp mantissa [31:00] (4 bytes)
302 .set signan_bit,6 | signalling nan bit in mantissa
[all …]
H A Dx_store.S140 beqs get_mant |if positive, go process mantissa
143 bras get_mant |go process mantissa
154 movel LOCAL_HI(%a1),%d1 |get ms mantissa
158 movel LOCAL_HI(%a1),%d1 |get ms mantissa
162 movel LOCAL_LO(%a1),%d1 |get ls mantissa
H A Dround.S154 tstl LOCAL_LO(%a0) |test lower mantissa
163 movel LOCAL_LO(%a0),%d2 |get lower mantissa for s-bit test
195 bccs scc_clr |no mantissa overflow
272 | is done by shifting the mantissa left while decrementing the
276 | bit of the mantissa (msb in d1).
279 | bit of the mantissa (msb in d1) unless this would mean the exponent
281 | exponent (d0) is set to 0 and the mantissa (d1 & d2) is not
289 | Distance to first 1 bit in mantissa = X
295 | shift mantissa by Y
299 | FP_SCR1 = exponent, ms mantissa part, ls mantissa part
[all …]
H A Ddecbin.S26 | for the mantissa which is to be interpreted as 17 integer
30 | A2. Convert the bcd mantissa to binary by successive
32 | The mantissa digits will be converted with the decimal point
41 | mantissa the equivalent of forcing in the bcd value:
56 | A5. Form the final binary number by scaling the mantissa by
58 | mantissa in FP0 by the factor in FP1 if the adjusted
478 | (*) fp0: mantissa accumulator
H A Dbindec.S68 | The mantissa is scaled to the desired number of
90 | the mantissa by 10.
92 | A14. Convert the mantissa to bcd.
94 | mantissa to bcd in memory. The input to binstr is
95 | to be a fraction; i.e. (mantissa)/10^LEN and adjusted
114 | d2: upper 32-bits of mantissa for binstr
115 | d3: scratch;lower 32-bits of mantissa for binstr
611 | the mantissa by 10. The calculation of 10^LEN cannot
H A Dget_op.S503 tstl ETEMP_HI(%a6) |check ms mantissa
505 tstl ETEMP_LO(%a6) |check ls mantissa
555 tstl ETEMP_HI(%a6) |check ms mantissa
557 tstl ETEMP_LO(%a6) |check ls mantissa
H A Dx_snan.S14 | of the mantissa are sent to the integer unit).
161 | Get the 32 most significant bits of etemp mantissa
183 | Get the 16 most significant bits of etemp mantissa
205 | Get the 8 most significant bits of etemp mantissa
/linux/drivers/usb/serial/
H A Dpl2303.c638 unsigned int baseline, mantissa, exponent; in pl2303_encode_baud_rate_divisor() local
648 mantissa = baseline / baud; in pl2303_encode_baud_rate_divisor()
649 if (mantissa == 0) in pl2303_encode_baud_rate_divisor()
650 mantissa = 1; /* Avoid dividing by zero if baud > 32*12M. */ in pl2303_encode_baud_rate_divisor()
652 while (mantissa >= 512) { in pl2303_encode_baud_rate_divisor()
654 mantissa >>= 2; /* divide by 4 */ in pl2303_encode_baud_rate_divisor()
658 mantissa = 511; in pl2303_encode_baud_rate_divisor()
665 buf[1] = exponent << 1 | mantissa >> 8; in pl2303_encode_baud_rate_divisor()
666 buf[0] = mantissa & 0xff; in pl2303_encode_baud_rate_divisor()
669 baud = (baseline / mantissa) >> (exponent << 1); in pl2303_encode_baud_rate_divisor()
[all …]
/linux/drivers/hid/amd-sfh-hid/sfh1_1/
H A Damd_sfh_desc.c137 int fraction, shift, mantissa, sign, exp, zeropre; in amd_sfh_float_to_int() local
139 mantissa = flt32_val & GENMASK(22, 0); in amd_sfh_float_to_int()
143 if (!exp && !mantissa) in amd_sfh_float_to_int()
155 zeropre = (((BIT(23) + mantissa) * 100) >> 23) >> exp; in amd_sfh_float_to_int()
165 flt32_val = BIT(exp) + (mantissa << shift); in amd_sfh_float_to_int()
168 flt32_val = BIT(exp) + (mantissa >> shift); in amd_sfh_float_to_int()
171 fraction = (shift == 0) ? 0 : mantissa & GENMASK(shift - 1, 0); in amd_sfh_float_to_int()
/linux/drivers/iio/light/
H A Dopt3001.c247 u16 mantissa, int *val, int *val2) in opt3001_to_iio_ret() argument
254 ret = whole * (mantissa << exponent); in opt3001_to_iio_ret()
317 u16 mantissa; in opt3001_get_processed() local
430 mantissa = OPT3001_REG_MANTISSA(opt->result); in opt3001_get_processed()
432 opt3001_to_iio_ret(opt, exponent, mantissa, val, val2); in opt3001_get_processed()
573 u16 mantissa; in opt3001_write_event_value() local
594 mantissa = (((val * integer) + (val2 / decimal)) / whole) >> exponent; in opt3001_write_event_value()
596 value = (exponent << 12) | mantissa; in opt3001_write_event_value()
601 opt->high_thresh_mantissa = mantissa; in opt3001_write_event_value()
606 opt->low_thresh_mantissa = mantissa; in opt3001_write_event_value()
/linux/drivers/iio/chemical/
H A Dsps30.c42 int mantissa = val & GENMASK(22, 0); in sps30_float_to_int_clamped() local
48 if (!exp && !mantissa) in sps30_float_to_int_clamped()
54 return ((((1 << 23) + mantissa) * 100) >> 23) >> (-exp); in sps30_float_to_int_clamped()
59 val = (1 << exp) + (mantissa >> shift); in sps30_float_to_int_clamped()
63 fraction = mantissa & GENMASK(shift - 1, 0); in sps30_float_to_int_clamped()
/linux/sound/isa/gus/
H A Dgus_volume.c152 unsigned int mantissa, f1, f2;
166 mantissa = sensitivity % 8192;
173 bend = (int) ((((f2 - f1) * mantissa) >> 13) + f1);
/linux/drivers/clk/ti/
H A Ddpll3xxx.c305 u32 v, ctrl, mod_freq_divider, exponent, mantissa; in omap3_noncore_dpll_ssc_program() local
326 mantissa = mod_freq_divider; in omap3_noncore_dpll_ssc_program()
327 while ((mantissa > 127) && (exponent < 7)) { in omap3_noncore_dpll_ssc_program()
329 mantissa /= 2; in omap3_noncore_dpll_ssc_program()
331 if (mantissa > 127) in omap3_noncore_dpll_ssc_program()
332 mantissa = 127; in omap3_noncore_dpll_ssc_program()
336 v |= mantissa << __ffs(dd->ssc_modfreq_mant_mask); in omap3_noncore_dpll_ssc_program()
/linux/arch/m68k/math-emu/
H A Dfp_util.S108 move.l %d0,(%a0)+ | set mantissa
131 lsl.l #8,%d0 | shift mantissa
168 lsl.l #8,%d0 | shift high mantissa
/linux/drivers/isdn/mISDN/
H A Ddsp_audio.c124 int sign, exponent, mantissa; in linear2ulaw() local
135 mantissa = (sample >> (exponent + 3)) & 0x0F; in linear2ulaw()
136 ulawbyte = ~(sign | (exponent << 4) | mantissa); in linear2ulaw()
/linux/drivers/md/bcache/
H A Dutil.h550 unsigned int mantissa = 1 << fract_bits; /* Implicit bit */ in fract_exp_two() local
552 mantissa += x & (mantissa - 1); in fract_exp_two()
555 return mantissa << x >> fract_bits; in fract_exp_two()

12