ObjFW  Check-in [0b441e52d6]

Overview
Comment:Use <cet.h> and _CET_ENDBR macro

This only uses endbr32/endbr64 when actually needed and emits the
necessary .note.gnu.property.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0b441e52d6269942e3fdefe78d75b7744907fb2216210aca0f57e6f077dfe41b
User & Date: js on 2024-02-26 20:32:38
Other Links: manifest | tags
Context
2024-02-26
21:46
OFLHAArchive: Add support for files > 4 GB check-in: 9d9fa168aa user: js tags: trunk
20:32
Use <cet.h> and _CET_ENDBR macro check-in: de552578e7 user: js tags: 1.0
20:32
Use <cet.h> and _CET_ENDBR macro check-in: 0b441e52d6 user: js tags: trunk
20:09
OFLHAArchive: Properly zero-terminate archives check-in: 413965aa27 user: js tags: trunk
Changes

Modified configure.ac from [040a8ef356] to [ff00996552].

858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
	], [
		AC_DEFINE(HAVE_BTI, 1, [Whether we have bti])
		AC_MSG_RESULT(yes)
	], [
		AC_MSG_RESULT(no)
	])
	;;
i?86)
	AC_MSG_CHECKING(for endbr32)
	AC_COMPILE_IFELSE([
		AC_LANG_PROGRAM([], [
			__asm__ __volatile__ ("endbr32");
		])
	], [
		AC_DEFINE(HAVE_ENDBR32, 1, [Whether we have endbr32])
		AC_MSG_RESULT(yes)
	], [
		AC_MSG_RESULT(no)
	])
	;;
x86_64)
	AC_MSG_CHECKING(for endbr64)
	AC_COMPILE_IFELSE([
		AC_LANG_PROGRAM([], [
			__asm__ __volatile__ ("endbr64");
		])
	], [
		AC_DEFINE(HAVE_ENDBR64, 1, [Whether we have endbr64])
		AC_MSG_RESULT(yes)
	], [
		AC_MSG_RESULT(no)
	])
	;;
esac

AC_CHECK_LIB(m, fmod, LIBS="$LIBS -lm")
AC_CHECK_LIB(complex, creal, TESTS_LIBS="$TESTS_LIBS -lcomplex")

AC_CHECK_FUNCS(strtof truncf)







<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<
<







858
859
860
861
862
863
864













865
866










867
868
869
870
871
872
873
	], [
		AC_DEFINE(HAVE_BTI, 1, [Whether we have bti])
		AC_MSG_RESULT(yes)
	], [
		AC_MSG_RESULT(no)
	])
	;;













i?86 | x86_64)
	AC_CHECK_HEADERS(cet.h)










	;;
esac

AC_CHECK_LIB(m, fmod, LIBS="$LIBS -lm")
AC_CHECK_LIB(complex, creal, TESTS_LIBS="$TESTS_LIBS -lcomplex")

AC_CHECK_FUNCS(strtof truncf)

Modified src/forwarding/apple-forwarding-amd64.S from [dda0d17f49] to [f921148919].

10
11
12
13
14
15
16






17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"







.globl _OFForward
.globl _OFForward_stret

.section __TEXT, __objc_methname, cstring_literals
Lstr_forwardingTargetForSelector_:
	.asciz "forwardingTargetForSelector:"

.section __DATA, __objc_selrefs, literal_pointers, no_dead_strip
Lsel_forwardingTargetForSelector_:
	.quad Lstr_forwardingTargetForSelector_

.section __DATA, __objc_imageinfo, regular, no_dead_strip
	.long 0, 0

.section __TEXT, __text, regular, pure_instructions
_OFForward:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0xC0, %rsp	/* 16-byte alignment */
	movq	%rax, -0x8(%rbp)







>
>
>
>
>
>

















|
<
<







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40


41
42
43
44
45
46
47
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#ifdef HAVE_CET_H
# include <cet.h>
#else
# define _CET_ENDBR
#endif

.globl _OFForward
.globl _OFForward_stret

.section __TEXT, __objc_methname, cstring_literals
Lstr_forwardingTargetForSelector_:
	.asciz "forwardingTargetForSelector:"

