Changeset 296426ad in mainline for uspace/lib/libc/arch/amd64/src/syscall.S
- Timestamp:
- 2007-11-16T16:17:18Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9c2fb97
- Parents:
- e686744c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/arch/amd64/src/syscall.S
re686744c r296426ad 29 29 .text 30 30 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 32 49 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 37 55 syscall 38 56 ret 39 40 .end __syscall 57
Note:
See TracChangeset
for help on using the changeset viewer.