File: trivial-objc-methods.S

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (159 lines) | stat: -rw-r--r-- 3,172 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// RUN: %clang -c -o %t %s
// RUN: %llvm_jitlink -preload libobjc.A.dylib %t
//
// REQUIRES: jit-compatible-osx-swift-runtime
//
// Test that Objective-C class and instance methods work.

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 11, 0	sdk_version 11, 5
	.p2align	4, 0x90
"-[ZeroGen objZero]":
	pushq	%rbp
	movq	%rsp, %rbp
	xorl	%eax, %eax
	popq	%rbp
	retq

	.p2align	4, 0x90
"+[ZeroGen classZero]":
	pushq	%rbp
	movq	%rsp, %rbp
	xorl	%eax, %eax
	popq	%rbp
	retq

	.globl	_main
	.p2align	4, 0x90
_main:
	pushq	%rbp
	movq	%rsp, %rbp
	movq	_OBJC_CLASSLIST_REFERENCES_$_(%rip), %rdi
	callq	_objc_alloc_init
	movq	_OBJC_SELECTOR_REFERENCES_(%rip), %rsi
	movq	%rax, %rdi
	callq	*_objc_msgSend@GOTPCREL(%rip)
	testl	%eax, %eax
	jne	LBB2_3

	movq	_OBJC_CLASSLIST_REFERENCES_$_(%rip), %rdi
	movq	_OBJC_SELECTOR_REFERENCES_.2(%rip), %rsi
	callq	*_objc_msgSend@GOTPCREL(%rip)
	testl	%eax, %eax
	je	LBB2_2
LBB2_3:
	movl	$1, %eax
	popq	%rbp
	retq
LBB2_2:
	xorl	%eax, %eax
	popq	%rbp
	retq

	.section	__TEXT,__objc_classname,cstring_literals
L_OBJC_CLASS_NAME_:
	.asciz	"ZeroGen"

	.section	__TEXT,__objc_methname,cstring_literals
L_OBJC_METH_VAR_NAME_:
	.asciz	"classZero"

	.section	__TEXT,__objc_methtype,cstring_literals
L_OBJC_METH_VAR_TYPE_:
	.asciz	"i16@0:8"

	.section	__DATA,__objc_const
	.p2align	3
__OBJC_$_CLASS_METHODS_ZeroGen:
	.long	24
	.long	1
	.quad	L_OBJC_METH_VAR_NAME_
	.quad	L_OBJC_METH_VAR_TYPE_
	.quad	"+[ZeroGen classZero]"

	.p2align	3
__OBJC_METACLASS_RO_$_ZeroGen:
	.long	1
	.long	40
	.long	40
	.space	4
	.quad	0
	.quad	L_OBJC_CLASS_NAME_
	.quad	__OBJC_$_CLASS_METHODS_ZeroGen
	.quad	0
	.quad	0
	.quad	0
	.quad	0

	.section	__DATA,__objc_data
	.globl	_OBJC_METACLASS_$_ZeroGen
	.p2align	3
_OBJC_METACLASS_$_ZeroGen:
	.quad	_OBJC_METACLASS_$_NSObject
	.quad	_OBJC_METACLASS_$_NSObject
	.quad	__objc_empty_cache
	.quad	0
	.quad	__OBJC_METACLASS_RO_$_ZeroGen

	.section	__TEXT,__objc_methname,cstring_literals
L_OBJC_METH_VAR_NAME_.1:
	.asciz	"objZero"

	.section	__DATA,__objc_const
	.p2align	3
__OBJC_$_INSTANCE_METHODS_ZeroGen:
	.long	24
	.long	1
	.quad	L_OBJC_METH_VAR_NAME_.1
	.quad	L_OBJC_METH_VAR_TYPE_
	.quad	"-[ZeroGen objZero]"

	.p2align	3
__OBJC_CLASS_RO_$_ZeroGen:
	.long	0
	.long	8
	.long	8
	.space	4
	.quad	0
	.quad	L_OBJC_CLASS_NAME_
	.quad	__OBJC_$_INSTANCE_METHODS_ZeroGen
	.quad	0
	.quad	0
	.quad	0
	.quad	0

	.section	__DATA,__objc_data
	.globl	_OBJC_CLASS_$_ZeroGen
	.p2align	3
_OBJC_CLASS_$_ZeroGen:
	.quad	_OBJC_METACLASS_$_ZeroGen
	.quad	_OBJC_CLASS_$_NSObject
	.quad	__objc_empty_cache
	.quad	0
	.quad	__OBJC_CLASS_RO_$_ZeroGen

	.section	__DATA,__objc_classrefs,regular,no_dead_strip
	.p2align	3
_OBJC_CLASSLIST_REFERENCES_$_:
	.quad	_OBJC_CLASS_$_ZeroGen

	.section	__DATA,__objc_selrefs,literal_pointers,no_dead_strip
	.p2align	3
_OBJC_SELECTOR_REFERENCES_:
	.quad	L_OBJC_METH_VAR_NAME_.1

	.p2align	3
_OBJC_SELECTOR_REFERENCES_.2:
	.quad	L_OBJC_METH_VAR_NAME_

	.section	__DATA,__objc_classlist,regular,no_dead_strip
	.p2align	3
L_OBJC_LABEL_CLASS_$:
	.quad	_OBJC_CLASS_$_ZeroGen

	.section	__DATA,__objc_imageinfo,regular,no_dead_strip
L_OBJC_IMAGE_INFO:
	.long	0
	.long	64

.subsections_via_symbols