source: mainline/uspace/lib/c/arch/amd64/src/syscall.S@ cb7be8f

Last change on this file since cb7be8f was cb7be8f, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago

Update headers in .S files that incorrectly use #-style comments

  • Property mode set to 100644
File size: 673 bytes
Line 
1/*
2 * SPDX-FileCopyrightText: 2006 Ondrej Palkovsky
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <abi/asmtool.h>
8
9.text
10
11## Make a system call.
12#
13# @param rdi First argument.
14# @param rsi Second argument.
15# @param rdx Third argument.
16# @param rcx Fourth argument.
17# @param r8 Fifth argument.
18# @param r9 Sixth argument.
19# @param 8(%rsp) Syscall number.
20#
21# @return The return value will be stored in RAX.
22#
23FUNCTION_BEGIN(__syscall)
24 #
25 # Move the syscall number into RAX.
26 movslq 8(%rsp), %rax
27
28 #
29 # Save RCX, the 4th argument, aside because RCX gets rewritten by the
30 # SYSCALL instruction.
31 #
32 movq %rcx, %r10
33 syscall
34 ret
35FUNCTION_END(__syscall)
36
Note: See TracBrowser for help on using the repository browser.