Changeset 296426ad in mainline for uspace


Ignore:
Timestamp:
2007-11-16T16:17:18Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9c2fb97
Parents:
e686744c
Message:

Support for 6 syscalls arguments on amd64.

Location:
uspace/lib/libc/arch/amd64/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/arch/amd64/src/fibril.S

    re686744c r296426ad  
    8181        # Set thread local storage
    8282        movq OFFSET_TLS(%rdi), %rdi   # Set arg1 to TLS addr
    83         movq $1, %r8
     83        movq $1, %rax           # SYS_TLS_SET
    8484        syscall
    8585
  • uspace/lib/libc/arch/amd64/src/syscall.S

    re686744c r296426ad  
    2929.text
    3030       
    31 .globl __syscall
     31.global __syscall
     32       
     33## Make a system call.
     34#
     35# @param rdi            First argument.
     36# @param rsi            Second argument.
     37# @param rdx            Third argument.
     38# @param rcx            Fourth argument.
     39# @param r8             Fifth argument.
     40# @param r9             Sixth argument.
     41# @param 8(%rsp)        Syscall number.
     42#
     43# @return               The return value will be stored in RAX.
     44#
     45__syscall:
     46        #
     47        # Move the syscall number into RAX.
     48        movslq 8(%rsp), %rax
    3249
    33        
    34 __syscall:
    35         # rcx gets rewritten on syscall
    36         movq %rcx, %r9
     50        #
     51        # Save RCX, the 4th argument, aside because RCX gets rewritten by the
     52        # SYSCALL instruction.
     53        #
     54        movq %rcx, %r10
    3755        syscall
    3856        ret
    39        
    40 .end __syscall
     57
Note: See TracChangeset for help on using the changeset viewer.