chore: fix almost *ALL* warnings.
[lunaix-os.git] / lunaix-os / kernel / asm / x86 / syscall.S
index eb167836cdf3917455e94720a82c7c802b38a067..b48aeade91db4150136b9201f3872c5b616014e1 100644 (file)
@@ -61,6 +61,7 @@
         .long __lxsys_syslog
         .long __lxsys_sys_mmap
         .long __lxsys_munmap
+        .long __lxsys_execve
         2:
         .rept __SYSCALL_MAX - (2b - 1b)/4
             .long 0
 .section .text
     syscall_hndlr:
         pushl %ebp
-        movl 8(%esp), %ebp
+        movl 8(%esp), %ebp          // isr_param*
 
-        movl  (%ebp), %eax          /* eax: call code as well as the return value from syscall */
-        cmpl  $__SYSCALL_MAX, %eax
+        addl $4, %ebp
+        movl (%ebp), %eax          /* eax: call code as well as the return value from syscall */
+        cmpl $__SYSCALL_MAX, %eax
         jae 2f
 
         shll $2, %eax
@@ -92,7 +94,7 @@
         pushl 8(%ebp)       /* ecx - #2 arg */
         pushl 4(%ebp)       /* ebx - #1 arg */
         
-        call (%eax)
+        call *(%eax)
 
         movl %eax, (%ebp)    /* save the return value */