@@ -12,22 +12,26 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" + +#ifdef HAVE_CET_H +# include +#else +# define _CET_ENDBR +#endif .globl objc_msg_lookup .globl objc_msg_lookup_stret .globl objc_msg_lookup_super .globl objc_msg_lookup_super_stret .section .text .macro GENERATE_LOOKUP name notFound \name: -#ifdef HAVE_ENDBR64 - endbr64 -#endif + _CET_ENDBR testq %rcx, %rcx jz returnNilMethod testb $1, %cl @@ -77,13 +81,11 @@ .endef .endm .macro GENERATE_LOOKUP_SUPER name lookup \name: -#ifdef HAVE_ENDBR64 - endbr64 -#endif + _CET_ENDBR movq %rcx, %r8 movq (%rcx), %rcx testq %rcx, %rcx jz returnNilMethod