Lines Matching +full:- +full:v
39 #define be_bswap(v, size) (v) argument
40 #define le_bswap(v, size) glue(__builtin_bswap, size)(v) argument
41 #define be_bswap24(v) (v) argument
42 #define le_bswap24(v) bswap24(v) argument
43 #define be_bswaps(v, size) argument
47 #define le_bswap(v, size) (v) argument
48 #define be_bswap24(v) bswap24(v) argument
49 #define le_bswap24(v) (v) argument
50 #define be_bswap(v, size) glue(__builtin_bswap, size)(v) argument
51 #define le_bswaps(v, size) argument
61 * uint16_t le16_to_cpu(uint16_t v);
62 * uint32_t le32_to_cpu(uint32_t v);
63 * uint64_t le64_to_cpu(uint64_t v);
64 * uint16_t be16_to_cpu(uint16_t v);
65 * uint32_t be32_to_cpu(uint32_t v);
66 * uint64_t be64_to_cpu(uint64_t v);
68 * Convert the value @v from the specified format to the native
72 * uint16_t cpu_to_le16(uint16_t v);
73 * uint32_t cpu_to_le32(uint32_t v);
74 * uint64_t cpu_to_le64(uint64_t v);
75 * uint16_t cpu_to_be16(uint16_t v);
76 * uint32_t cpu_to_be32(uint32_t v);
77 * uint64_t cpu_to_be64(uint64_t v);
79 * Convert the value @v from the native endianness of the host CPU to
83 * void le16_to_cpus(uint16_t *v);
84 * void le32_to_cpus(uint32_t *v);
85 * void le64_to_cpus(uint64_t *v);
86 * void be16_to_cpus(uint16_t *v);
87 * void be32_to_cpus(uint32_t *v);
88 * void be64_to_cpus(uint64_t *v);
90 * Do an in-place conversion of the value pointed to by @v from the
93 * void cpu_to_le16s(uint16_t *v);
94 * void cpu_to_le32s(uint32_t *v);
95 * void cpu_to_le64s(uint64_t *v);
96 * void cpu_to_be16s(uint16_t *v);
97 * void cpu_to_be32s(uint32_t *v);
98 * void cpu_to_be64s(uint64_t *v);
100 * Do an in-place conversion of the value pointed to by @v from the
115 static inline type endian ## size ## _to_cpu(type v)\
117 return glue(endian, _bswap)(v, size);\
120 static inline type cpu_to_ ## endian ## size(type v)\
122 return glue(endian, _bswap)(v, size);\
147 * a compile-time constant if you pass in a constant. So this can be
174 /* unaligned/endian-independent pointer access */
216 * which stores @val to @ptr as an @endian-order number @sz bytes in size
219 * which loads @sz bytes from @ptr as an unsigned @endian-order number
233 static inline void stb_p(void *ptr, uint8_t v) in stb_p() argument
235 *(uint8_t *)ptr = v; in stb_p()
241 * inline byte-by-byte stores.
242 * Some compilation environments (eg some fortify-source implementations)
262 static inline void stw_he_p(void *ptr, uint16_t v) in stw_he_p() argument
264 __builtin_memcpy(ptr, &v, sizeof(v)); in stw_he_p()
267 static inline void st24_he_p(void *ptr, uint32_t v) in st24_he_p() argument
269 __builtin_memcpy(ptr, &v, 3); in st24_he_p()
279 static inline void stl_he_p(void *ptr, uint32_t v) in stl_he_p() argument
281 __builtin_memcpy(ptr, &v, sizeof(v)); in stl_he_p()
291 static inline void stq_he_p(void *ptr, uint64_t v) in stq_he_p() argument
293 __builtin_memcpy(ptr, &v, sizeof(v)); in stq_he_p()
316 static inline void stw_le_p(void *ptr, uint16_t v) in stw_le_p() argument
318 stw_he_p(ptr, le_bswap(v, 16)); in stw_le_p()
321 static inline void st24_le_p(void *ptr, uint32_t v) in st24_le_p() argument
323 st24_he_p(ptr, le_bswap24(v)); in st24_le_p()
326 static inline void stl_le_p(void *ptr, uint32_t v) in stl_le_p() argument
328 stl_he_p(ptr, le_bswap(v, 32)); in stl_le_p()
331 static inline void stq_le_p(void *ptr, uint64_t v) in stq_le_p() argument
333 stq_he_p(ptr, le_bswap(v, 64)); in stq_le_p()
356 static inline void stw_be_p(void *ptr, uint16_t v) in stw_be_p() argument
358 stw_he_p(ptr, be_bswap(v, 16)); in stw_be_p()
361 static inline void st24_be_p(void *ptr, uint32_t v) in st24_be_p() argument
363 st24_he_p(ptr, be_bswap24(v)); in st24_be_p()
366 static inline void stl_be_p(void *ptr, uint32_t v) in stl_be_p() argument
368 stl_he_p(ptr, be_bswap(v, 32)); in stl_be_p()
371 static inline void stq_be_p(void *ptr, uint64_t v) in stq_be_p() argument
373 stq_he_p(ptr, be_bswap(v, 64)); in stq_be_p()
376 static inline unsigned long leul_to_cpu(unsigned long v) in leul_to_cpu() argument
379 return le_bswap(v, 32); in leul_to_cpu()
381 return le_bswap(v, 64); in leul_to_cpu()
387 /* Store v to p as a sz byte value in host order */
389 static inline void stn_## END ## _p(void *ptr, int sz, uint64_t v) \
393 stb_p(ptr, v); \
396 stw_ ## END ## _p(ptr, v); \
399 stl_ ## END ## _p(ptr, v); \
402 stq_ ## END ## _p(ptr, v); \