#include <stdio.h>
#include <assert.h>
+#ifndef __gen_validate_value
+#define __gen_validate_value(x)
+#endif
+
#ifndef __gen_field_functions
#define __gen_field_functions
static inline uint64_t
__gen_field(uint64_t v, uint32_t start, uint32_t end)
{
+ __gen_validate_value(v);
#if DEBUG
if (end - start + 1 < 64)
assert(v < 1ul << (end - start + 1));
static inline uint64_t
__gen_offset(uint64_t v, uint32_t start, uint32_t end)
{
+ __gen_validate_value(v);
#if DEBUG
uint64_t mask = (~0ul >> (64 - (end - start + 1))) << start;
static inline uint32_t
__gen_float(float v)
{
+ __gen_validate_value(v);
return ((union __gen_value) { .f = (v) }).dw;
}
#include <stdio.h>
#include <assert.h>
+#ifndef __gen_validate_value
+#define __gen_validate_value(x)
+#endif
+
#ifndef __gen_field_functions
#define __gen_field_functions
static inline uint64_t
__gen_field(uint64_t v, uint32_t start, uint32_t end)
{
+ __gen_validate_value(v);
#if DEBUG
if (end - start + 1 < 64)
assert(v < 1ul << (end - start + 1));
static inline uint64_t
__gen_offset(uint64_t v, uint32_t start, uint32_t end)
{
+ __gen_validate_value(v);
#if DEBUG
uint64_t mask = (~0ul >> (64 - (end - start + 1))) << start;
static inline uint32_t
__gen_float(float v)
{
+ __gen_validate_value(v);
return ((union __gen_value) { .f = (v) }).dw;
}