.section __DATA, __objc_selrefs, literal_pointers, no_dead_strip
Lsel_forwardingTargetForSelector_:
	.quad Lstr_forwardingTargetForSelector_

.section __DATA, __objc_imageinfo, regular, no_dead_strip
	.long 0, 0

.section __TEXT, __text, regular, pure_instructions
_OFForward:
	_CET_ENDBR



	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0xC0, %rsp	/* 16-byte alignment */
	movq	%rax, -0x8(%rbp)
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120

	movq	%rbp, %rsp
	popq	%rbp

	jmp	_OFMethodNotFound

_OFForward_stret:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0xC0, %rsp	/* 16-byte alignment */
	movq	%rax, -0x8(%rbp)







|
<
<







108
109
110
111
112
113
114
115


116
117
118
119
120
121
122

	movq	%rbp, %rsp
	popq	%rbp

	jmp	_OFMethodNotFound

_OFForward_stret:
	_CET_ENDBR



	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0xC0, %rsp	/* 16-byte alignment */
	movq	%rax, -0x8(%rbp)

Modified src/forwarding/apple-forwarding-x86.S from [d769e50b08] to [1bcb94976a].

10
11
12
13
14
15
16






17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"







.globl _OFForward
.globl _OFForward_stret

.section __TEXT, __cstring, cstring_literals
Lstr_forwardingTargetForSelector_:
	.asciz "forwardingTargetForSelector:"

.section __OBJC, __message_refs, literal_pointers, no_dead_strip
Lsel_forwardingTargetForSelector_:
	.long Lstr_forwardingTargetForSelector_

.section __OBJC, __image_info
	.long 0, 0

.section __TEXT, __text, regular, pure_instructions
_OFForward:
#ifdef HAVE_ENDBR32
	endbr32
#endif

	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$20, %esp








>
>
>
>
>
>

















|
<
<







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40


41
42
43
44
45
46
47
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#ifdef HAVE_CET_H
# include <cet.h>
#else
# define _CET_ENDBR
#endif

.globl _OFForward
.globl _OFForward_stret

.section __TEXT, __cstring, cstring_literals
Lstr_forwardingTargetForSelector_:
	.asciz "forwardingTargetForSelector:"

.section __OBJC, __message_refs, literal_pointers, no_dead_strip
Lsel_forwardingTargetForSelector_:
	.long Lstr_forwardingTargetForSelector_

.section __OBJC, __image_info
	.long 0, 0

.section __TEXT, __text, regular, pure_instructions
_OFForward:
	_CET_ENDBR



	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$20, %esp

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
	addl	$20, %esp
	popl	%ebx
	popl	%ebp

	jmp	_OFMethodNotFound

_OFForward_stret:
#ifdef HAVE_ENDBR32
	endbr32
#endif

	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$20, %esp








|
<
<







85
86
87
88
89
90
91
92


93
94
95
96
97
98
99
	addl	$20, %esp
	popl	%ebx
	popl	%ebp

	jmp	_OFMethodNotFound

_OFForward_stret:
	_CET_ENDBR



	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$20, %esp

Modified src/forwarding/forwarding-amd64-elf.S from [23dfe640bd] to [0fbb5e1e98].

12
13
14
15
16
17
18






19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include "platform.h"







.globl OFForward
.globl OFForward_stret

.section .text
OFForward:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0xC0, %rsp	/* 16-byte alignment */
	movq	%rax, -0x8(%rbp)







>
>
>
>
>
>






|
<
<







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31


32
33
34
35
36
37
38
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include "platform.h"

#ifdef HAVE_CET_H
# include <cet.h>
#else
# define _CET_ENDBR
#endif

.globl OFForward
.globl OFForward_stret

.section .text
OFForward:
	_CET_ENDBR



	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0xC0, %rsp	/* 16-byte alignment */
	movq	%rax, -0x8(%rbp)
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
	popq	%rbp

	jmp	OFMethodNotFound@PLT
.type OFForward, %function
.size OFForward, .-OFForward

