ObjFW  Check-in [ddb7ebcf5b]

Overview
Comment:Use `bti c` instead of `bti jc`

The `j` isn't necessary, as tail call eliminations can just use x16/x17,
which allow any type.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ddb7ebcf5b0f840113bcb6b86ebd2b68873789ea9efd845de0d3314a2086be74
User & Date: js on 2024-02-24 22:30:06
Other Links: manifest | tags
Context
2024-02-25
01:08
Backport associated objects to old Apple runtime check-in: 2d8c6a004d user: js tags: trunk
2024-02-24
22:30
Use `bti c` instead of `bti jc` check-in: 21244a7e62 user: js tags: 1.0
22:30
Use `bti c` instead of `bti jc` check-in: ddb7ebcf5b user: js tags: trunk
21:12
Update ChangeLog for 1.0.10 check-in: 7767b60d7f user: js tags: trunk
Changes

Modified configure.ac from [6716f34b04] to [43a1e3f56e].

847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
		AC_MSG_RESULT(no)
	])
	;;
aarch64* | arm64*)
	AC_MSG_CHECKING(for bti)
	AC_COMPILE_IFELSE([
		AC_LANG_PROGRAM([], [
			__asm__ __volatile__ ("bti jc");
		])
	], [
		AC_DEFINE(HAVE_BTI, 1, [Whether we have bti])
		AC_MSG_RESULT(yes)
	], [
		AC_MSG_RESULT(no)
	])







|







847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
		AC_MSG_RESULT(no)
	])
	;;
aarch64* | arm64*)
	AC_MSG_CHECKING(for bti)
	AC_COMPILE_IFELSE([
		AC_LANG_PROGRAM([], [
			__asm__ __volatile__ ("bti c");
		])
	], [
		AC_DEFINE(HAVE_BTI, 1, [Whether we have bti])
		AC_MSG_RESULT(yes)
	], [
		AC_MSG_RESULT(no)
	])

Modified src/forwarding/apple-forwarding-arm64.S from [295019262c] to [7c10374751].

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
	.long 0, 0

.section __TEXT, __text, regular, pure_instructions
.align 2
_OFForward:
_OFForward_stret:
#ifdef HAVE_BTI
	bti	jc
#endif

	stp	fp, lr, [sp, #-208]!
	mov	fp, sp
	sub	sp, sp, #208

	/* Save all arguments, x8 and x19 */







|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
	.long 0, 0

.section __TEXT, __text, regular, pure_instructions
.align 2
_OFForward:
_OFForward_stret:
#ifdef HAVE_BTI
	bti	c
#endif

	stp	fp, lr, [sp, #-208]!
	mov	fp, sp
	sub	sp, sp, #208

	/* Save all arguments, x8 and x19 */

Modified src/forwarding/forwarding-arm64-elf.S from [a4d41fba56] to [de35f51c09].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.globl OFForward
.globl OFForward_stret

.section .text
OFForward:
OFForward_stret:
#ifdef HAVE_BTI
	bti	jc
#endif

	stp	fp, lr, [sp, #-208]!
	mov	fp, sp
	sub	sp, sp, #208

	/* Save all arguments, x8 and x19 */







|







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.globl OFForward
.globl OFForward_stret

.section .text
OFForward:
OFForward_stret:
#ifdef HAVE_BTI
	bti	c
#endif

	stp	fp, lr, [sp, #-208]!
	mov	fp, sp
	sub	sp, sp, #208

	/* Save all arguments, x8 and x19 */

Modified src/runtime/lookup-asm/lookup-asm-arm64-elf.S from [0b31617db4] to [9cc1ea565d].

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.globl objc_msg_lookup_super
.globl objc_msg_lookup_super_stret

.section .text
.macro GENERATE_LOOKUP name notFound
\name:
#ifdef HAVE_BTI
	bti	jc
#endif

	cbz	x0, .LreturnNilMethod

	tst	x0, #1
	b.ne	.LtaggedPointer_\name








|







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.globl objc_msg_lookup_super
.globl objc_msg_lookup_super_stret

.section .text
.macro GENERATE_LOOKUP name notFound
\name:
#ifdef HAVE_BTI
	bti	c
#endif

	cbz	x0, .LreturnNilMethod

	tst	x0, #1
	b.ne	.LtaggedPointer_\name

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

.macro GENERATE_LOOKUP_SUPER name lookup
\name:
#ifdef HAVE_BTI
	bti	jc
#endif

	mov	x2, x0
	ldr	x0, [x0]
	cbz	x0, .LreturnNilMethod

	ldr	x2, [x2, #8]







|







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

.macro GENERATE_LOOKUP_SUPER name lookup
\name:
#ifdef HAVE_BTI
	bti	c
#endif

	mov	x2, x0
	ldr	x0, [x0]
	cbz	x0, .LreturnNilMethod

	ldr	x2, [x2, #8]