ObjFW  Check-in [aa04d7888d]

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 | 1.1
Files: files | file ages | folders
SHA3-256: aa04d7888d8324efbe43fb9d5df2046b7f4a2353c7439843083b04229e58ec73
User & Date: js on 2024-08-02 10:52:25
Other Links: branch diff | manifest | tags
Context
2024-08-11
13:23
Make headers compatible with -Wunused-parameter check-in: 668be94ea4 user: js tags: 1.1
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: edaf4a090e user: js tags: 1.1
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
	_CET_ENDBR

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




	movl	%eax, 4(%esp)

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



.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







>
>
>

>
|
|
|
>
>
>







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)

	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

.macro GENERATE_LOOKUP_SUPER name lookup
\name:
	_CET_ENDBR

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




	movl	%eax, 4(%esp)

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



.def \name
.scl 2
.type 32
.endef
.endm

GENERATE_LOOKUP _objc_msg_lookup _objc_methodNotFound







|


>
>
>

>


|
>
>
>







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
	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
	call	.Lmain_\lookup

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

GENERATE_LOOKUP _objc_msg_lookup _objc_methodNotFound