OFForward_stret:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0xC0, %rsp	/* 16-byte alignment */
	movq	%rax, -0x8(%rbp)







|
<
<







111
112
113
114
115
116
117
118


119
120
121
122
123
124
125
	popq	%rbp

	jmp	OFMethodNotFound@PLT
.type OFForward, %function
.size OFForward, .-OFForward

OFForward_stret:
	_CET_ENDBR



	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0xC0, %rsp	/* 16-byte alignment */
	movq	%rax, -0x8(%rbp)
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
	popq	%rbp

	jmp	OFMethodNotFound_stret@PLT
.type OFForward_stret, %function
.size OFForward_stret, .-OFForward_stret

.Linit:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	leaq	.Lmodule(%rip), %rdi
	jmp	__objc_exec_class@PLT

#ifdef OF_SOLARIS
.section .init_array, "aw"
#else







|
<
<







200
201
202
203
204
205
206
207


208
209
210
211
212
213
214
	popq	%rbp

	jmp	OFMethodNotFound_stret@PLT
.type OFForward_stret, %function
.size OFForward_stret, .-OFForward_stret

.Linit:
	_CET_ENDBR



	leaq	.Lmodule(%rip), %rdi
	jmp	__objc_exec_class@PLT

#ifdef OF_SOLARIS
.section .init_array, "aw"
#else

Modified src/forwarding/forwarding-amd64-macho.S from [b2c96d5bb0] to [b0cd93723c].

12
13
14
15
16
17
18






19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include "platform.h"







.globl _OFForward
.globl _OFForward_stret

.section __TEXT, __text, regular, pure_instructions
_OFForward:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0xC0, %rsp	/* 16-byte alignment */
	movq	%rax, -0x8(%rbp)







>
>
>
>
>
>






|
<
<







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31


32
33
34
35
36
37
38
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include "platform.h"

#ifdef HAVE_CET_H
# include <cet.h>
#else
# define _CET_ENDBR
#endif

.globl _OFForward
.globl _OFForward_stret

.section __TEXT, __text, regular, pure_instructions
_OFForward:
	_CET_ENDBR



	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0xC0, %rsp	/* 16-byte alignment */
	movq	%rax, -0x8(%rbp)
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

	movq	%rbp, %rsp
	popq	%rbp

	jmp	_OFMethodNotFound

_OFForward_stret:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0xC0, %rsp	/* 16-byte alignment */
	movq	%rax, -0x8(%rbp)







|
<
<







109
110
111
112
113
114
115
116


117
118
119
120
121
122
123

	movq	%rbp, %rsp
	popq	%rbp

	jmp	_OFMethodNotFound

_OFForward_stret:
	_CET_ENDBR



	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0xC0, %rsp	/* 16-byte alignment */
	movq	%rax, -0x8(%rbp)
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210

	movq	%rbp, %rsp
	popq	%rbp

	jmp	_OFMethodNotFound_stret

Linit:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	leaq	Lmodule(%rip), %rdi
	jmp	___objc_exec_class

.section __DATA, __mod_init_func, mod_init_funcs
	.quad Linit








|
<
<







196
197
198
199
200
201
202
203


204
205
206
207
208
209
210

	movq	%rbp, %rsp
	popq	%rbp

	jmp	_OFMethodNotFound_stret

Linit:
	_CET_ENDBR



	leaq	Lmodule(%rip), %rdi
	jmp	___objc_exec_class

.section __DATA, __mod_init_func, mod_init_funcs
	.quad Linit

Modified src/forwarding/forwarding-amd64-win64.S from [e1d53b7337] to [9cb3865a66].

10
11
12
13
14
15
16






17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"







.globl OFForward
.globl OFForward_stret

.section .text
OFForward:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0x90, %rsp	/* 16-byte alignment */
	movq	%rax, -0x28(%rbp)







>
>
>
>
>
>






|
<
<







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29


30
31
32
33
34
35
36
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#ifdef HAVE_CET_H
# include <cet.h>
#else
# define _CET_ENDBR
#endif

.globl OFForward
.globl OFForward_stret

