comparison dyncall/dyncall_call_x64.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 4f9f49fb82ce
children 71c884e610f0
comparison
equal deleted inserted replaced
340:6e33db95e724 341:ab2d78e48ca2
151 RDI : pointer to arguments 151 RDI : pointer to arguments
152 RSI : syscall id 152 RSI : syscall id
153 153
154 */ 154 */
155 155
156 GLOBAL(dcCall_x64_sys_syscall_sysv) 156 GLOBAL(dcCall_x64_syscall_sysv)
157 BEGIN_PROC(dcCall_x64_sys_syscall_sysv) 157 BEGIN_PROC(dcCall_x64_syscall_sysv)
158 158
159 MOV(RSI,RAX) /* load system call id. */ 159 MOV(RSI,RAX) /* load system call id. */
160 MOV(QWORD(RDI,40),R9) /* copy first six int/pointer arguments to RDI, RSI, RDX, R10, R8, R9. */ 160 MOV(QWORD(RDI,40),R9) /* copy first six int/pointer arguments to RDI, RSI, RDX, R10, R8, R9. */
161 MOV(QWORD(RDI,32),R8) 161 MOV(QWORD(RDI,32),R8)
162 MOV(QWORD(RDI,24),R10) 162 MOV(QWORD(RDI,24),R10)
164 MOV(QWORD(RDI,8),RSI) 164 MOV(QWORD(RDI,8),RSI)
165 MOV(QWORD(RDI,0),RDI) /* Set RDI last to not overwrite it to soon. */ 165 MOV(QWORD(RDI,0),RDI) /* Set RDI last to not overwrite it to soon. */
166 SYSCALL 166 SYSCALL
167 RET() 167 RET()
168 168
169 END_PROC(dcCall_x64_sys_syscall_sysv) 169 END_PROC(dcCall_x64_syscall_sysv)
170 170
171 END_ASM 171 END_ASM
172 172