aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/libunwind/src/cet_unwind.h
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.ru>2022-02-10 16:45:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:08 +0300
commit4e839db24a3bbc9f1c610c43d6faaaa99824dcca (patch)
tree506dac10f5df94fab310584ee51b24fc5a081c22 /contrib/libs/libunwind/src/cet_unwind.h
parent2d37894b1b037cf24231090eda8589bbb44fb6fc (diff)
downloadydb-4e839db24a3bbc9f1c610c43d6faaaa99824dcca.tar.gz
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/libunwind/src/cet_unwind.h')
-rw-r--r--contrib/libs/libunwind/src/cet_unwind.h82
1 files changed, 41 insertions, 41 deletions
diff --git a/contrib/libs/libunwind/src/cet_unwind.h b/contrib/libs/libunwind/src/cet_unwind.h
index e371be20c4..9a548151b3 100644
--- a/contrib/libs/libunwind/src/cet_unwind.h
+++ b/contrib/libs/libunwind/src/cet_unwind.h
@@ -1,41 +1,41 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LIBUNWIND_CET_UNWIND_H
-#define LIBUNWIND_CET_UNWIND_H
-
-#include "libunwind.h"
-
-// Currently, CET is implemented on Linux x86 platforms.
-#if defined(_LIBUNWIND_TARGET_LINUX) && defined(__CET__) && defined(__SHSTK__)
-#define _LIBUNWIND_USE_CET 1
-#endif
-
-#if defined(_LIBUNWIND_USE_CET)
-#include <cet.h>
-#include <immintrin.h>
-
-#define _LIBUNWIND_POP_CET_SSP(x) \
- do { \
- unsigned long ssp = _get_ssp(); \
- if (ssp != 0) { \
- unsigned int tmp = (x); \
- while (tmp > 255) { \
- _inc_ssp(255); \
- tmp -= 255; \
- } \
- _inc_ssp(tmp); \
- } \
- } while (0)
-#endif
-
-extern void *__libunwind_cet_get_registers(unw_cursor_t *);
-extern void *__libunwind_cet_get_jump_target();
-
-#endif
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LIBUNWIND_CET_UNWIND_H
+#define LIBUNWIND_CET_UNWIND_H
+
+#include "libunwind.h"
+
+// Currently, CET is implemented on Linux x86 platforms.
+#if defined(_LIBUNWIND_TARGET_LINUX) && defined(__CET__) && defined(__SHSTK__)
+#define _LIBUNWIND_USE_CET 1
+#endif
+
+#if defined(_LIBUNWIND_USE_CET)
+#include <cet.h>
+#include <immintrin.h>
+
+#define _LIBUNWIND_POP_CET_SSP(x) \
+ do { \
+ unsigned long ssp = _get_ssp(); \
+ if (ssp != 0) { \
+ unsigned int tmp = (x); \
+ while (tmp > 255) { \
+ _inc_ssp(255); \
+ tmp -= 255; \
+ } \
+ _inc_ssp(tmp); \
+ } \
+ } while (0)
+#endif
+
+extern void *__libunwind_cet_get_registers(unw_cursor_t *);
+extern void *__libunwind_cet_get_jump_target();
+
+#endif