.section .text
OFForward:
	_CET_ENDBR



	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0x90, %rsp	/* 16-byte alignment */
	movq	%rax, -0x28(%rbp)
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
	jmp	OFMethodNotFound
.def OFForward
.scl 2
.type 32
.endef

OFForward_stret:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0x90, %rsp	/* 16-byte alignment */
	movq	%rax, -0x28(%rbp)







|
<
<







99
100
101
102
103
104
105
106


107
108
109
110
111
112
113
	jmp	OFMethodNotFound
.def OFForward
.scl 2
.type 32
.endef

OFForward_stret:
	_CET_ENDBR



	pushq	%rbp
	movq	%rsp, %rbp

	/* Save all arguments */
	subq	$0x90, %rsp	/* 16-byte alignment */
	movq	%rax, -0x28(%rbp)
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
	jmp	OFMethodNotFound_stret
.def OFForward_stret
.scl 2
.type 32
.endef

.Linit:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	leaq	.Lmodule(%rip), %rcx
	jmp	__objc_exec_class

.section .ctors, "aw"
	.quad .Linit








|
<
<







178
179
180
181
182
183
184
185


186
187
188
189
190
191
192
	jmp	OFMethodNotFound_stret
.def OFForward_stret
.scl 2
.type 32
.endef

.Linit:
	_CET_ENDBR



	leaq	.Lmodule(%rip), %rcx
	jmp	__objc_exec_class

.section .ctors, "aw"
	.quad .Linit

Modified src/forwarding/forwarding-x86-elf.S from [c50bd5dc41] to [fb77637fec].

12
13
14
15
16
17
18






19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include "platform.h"







.globl OFForward
.globl OFForward_stret

.section .text
OFForward:
#ifdef HAVE_ENDBR32
	endbr32
#endif

	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$20, %esp








>
>
>
>
>
>






|
<
<







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31


32
33
34
35
36
37
38
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include "platform.h"

#ifdef HAVE_CET_H
# include <cet.h>
#else
# define _CET_ENDBR
#endif

.globl OFForward
.globl OFForward_stret

.section .text
OFForward:
	_CET_ENDBR



	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$20, %esp

86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
	popl	%ebp

	jmp	*%eax
.type OFForward, %function
.size OFForward, .-OFForward

OFForward_stret:
#ifdef HAVE_ENDBR32
	endbr32
#endif

	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$20, %esp








|
<
<







90
91
92
93
94
95
96
97


98
99
100
101
102
103
104
	popl	%ebp

	jmp	*%eax
.type OFForward, %function
.size OFForward, .-OFForward

OFForward_stret:
	_CET_ENDBR



	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$20, %esp

154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
	popl	%ebp

	jmp	*%eax
.type OFForward_stret, %function
.size OFForward_stret, .-OFForward_stret

.Linit:
#ifdef HAVE_ENDBR32
	endbr32
#endif

	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$4, %esp








|
<
<







156
157
158
159
160
161
162
163


164
165
166
167
168
169
170
	popl	%ebp

	jmp	*%eax
.type OFForward_stret, %function
.size OFForward_stret, .-OFForward_stret

.Linit:
	_CET_ENDBR



	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$4, %esp

Modified src/forwarding/forwarding-x86-win32.S from [fa878f1d90] to [4d792b9be9].

13
14
15
16
17
18
19






20
21
22
23
24
25
26
27
28
29
30
31
32
 * file.
 */

#include "config.h"

.globl _OFForward
.globl _OFForward_stret







.section .text
_OFForward:
#ifdef HAVE_ENDBR32
	endbr32
#endif

	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$20, %esp








>
>
>
>
>
>



|
<
<







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29


30
31
32
33
34
35
36
 * file.
 */

#include "config.h"

.globl _OFForward
.globl _OFForward_stret

#ifdef HAVE_CET_H
# include <cet.h>
#else
# define _CET_ENDBR
#endif

.section .text
_OFForward:
	_CET_ENDBR



	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$20, %esp

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
	jmp	_OFMethodNotFound
.def _OFForward
.scl 2
.type 32
.endef

_OFForward_stret:
#ifdef HAVE_ENDBR32
	endbr32
