ObjFW  Check-in [d4d5a27ccd]

Overview
Comment:Fix super lookup of missing methods on x86(_64)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d4d5a27ccdf543bc89e052d49ef3a79e72d5752fd0f55a589b3c2bc9fe36b6fa
User & Date: js on 2016-05-07 19:08:09
Other Links: manifest | tags
Context
2016-05-07
20:00
Fix super lookup of missing methods on ARM check-in: bdc99715bb user: js tags: trunk
19:08
Fix super lookup of missing methods on x86(_64) check-in: d4d5a27ccd user: js tags: trunk
16:34
One more tiny fix for -Wsign-compare check-in: e3cf8b4edd user: js tags: trunk
Changes

Modified src/runtime/lookup-asm/lookup-asm-x86-elf.S from [8f6ee2e99e] to [971cf6e9f2].

59
60
61
62
63
64
65

66
67
68

69
70
71
72
73
74
75
.type \name, %function
.size \name, .-\name
.endm

.macro generate_lookup_super name lookup
\name:
	movl	4(%esp), %edx

	cmpl	$0, (%edx)
	je	ret_nil


	movl	4(%edx), %edx
	movl	32(%edx), %edx
	jmp	.Lmain_\lookup
.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
.type \name, %function
.size \name, .-\name
.endm

.macro generate_lookup_super name lookup
\name:
	movl	4(%esp), %edx
	movl	(%edx), %eax
	cmpl	$0, %eax
	je	ret_nil

	movl	%eax, 4(%esp)
	movl	4(%edx), %edx
	movl	32(%edx), %edx
	jmp	.Lmain_\lookup
.type \name, %function
.size \name, .-\name
.endm

Modified src/runtime/lookup-asm/lookup-asm-x86-win32.S from [9c647421e1] to [904a0e774b].

54
55
56
57
58
59
60

61
62
63

64
65
66
67
68
69
70
	addl	$\not_found-1b, %eax
	jmp	*%eax
.endm

.macro generate_lookup_super name lookup
\name:
	movl	4(%esp), %edx

	cmpl	$0, (%edx)
	je	ret_nil


	movl	4(%edx), %edx
	movl	32(%edx), %edx
	jmp	.Lmain_\lookup
.endm

generate_lookup _objc_msg_lookup _objc_method_not_found
generate_lookup _objc_msg_lookup_stret _objc_method_not_found_stret







>
|


>







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
	addl	$\not_found-1b, %eax
	jmp	*%eax
.endm

.macro generate_lookup_super name lookup
\name:
	movl	4(%esp), %edx
	movl	(%edx), %eax
	cmpl	$0, %eax
	je	ret_nil

	movl	%eax, 4(%esp)
	movl	4(%edx), %edx
	movl	32(%edx), %edx
	jmp	.Lmain_\lookup
.endm

generate_lookup _objc_msg_lookup _objc_method_not_found
generate_lookup _objc_msg_lookup_stret _objc_method_not_found_stret

Modified src/runtime/lookup-asm/lookup-asm-x86_64-elf.S from [788eeb6057] to [7cfa75527e].

50
51
52
53
54
55
56

57
58
59
60
61
62
63
64
65
66
67
68
	ret
.type \name, %function
.size \name, .-\name
.endm

.macro generate_lookup_super name lookup
\name:

	movq	(%rdi), %rax
	testq	%rax, %rax
	jz	ret_nil

	movq	8(%rdi), %r8
	movq	64(%r8), %r8
	jmp	.Lmain_\lookup
.type \name, %function
.size \name, .-\name
.endm

generate_lookup objc_msg_lookup objc_method_not_found







>
|
|


|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
	ret
.type \name, %function
.size \name, .-\name
.endm

.macro generate_lookup_super name lookup
\name:
	movq	%rdi, %r8
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	jz	ret_nil

	movq	8(%r8), %r8
	movq	64(%r8), %r8
	jmp	.Lmain_\lookup
.type \name, %function
.size \name, .-\name
.endm

generate_lookup objc_msg_lookup objc_method_not_found

Modified src/runtime/lookup-asm/lookup-asm-x86_64-macho.S from [89f5bc0493] to [fdee58d5fa].

46
47
48
49
50
51
52

53
54
55
56
57
58
59
60
61
62
63
64
	jz	$1

	ret
.endmacro

.macro generate_lookup_super
$0:

	movq	(%rdi), %rax
	testq	%rax, %rax
	jz	ret_nil

	movq	8(%rdi), %r8
	movq	64(%r8), %r8
	jmp	Lmain_$1
.endmacro

generate_lookup _objc_msg_lookup, _objc_method_not_found
generate_lookup _objc_msg_lookup_stret, _objc_method_not_found_stret
generate_lookup_super _objc_msg_lookup_super, _objc_msg_lookup







>
|
|


|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
	jz	$1

	ret
.endmacro

.macro generate_lookup_super
$0:
	movq	%rdi, %r8
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	jz	ret_nil

	movq	8(%r8), %r8
	movq	64(%r8), %r8
	jmp	Lmain_$1
.endmacro

generate_lookup _objc_msg_lookup, _objc_method_not_found
generate_lookup _objc_msg_lookup_stret, _objc_method_not_found_stret
generate_lookup_super _objc_msg_lookup_super, _objc_msg_lookup

Modified src/runtime/lookup-asm/lookup-asm-x86_64-win64.S from [cc90b17b20] to [54f61c8cb0].

54
55
56
57
58
59
60

61
62
63
64
65
66
67
68
69
70
71
72
	movq	%r10, %rcx
	movq	%r11, %rdx
	jmp	\not_found
.endm

.macro generate_lookup_super name lookup
\name:

	movq	(%rcx), %rax
	testq	%rax, %rax
	jz	ret_nil

	movq	8(%rcx), %r8
	movq	56(%r8), %r8
	jmp	.Lmain_\lookup
.endm

generate_lookup objc_msg_lookup objc_method_not_found
generate_lookup objc_msg_lookup_stret objc_method_not_found_stret
generate_lookup_super objc_msg_lookup_super objc_msg_lookup







>
|
|


|







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
	movq	%r10, %rcx
	movq	%r11, %rdx
	jmp	\not_found
.endm

.macro generate_lookup_super name lookup
\name:
	movq	%rcx, %r8
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	jz	ret_nil

	movq	8(%r8), %r8
	movq	56(%r8), %r8
	jmp	.Lmain_\lookup
.endm

generate_lookup objc_msg_lookup objc_method_not_found
generate_lookup objc_msg_lookup_stret objc_method_not_found_stret
generate_lookup_super objc_msg_lookup_super objc_msg_lookup