@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2023 Jonathan Schleifer + * Copyright (c) 2008-2024 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -12,19 +12,27 @@ * 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: + _CET_ENDBR + movl 4(%esp), %edx testl %edx, %edx jz returnNilMethod testb $1, %dl @@ -65,10 +73,12 @@ .endef .endm .macro GENERATE_LOOKUP_SUPER name lookup \name: + _CET_ENDBR + movl 4(%esp), %edx movl (%edx), %eax test %eax, %eax jz returnNilMethod