#endif

	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$20, %esp








|
<
<







85
86
87
88
89
90
91
92


93
94
95
96
97
98
99
	jmp	_OFMethodNotFound
.def _OFForward
.scl 2
.type 32
.endef

_OFForward_stret:
	_CET_ENDBR



	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$20, %esp

146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
	jmp	_OFMethodNotFound_stret
.def _OFForward_stret
.scl 2
.type 32
.endef

.Linit:
#ifdef HAVE_ENDBR32
	endbr32
#endif

	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$4, %esp








|
<
<







148
149
150
151
152
153
154
155


156
157
158
159
160
161
162
	jmp	_OFMethodNotFound_stret
.def _OFForward_stret
.scl 2
.type 32
.endef

.Linit:
	_CET_ENDBR



	pushl	%ebp
	movl	%esp, %ebp

	pushl	%ebx
	subl	$4, %esp

Modified src/runtime/lookup-asm/lookup-asm-amd64-elf.S from [2b44a729f4] to [c26c73e7ea].

12
13
14
15
16
17
18






19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include "platform.h"







.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

	testq	%rdi, %rdi
	jz	.LreturnNilMethod

	testb	$1, %dil
	jnz	.LtaggedPointer_\name








>
>
>
>
>
>









|
<
<







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34


35
36
37
38
39
40
41
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include "platform.h"

#ifdef HAVE_CET_H
# include <cet.h>
#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



	testq	%rdi, %rdi
	jz	.LreturnNilMethod

	testb	$1, %dil
	jnz	.LtaggedPointer_\name

68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
	jmp	.Lmain_\name
.type \name, %function
.size \name, .-\name
.endm

.macro GENERATE_LOOKUP_SUPER name lookup
\name:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	movq	%rdi, %r8
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	jz	.LreturnNilMethod

	movq	8(%r8), %r8







|
<
<







72
73
74
75
76
77
78
79


80
81
82
83
84
85
86
	jmp	.Lmain_\name
.type \name, %function
.size \name, .-\name
.endm

.macro GENERATE_LOOKUP_SUPER name lookup
\name:
	_CET_ENDBR



	movq	%rdi, %r8
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	jz	.LreturnNilMethod

	movq	8(%r8), %r8

Modified src/runtime/lookup-asm/lookup-asm-amd64-macho.S from [e88d4f78e5] to [ef9ad4248e].

10
11
12
13
14
15
16






17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"







.globl _objc_msg_lookup
.globl _objc_msg_lookup_stret
.globl _objc_msg_lookup_super
.globl _objc_msg_lookup_super_stret

.section __TEXT, __text, regular, pure_instructions
.macro GENERATE_LOOKUP
$0:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	testq	%rdi, %rdi
	jz	LreturnNilMethod

	testb	$$1, %dil
	jnz	LtaggedPointer_$0








>
>
>
>
>
>









|
<
<







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32


33
34
35
36
37
38
39
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#ifdef HAVE_CET_H
# include <cet.h>
#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, __text, regular, pure_instructions
.macro GENERATE_LOOKUP
$0:
	_CET_ENDBR



	testq	%rdi, %rdi
	jz	LreturnNilMethod

	testb	$$1, %dil
	jnz	LtaggedPointer_$0

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
	movq	64(%r8), %r8

	jmp	Lmain_$0
.endmacro

.macro GENERATE_LOOKUP_SUPER
$0:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	movq	%rdi, %r8
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	jz	LreturnNilMethod

	movq	8(%r8), %r8







|
<
<







68
69
70
71
72
73
74
75


76
77
78
79
80
81
82
	movq	64(%r8), %r8

	jmp	Lmain_$0
.endmacro

.macro GENERATE_LOOKUP_SUPER
$0:
	_CET_ENDBR



	movq	%rdi, %r8
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	jz	LreturnNilMethod

	movq	8(%r8), %r8

Modified src/runtime/lookup-asm/lookup-asm-amd64-win64.S from [94ccf0547a] to [5536a6afa6].

10
11
12
13
14
15
16






17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"







