summaryrefslogtreecommitdiff
path: root/src/asm
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2012-08-08 09:34:03 +0000
committerTim Angus <tim@ngus.net>2013-01-12 20:46:32 +0000
commitb66b793567754f4256f41795297305c25b5bb94f (patch)
tree653e11fc520596a58a1248927e2108e2d89c3222 /src/asm
parentb59190cd51d190f7b5111a2f4f85da86f0a0aa44 (diff)
Move argument passing from VM to engine to global variables which allows to get rid of lots of OS specific stuff and also fixes errors that happens when compilers add lots of boilerplate to the DoSyscall() function
Diffstat (limited to 'src/asm')
-rw-r--r--src/asm/vm_x86_64.asm18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/asm/vm_x86_64.asm b/src/asm/vm_x86_64.asm
index 030b6987..87e04f4d 100644
--- a/src/asm/vm_x86_64.asm
+++ b/src/asm/vm_x86_64.asm
@@ -23,26 +23,8 @@
;
; assumes __fastcall calling convention
-DoSyscall PROTO
-
.code
-; Call to static void DoSyscall(int syscallNum, int programStack, int *opStackBase, uint8_t opStackOfs, intptr_t arg)
-
-qsyscall64 PROC
- sub rsp, 28h ; after this esp will be aligned to 16 byte boundary
- mov qword ptr [rsp + 20h], rcx ; 5th parameter "arg" is passed on stack
- mov r9b, bl ; opStackOfs
- mov r8, rdi ; opStackBase
- mov edx, esi ; programStack
- mov ecx, eax ; syscallNum
- mov rax, DoSyscall ; store call address of DoSyscall in rax
- call rax
- add rsp, 28h
- ret
-qsyscall64 ENDP
-
-
; Call to compiled code after setting up the register environment for the VM
; prototype:
; uint8_t qvmcall64(int *programStack, int *opStack, intptr_t *instructionPointers, byte *dataBase);