* Chia-I Wu <olv@lunarg.com>
*/
+#ifdef __CET__
+#define ENDBR "endbr64\n\t"
+#else
+#define ENDBR
+#endif
+
#ifdef HAVE_FUNC_ATTRIBUTE_VISIBILITY
#define HIDDEN __attribute__((visibility("hidden")))
#else
#ifndef __ILP32__
#define STUB_ASM_CODE(slot) \
+ ENDBR \
"movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \
"movq %fs:(%rax), %r11\n\t" \
"jmp *(8 * " slot ")(%r11)"
#else
#define STUB_ASM_CODE(slot) \
+ ENDBR \
"movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \
"movl %fs:(%rax), %r11d\n\t" \
"movl 4*" slot "(%r11d), %r11d\n\t" \
#include <string.h>
+#ifdef __CET__
+#define ENDBR "endbr32\n\t"
+#else
+#define ENDBR
+#endif
+
#ifdef HAVE_FUNC_ATTRIBUTE_VISIBILITY
#define HIDDEN __attribute__((visibility("hidden")))
#else
func ":"
#define STUB_ASM_CODE(slot) \
+ ENDBR \
"call 1f\n" \
"1:\n\t" \
"popl %eax\n\t" \
* Chia-I Wu <olv@lunarg.com>
*/
+#ifdef __CET__
+#define ENDBR "endbr32\n\t"
+#else
+#define ENDBR
+#endif
+
#ifdef HAVE_FUNC_ATTRIBUTE_VISIBILITY
#define HIDDEN __attribute__((visibility("hidden")))
#else
func ":"
#define STUB_ASM_CODE(slot) \
+ ENDBR \
"call 1f\n\t" \
"1:\n\t" \
"popl %ecx\n\t" \