.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

	testq	%rcx, %rcx
	jz	.LreturnNilMethod

	testb	$1, %cl
	jnz	.LtaggedPointer_\name








>
>
>
>
>
>









|
<
<







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32


33
34
35
36
37
38
39
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#ifdef HAVE_CET_H
# include <cet.h>
#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



	testq	%rcx, %rcx
	jz	.LreturnNilMethod

	testb	$1, %cl
	jnz	.LtaggedPointer_\name

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
.scl 2
.type 32
.endef
.endm

.macro GENERATE_LOOKUP_SUPER name lookup
\name:
#ifdef HAVE_ENDBR64
	endbr64
#endif

	movq	%rcx, %r8
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	jz	.LreturnNilMethod

	movq	8(%r8), %r8







|
<
<







79
80
81
82
83
84
85
86


87
88
89
90
91
92
93
.scl 2
.type 32
.endef
.endm

.macro GENERATE_LOOKUP_SUPER name lookup
\name:
	_CET_ENDBR



	movq	%rcx, %r8
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	jz	.LreturnNilMethod

	movq	8(%r8), %r8

Modified src/runtime/lookup-asm/lookup-asm-x86-elf.S from [8f444911c9] to [f6654defd2].

12
13
14
15
16
17
18






19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include "platform.h"







.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_ENDBR32
	endbr32
#endif

	movl	4(%esp), %edx
	testl	%edx, %edx
	jz	.LreturnNilMethod

	testb	$1, %dl
	jnz	.LtaggedPointer_\name







>
>
>
>
>
>









|
<
<







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34


35
36
37
38
39
40
41
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include "platform.h"

#ifdef HAVE_CET_H
# include <cet.h>
#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	.LreturnNilMethod

	testb	$1, %dl
	jnz	.LtaggedPointer_\name
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
	jmp	.Lmain_\name
.type \name, %function
.size \name, .-\name
.endm

.macro GENERATE_LOOKUP_SUPER name lookup
\name:
#ifdef HAVE_ENDBR32
	endbr32
#endif

	movl	4(%esp), %edx
	movl	(%edx), %eax
	testl	%eax, %eax
	jz	.LreturnNilMethod

	movl	%eax, 4(%esp)







|
<
<







82
83
84
85
86
87
88
89


90
91
92
93
94
95
96
	jmp	.Lmain_\name
.type \name, %function
.size \name, .-\name
.endm

.macro GENERATE_LOOKUP_SUPER name lookup
\name:
	_CET_ENDBR



	movl	4(%esp), %edx
	movl	(%edx), %eax
	testl	%eax, %eax
	jz	.LreturnNilMethod

	movl	%eax, 4(%esp)

Modified src/runtime/lookup-asm/lookup-asm-x86-win32.S from [aee3f07f59] to [31732be2f7].

10
11
12
13
14
15
16






17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"







.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_ENDBR32
	endbr32
#endif

	movl	4(%esp), %edx
	testl	%edx, %edx
	jz	.LreturnNilMethod

	testb	$1, %dl
	jnz	.LtaggedPointer_\name







>
>
>
>
>
>









|
<
<







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32


33
34
35
36
37
38
39
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#ifdef HAVE_CET_H
# include <cet.h>
#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	.LreturnNilMethod

	testb	$1, %dl
	jnz	.LtaggedPointer_\name
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
.scl 2
.type 32
.endef
.endm

.macro GENERATE_LOOKUP_SUPER name lookup
\name:
#ifdef HAVE_ENDBR32
	endbr32
#endif

	movl	4(%esp), %edx
	movl	(%edx), %eax
	test	%eax, %eax
	jz	.LreturnNilMethod

	movl	%eax, 4(%esp)







|
<
<







71
72
73
74
75
76
77
78


79
80
81
82
83
84
85
.scl 2
.type 32
.endef
.endm

.macro GENERATE_LOOKUP_SUPER name lookup
\name:
	_CET_ENDBR



	movl	4(%esp), %edx
	movl	(%edx), %eax
	test	%eax, %eax
	jz	.LreturnNilMethod

	movl	%eax, 4(%esp)