diff options
Diffstat (limited to 'deps/v8/third_party/glibc/src/sysdeps/ieee754/dbl-64/endian.h')
-rw-r--r-- | deps/v8/third_party/glibc/src/sysdeps/ieee754/dbl-64/endian.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/deps/v8/third_party/glibc/src/sysdeps/ieee754/dbl-64/endian.h b/deps/v8/third_party/glibc/src/sysdeps/ieee754/dbl-64/endian.h new file mode 100644 index 0000000000..d97daca4df --- /dev/null +++ b/deps/v8/third_party/glibc/src/sysdeps/ieee754/dbl-64/endian.h @@ -0,0 +1,21 @@ +// Copyright 2022 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// glibc has a couple of endian.h files. This defines the macros expected by +// the code in this directory using macros defined by clang. +#if (defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && \ + __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +#define BIG_ENDI 1 +#undef LITTLE_ENDI +#define HIGH_HALF 0 +#define LOW_HALF 1 +#elif (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \ + __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +#undef BIG_ENDI +#define LITTLE_ENDI 1 +#define HIGH_HALF 1 +#define LOW_HALF 0 +#else +#error +#endif |