cpython/Modules/_hacl/include/krml/fstar_uint128_struct_endianness.h

/* Copyright (c) INRIA and Microsoft Corporation. All rights reserved.
   Licensed under the Apache 2.0 and MIT Licenses. */

#ifndef FSTAR_UINT128_STRUCT_ENDIANNESS_H
#define FSTAR_UINT128_STRUCT_ENDIANNESS_H

/* Hand-written implementation of endianness-related uint128 functions
 * for the extracted uint128 implementation */

/* Access 64-bit fields within the int128. */
#define HIGH64_OF(x)
#define LOW64_OF(x)

/* A series of definitions written using pointers. */

inline static void load128_le_(uint8_t *b, uint128_t *r) {}

inline static void store128_le_(uint8_t *b, uint128_t *n) {}

inline static void load128_be_(uint8_t *b, uint128_t *r) {}

inline static void store128_be_(uint8_t *b, uint128_t *n) {}

#ifndef KRML_NOSTRUCT_PASSING

inline static uint128_t load128_le(uint8_t *b) {}

inline static void store128_le(uint8_t *b, uint128_t n) {}

inline static uint128_t load128_be(uint8_t *b) {}

inline static void store128_be(uint8_t *b, uint128_t n) {}

#else /* !defined(KRML_STRUCT_PASSING) */

#define print128
#define load128_le
#define store128_le
#define load128_be
#define store128_be

#endif /* KRML_STRUCT_PASSING */

#endif