ObjFW  Check-in [c31d10979d]

Overview
Comment:lookup-asm-arm64-elf.S: Support tagged pointers
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tagged-pointers
Files: files | file ages | folders
SHA3-256: c31d10979de7e31646f9cc259546ba49acc03830349496f90136575e36f0c7ea
User & Date: js on 2020-07-05 12:30:40
Other Links: branch diff | manifest | tags
Context
2020-07-05
14:06
lookup-asm-x86(_64)-*.S: Shave off one instruction check-in: 0579faebb2 user: js tags: tagged-pointers
12:30
lookup-asm-arm64-elf.S: Support tagged pointers check-in: c31d10979d user: js tags: tagged-pointers
11:11
Merge trunk into branch "tagged-pointers" check-in: 6fb1661b64 user: js tags: tagged-pointers
Changes

Modified src/runtime/lookup-asm/lookup-asm-arm64-elf.S from [ac72aa9b77] to [577d4b7ca0].

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
48
49
50











51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.globl objc_msg_lookup_stret
.globl objc_msg_lookup_super
.globl objc_msg_lookup_super_stret

.section .text
.macro generate_lookup name not_found
\name:
	cmp	x0, #0
	beq	ret_nil



	ldr	x2, [x0, #0]
	ldr	x2, [x2, #64]

.Lmain_\name:
#ifdef OF_SELUID24
	ldrb	w3, [x1, #2]
	ldr	x2, [x2, x3, lsl #3]
#endif
	ldrb	w3, [x1, #1]
	ldr	x2, [x2, x3, lsl #3]
	ldrb	w3, [x1, #0]
	ldr	x2, [x2, x3, lsl #3]

	cmp	x2, #0
	beq	\not_found

	mov	x0, x2
	ret











.type \name, %function
.size \name, .-\name
.endm

.macro generate_lookup_super name lookup
\name:
	mov	x2, x0
	ldr	x0, [x0, #0]
	cmp	x0, #0
	beq	ret_nil

	ldr	x2, [x2, #8]
	ldr	x2, [x2, #64]

	b	.Lmain_\lookup
.type \name, %function
.size \name, .-\name







|
|
>
>

|









|


<
|



>
>
>
>
>
>
>
>
>
>
>







|
<
|







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

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

71
72
73
74
75
76
77
78
.globl objc_msg_lookup_stret
.globl objc_msg_lookup_super
.globl objc_msg_lookup_super_stret

.section .text
.macro generate_lookup name not_found
\name:
	cbz	x0, ret_nil

	tst	x0, #1
	bne	.Ltagged_pointer_\name

	ldr	x2, [x0]
	ldr	x2, [x2, #64]

.Lmain_\name:
#ifdef OF_SELUID24
	ldrb	w3, [x1, #2]
	ldr	x2, [x2, x3, lsl #3]
#endif
	ldrb	w3, [x1, #1]
	ldr	x2, [x2, x3, lsl #3]
	ldrb	w3, [x1]
	ldr	x2, [x2, x3, lsl #3]


	cbz	x2, \not_found

	mov	x0, x2
	ret

.Ltagged_pointer_\name:
	and	x0, x0, #0xE
	lsl	x0, x0, #2

	adrp	x2, :got:objc_tagged_pointer_classes
	ldr	x2, [x2, #:got_lo12:objc_tagged_pointer_classes]
	ldr	x2, [x2, x0]
	ldr	x2, [x2, #64]

	b	.Lmain_\name
.type \name, %function
.size \name, .-\name
.endm

.macro generate_lookup_super name lookup
\name:
	mov	x2, x0
	ldr	x0, [x0]

	cbz	x0, ret_nil

	ldr	x2, [x2, #8]
	ldr	x2, [x2, #64]

	b	.Lmain_\lookup
.type \name, %function
.size \name, .-\name