comparison dyncall/dyncall_call_x86.S @ 341:ab2d78e48ca2

- gen-masm . fallback on clang if gcc not available . consolidated use of redundant scripts . regen of portasm based masm files - minor symbol name changes for clarity/consistency
author Tassilo Philipp
date Sat, 04 Jan 2020 23:00:02 +0100
parents f5577f6bf97a
children fea865cd1305
comparison
equal deleted inserted replaced
340:6e33db95e724 341:ab2d78e48ca2
180 Details: 180 Details:
181 - all arguments are passed via registers 181 - all arguments are passed via registers
182 182
183 */ 183 */
184 184
185 GLOBAL(dcCall_x86_sys_int80h_linux) 185 GLOBAL(dcCall_x86_syscall_int80h_linux)
186 BEGIN_PROC(dcCall_x86_sys_int80h_linux) 186 BEGIN_PROC(dcCall_x86_syscall_int80h_linux)
187 PUSH(EBP) /* prolog. */ 187 PUSH(EBP) /* prolog. */
188 MOVL(ESP,EBP) 188 MOVL(ESP,EBP)
189 PUSH(EBX) /* save preserved. */ 189 PUSH(EBX) /* save preserved. */
190 PUSH(ESI) 190 PUSH(ESI)
191 PUSH(EDI) 191 PUSH(EDI)
201 POP(ESI) 201 POP(ESI)
202 POP(EBX) 202 POP(EBX)
203 MOVL(EBP,ESP) /* epilog. */ 203 MOVL(EBP,ESP) /* epilog. */
204 POP(EBP) 204 POP(EBP)
205 RET() 205 RET()
206 END_PROC(dcCall_x86_sys_int80h_linux) 206 END_PROC(dcCall_x86_syscall_int80h_linux)
207 207
208 /*--- syscall int80 bsd ----------------------------------------------------- 208 /*--- syscall int80 bsd -----------------------------------------------------
209 209
210 Details: 210 Details:
211 - all arguments are passed via stack 211 - all arguments are passed via stack
212 212
213 */ 213 */
214 214
215 GLOBAL(dcCall_x86_sys_int80h_bsd) 215 GLOBAL(dcCall_x86_syscall_int80h_bsd)
216 BEGIN_PROC(dcCall_x86_sys_int80h_bsd) 216 BEGIN_PROC(dcCall_x86_syscall_int80h_bsd)
217 PUSH(EBP) /* prolog. */ 217 PUSH(EBP) /* prolog. */
218 MOVL(ESP,EBP) 218 MOVL(ESP,EBP)
219 PUSH(ESI) /* save preserved. */ 219 PUSH(ESI) /* save preserved. */
220 PUSH(EDI) 220 PUSH(EDI)
221 MOVL(DWORD(EBP,12),ESI) /* ESI = pointer on args. */ 221 MOVL(DWORD(EBP,12),ESI) /* ESI = pointer on args. */
231 POP(EBP) 231 POP(EBP)
232 RET() 232 RET()
233 _do_int: 233 _do_int:
234 INT(LIT(HEX(80))) 234 INT(LIT(HEX(80)))
235 RET() 235 RET()
236 END_PROC(dcCall_x86_sys_int80h_bsd) 236 END_PROC(dcCall_x86_syscall_int80h_bsd)
237 237
238 END_ASM 238 END_ASM
239 239