Lines Matching refs:start
63 __gen_mbo(uint32_t start, uint32_t end) in __gen_mbo() argument
65 return (~0ull >> (64 - (end - start + 1))) << start; in __gen_mbo()
69 __gen_uint(uint64_t v, uint32_t start, uint32_t end) in __gen_uint() argument
74 const int width = end - start + 1; in __gen_uint()
81 return v << start; in __gen_uint()
85 __gen_sint(int64_t v, uint32_t start, uint32_t end) in __gen_sint() argument
87 const int width = end - start + 1; in __gen_sint()
101 return (v & mask) << start; in __gen_sint()
105 __gen_offset(uint64_t v, uint32_t start, uint32_t end) in __gen_offset() argument
109 uint64_t mask = (~0ull >> (64 - (end - start + 1))) << start; in __gen_offset()
125 __gen_sfixed(float v, uint32_t start, uint32_t end, uint32_t fract_bits) in __gen_sfixed() argument
132 const float max = ((1 << (end - start)) - 1) / factor; in __gen_sfixed()
133 const float min = -(1 << (end - start)) / factor; in __gen_sfixed()
138 const uint64_t mask = ~0ull >> (64 - (end - start + 1)); in __gen_sfixed()
140 return (int_val & mask) << start; in __gen_sfixed()
144 __gen_ufixed(float v, uint32_t start, uint32_t end, uint32_t fract_bits) in __gen_ufixed() argument
151 const float max = ((1 << (end - start + 1)) - 1) / factor; in __gen_ufixed()
158 return uint_val << start; in __gen_ufixed()
162 __gen_unpack_uint(const uint8_t *restrict cl, uint32_t start, uint32_t end) in __gen_unpack_uint() argument
165 const int width = end - start + 1; in __gen_unpack_uint()
168 for (int byte = start / 8; byte <= end / 8; byte++) { in __gen_unpack_uint()
169 val |= cl[byte] << ((byte - start / 8) * 8); in __gen_unpack_uint()
172 return (val >> (start % 8)) & mask; in __gen_unpack_uint()
176 __gen_unpack_sint(const uint8_t *restrict cl, uint32_t start, uint32_t end) in __gen_unpack_sint() argument
178 int size = end - start + 1; in __gen_unpack_sint()
179 int64_t val = __gen_unpack_uint(cl, start, end); in __gen_unpack_sint()
186 __gen_unpack_sfixed(const uint8_t *restrict cl, uint32_t start, uint32_t end, in __gen_unpack_sfixed() argument
189 int32_t bits = __gen_unpack_sint(cl, start, end); in __gen_unpack_sfixed()
194 __gen_unpack_ufixed(const uint8_t *restrict cl, uint32_t start, uint32_t end, in __gen_unpack_ufixed() argument
197 int32_t bits = __gen_unpack_uint(cl, start, end); in __gen_unpack_ufixed()
202 __gen_unpack_float(const uint8_t *restrict cl, uint32_t start, uint32_t end) in __gen_unpack_float() argument
204 assert(start % 8 == 0); in __gen_unpack_float()
205 assert(end - start == 31); in __gen_unpack_float()
207 struct PACKED { float f; } *f = (void *)(cl + (start / 8)); in __gen_unpack_float()
213 __gen_unpack_f187(const uint8_t *restrict cl, uint32_t start, uint32_t end) in __gen_unpack_f187() argument
215 assert(end - start == 15); in __gen_unpack_f187()
216 uint32_t bits = __gen_unpack_uint(cl, start, end); in __gen_unpack_f187()