ObjFW  Check-in [acc809db12]

Overview
Comment:Convert lookup-x86-elf.S to AT&T syntax.

Clang has an integrated assembler now which only accepts AT&T syntax.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | runtime
Files: files | file ages | folders
SHA3-256: acc809db1275c92b8e0af0d30c1faf29df19ffd04db7d8ccfd154f9d353c7365
User & Date: js on 2012-04-06 14:07:46
Other Links: branch diff | manifest | tags
Context
2012-04-06
17:43
objc_abi_protocol_list does not exist anymore. check-in: 5b29d50e2e user: js tags: runtime
14:07
Convert lookup-x86-elf.S to AT&T syntax. check-in: acc809db12 user: js tags: runtime
13:43
Convert lookup-amd64-elf.S to AT&T syntax. check-in: d3ce57addf user: js tags: runtime
Changes

Modified src/runtime/lookup-x86-elf.S from [213672a51c] to [97a3d5398b].

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
 * 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.
 */

#if defined(__i386__) && defined(__ELF__)

.intel_syntax noprefix
.globl objc_msg_lookup
.globl objc_msg_lookup_super

.section .text
objc_msg_lookup:
	mov	edx, [esp+4]
	test	edx, edx
	jz	ret_nil

	mov	edx, [edx]
	mov	edx, [edx+32]

lookup:
	mov	eax, [esp+8]

	movzx	ecx, byte ptr [eax+2]
	mov	edx, [edx+ecx*4]
	movzx	ecx, byte ptr [eax+1]
	mov	edx, [edx+ecx*4]
	movzx	ecx, byte ptr [eax]
	mov	eax, [edx+ecx*4]

	test	eax, eax
	jz	forward

	ret

forward:
	call	get_eip
.L1:
	add	eax, offset objc_forward_handler - offset .L1
	jmp	[eax]

objc_msg_lookup_super:
	mov	edx, [esp+4]
	cmp	dword ptr [edx], 0
	je	ret_nil

	mov	edx, [edx+4]
	mov	edx, [edx+32]
	jmp	lookup

ret_nil:
	call	get_eip
.L2:
	add	eax, offset nil_method - offset .L2
	ret

nil_method:
	mov	eax, [esp+4]
	ret

get_eip:
	mov	eax, dword ptr [esp]
	ret

.type objc_msg_lookup, @function
.type objc_msg_lookup_super, @function
.size objc_msg_lookup, forward-objc_msg_lookup
.size objc_msg_lookup_super, ret_nil-objc_msg_lookup_super








<





|
|


|
|


|

|
|
|
|
|
|

|







|
|


|
|


|
|





|



|



|







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
 * 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.
 */

#if defined(__i386__) && defined(__ELF__)


.globl objc_msg_lookup
.globl objc_msg_lookup_super

.section .text
objc_msg_lookup:
	movl	4(%esp), %edx
	testl	%edx, %edx
	jz	ret_nil

	movl	(%edx), %edx
	movl	32(%edx), %edx

lookup:
	movl	8(%esp), %eax

	movzbl	2(%eax), %ecx
	movl	(%edx,%ecx,4), %edx
	movzbl	1(%eax), %ecx
	movl	(%edx,ecx,4), %edx
	movzbl	(%eax), %ecx
	movl	(%edx,%ecx,4), %eax

	testl	%eax, %eax
	jz	forward

	ret

forward:
	call	get_eip
.L1:
	addl	$objc_forward_handler-.L1, %eax
	jmp	*%eax

objc_msg_lookup_super:
	movl	4(%esp), %edx
	cmpl	$0, (%edx)
	je	ret_nil

	movl	4(%edx), %edx
	movl	32(%edx), %edx
	jmp	lookup

ret_nil:
	call	get_eip
.L2:
	addl	$nil_method-.L2, %eax
	ret

nil_method:
	movl	4(%esp), %eax
	ret

get_eip:
	movl	(%esp), %eax
	ret

.type objc_msg_lookup, @function
.type objc_msg_lookup_super, @function
.size objc_msg_lookup, forward-objc_msg_lookup
.size objc_msg_lookup_super, ret_nil-objc_msg_lookup_super