ObjFW  Check-in [3e76fc01af]

Overview
Comment:runtime: Don't overwrite stack arguments on x86

This could be problematic if the compiler expects the stack to be
unchanged.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3e76fc01af03d9d5189149e2794af5034ec2a1b33a8848103d87907ba3d8b6aa
User & Date: js on 2024-08-02 10:52:16
Other Links: manifest | tags
Context
2024-08-11
09:04
Update buildsys check-in: fdcf97fd30 user: js tags: trunk
2024-08-02
10:52
runtime: Don't overwrite stack arguments on x86 check-in: aa04d7888d user: js tags: 1.1
10:52
runtime: Don't overwrite stack arguments on x86 check-in: 3e76fc01af user: js tags: trunk
2024-07-29
22:19
Fix missing underscore in last commit check-in: c9bf16250c user: js tags: trunk
Changes

Modified src/runtime/lookup-asm/lookup-asm-x86-elf.S from [51eaca73d3] to [f683aade07].

93
94
95
96
97
98
99



100

101
102
103






104
105
106
107
108
109
110
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







+
+
+

+
-
-
-
+
+
+
+
+
+







	_CET_ENDBR

	movl	4(%esp), %edx
	movl	(%edx), %eax
	testl	%eax, %eax
	jz	.LreturnNilMethod

	subl	$16, %esp
	movl	%eax, (%esp)
	movl	24(%esp), %eax
	movl	%eax, 4(%esp)

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

	addl	$16, %esp
	ret
.type \name, %function
.size \name, .-\name
.endm

GENERATE_LOOKUP objc_msg_lookup objc_methodNotFound
GENERATE_LOOKUP objc_msg_lookup_stret objc_methodNotFound_stret
GENERATE_LOOKUP_SUPER objc_msg_lookup_super objc_msg_lookup

Modified src/runtime/lookup-asm/lookup-asm-x86-win32.S from [60ea15786d] to [6a76ae6982].

79
80
81
82
83
84
85
86

87
88



89

90
91
92




93
94
95
96
97
98
99
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







-
+


+
+
+

+


-
+
+
+
+








.macro GENERATE_LOOKUP_SUPER name lookup
\name:
	_CET_ENDBR

	movl	4(%esp), %edx
	movl	(%edx), %eax
	test	%eax, %eax
	testl	%eax, %eax
	jz	.LreturnNilMethod

	subl	$16, %esp
	movl	%eax, (%esp)
	movl	24(%esp), %eax
	movl	%eax, 4(%esp)

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

	addl	$16, %esp
	ret
.def \name
.scl 2
.type 32
.endef
.endm

GENERATE_LOOKUP _objc_msg_lookup _objc_methodNotFound