ObjFW  Check-in [0579faebb2]

Overview
Comment:lookup-asm-x86(_64)-*.S: Shave off one instruction
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tagged-pointers
Files: files | file ages | folders
SHA3-256: 0579faebb2714f05abaf3e3c4d27519efaf89e6f3966402ba6097970742870fd
User & Date: js on 2020-07-05 14:06:24
Other Links: branch diff | manifest | tags
Context
2020-07-06
20:07
lookup-asm-mips64-n64-elf.S: Tagged pointers check-in: 681c2e3087 user: js tags: tagged-pointers
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
Changes

Modified src/runtime/lookup-asm/lookup-asm-x86-elf.S from [6468f2e74c] to [d8beb6d9cc].

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
0:
	call	get_eip
	add	eax, offset _GLOBAL_OFFSET_TABLE_
	lea	eax, [eax+\not_found@GOTOFF]
	jmp	eax

.Ltagged_pointer_\name:
	and	dl, 0xF
	shr	dl, 1
	movzx	edx, dl

	call	get_eip
	add	eax, offset _GLOBAL_OFFSET_TABLE_

	lea	eax, [eax+objc_tagged_pointer_classes@GOTOFF]
	mov	edx, [eax+edx*4]
	mov	edx, [edx+32]

	jmp	short .Lmain_\name
.type \name, %function
.size \name, .-\name
.endm








|
<






|







59
60
61
62
63
64
65
66

67
68
69
70
71
72
73
74
75
76
77
78
79
80
0:
	call	get_eip
	add	eax, offset _GLOBAL_OFFSET_TABLE_
	lea	eax, [eax+\not_found@GOTOFF]
	jmp	eax

.Ltagged_pointer_\name:
	and	dl, 0xE

	movzx	edx, dl

	call	get_eip
	add	eax, offset _GLOBAL_OFFSET_TABLE_

	lea	eax, [eax+objc_tagged_pointer_classes@GOTOFF]
	mov	edx, [eax+edx*2]
	mov	edx, [edx+32]

	jmp	short .Lmain_\name
.type \name, %function
.size \name, .-\name
.endm

Modified src/runtime/lookup-asm/lookup-asm-x86-win32.S from [6bf3eb314e] to [a3d86ba076].

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

	test	eax, eax
	jz	\not_found

	ret

.Ltagged_pointer_\name:
	and	dl, 0xF
	shr	dl, 1
	movzx	edx, dl

	mov	eax, offset _objc_tagged_pointer_classes
	mov	edx, [eax+edx*4]
	mov	edx, [edx+32]

	jmp	short .Lmain_\name
.endm

.macro generate_lookup_super name lookup
\name:







|
<



|







51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66
67
68
69

	test	eax, eax
	jz	\not_found

	ret

.Ltagged_pointer_\name:
	and	dl, 0xE

	movzx	edx, dl

	mov	eax, offset _objc_tagged_pointer_classes
	mov	edx, [eax+edx*2]
	mov	edx, [edx+32]

	jmp	short .Lmain_\name
.endm

.macro generate_lookup_super name lookup
\name:

Modified src/runtime/lookup-asm/lookup-asm-x86_64-elf.S from [00fefd9a7f] to [82960b8628].

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

	test	rax, rax
	jz	short \not_found@PLT

	ret

.Ltagged_pointer_\name:
	and	dil, 0xF
	shr	dil, 1
	movzx	r8, dil

	mov	rax, [rip+objc_tagged_pointer_classes@GOTPCREL]
	mov	r8, [rax+r8*8]
	mov	r8, [r8+64]

	jmp	short .Lmain_\name
.type \name, %function
.size \name, .-\name
.endm








|
<



|







52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
67
68
69
70

	test	rax, rax
	jz	short \not_found@PLT

	ret

.Ltagged_pointer_\name:
	and	dil, 0xE

	movzx	r8, dil

	mov	rax, [rip+objc_tagged_pointer_classes@GOTPCREL]
	mov	r8, [rax+r8*4]
	mov	r8, [r8+64]

	jmp	short .Lmain_\name
.type \name, %function
.size \name, .-\name
.endm

Modified src/runtime/lookup-asm/lookup-asm-x86_64-macho.S from [0ccb921815] to [b9237d1cde].

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

	test	rax, rax
	jz	$1

	ret

Ltagged_pointer_$0:
	and	dil, 0xF
	shr	dil, 1
	movzx	r8, dil

	mov	rax, [rip+_objc_tagged_pointer_classes]
	mov	r8, [rax+r8*8]
	mov	r8, [r8+64]

	jmp	Lmain_$0
.endmacro

.macro generate_lookup_super
$0:







|
<



|







50
51
52
53
54
55
56
57

58
59
60
61
62
63
64
65
66
67
68

	test	rax, rax
	jz	$1

	ret

Ltagged_pointer_$0:
	and	dil, 0xE

	movzx	r8, dil

	mov	rax, [rip+_objc_tagged_pointer_classes]
	mov	r8, [rax+r8*4]
	mov	r8, [r8+64]

	jmp	Lmain_$0
.endmacro

.macro generate_lookup_super
$0:

Modified src/runtime/lookup-asm/lookup-asm-x86_64-win64.S from [069968302a] to [c662475fba].

58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

0:
	mov	rcx, r10
	mov	rdx, r11
	jmp	\not_found

.Ltagged_pointer_\name:
	and	cl, 0xF
	shr	cl, 1
	movzx	r8, cl

	mov	rax, offset objc_tagged_pointer_classes
	mov	r8, [rax+r8*8]
	mov	r8, [r8+56]

	jmp	short .Lmain_\name
.endm

.macro generate_lookup_super name lookup
\name:







|
<



|







58
59
60
61
62
63
64
65

66
67
68
69
70
71
72
73
74
75
76

0:
	mov	rcx, r10
	mov	rdx, r11
	jmp	\not_found

.Ltagged_pointer_\name:
	and	cl, 0xE

	movzx	r8, cl

	mov	rax, offset objc_tagged_pointer_classes
	mov	r8, [rax+r8*4]
	mov	r8, [r8+56]

	jmp	short .Lmain_\name
.endm

.macro generate_lookup_super name lookup
\name: