16#ifndef ZEPHYR_INCLUDE_ARCH_X86_INTEL64_SYSCALL_H_
17#define ZEPHYR_INCLUDE_ARCH_X86_INTEL64_SYSCALL_H_
19#ifdef CONFIG_USERSPACE
55 register uintptr_t rax __asm__(
"%rax") = call_id;
56 register uintptr_t rdi __asm__(
"%rdi") = arg1;
57 register uintptr_t rsi __asm__(
"%rsi") = arg2;
58 register uintptr_t rdx __asm__(
"%rdx") = arg3;
59 register uintptr_t r10 __asm__(
"%r10") = arg4;
60 register uintptr_t r8 __asm__(
"%r8") = arg5;
61 register uintptr_t r9 __asm__(
"%r9") = arg6;
63 __asm__
volatile(
"syscall\n\t"
65 :
"r" (rax),
"r" (rdi),
"r" (rsi),
"r" (rdx),
66 "r" (r10),
"r" (r8),
"r" (r9)
67 :
"memory",
"rcx",
"r11");
77 register uintptr_t rax __asm__(
"%rax") = call_id;
78 register uintptr_t rdi __asm__(
"%rdi") = arg1;
79 register uintptr_t rsi __asm__(
"%rsi") = arg2;
80 register uintptr_t rdx __asm__(
"%rdx") = arg3;
81 register uintptr_t r10 __asm__(
"%r10") = arg4;
82 register uintptr_t r8 __asm__(
"%r8") = arg5;
84 __asm__
volatile(
"syscall\n\t"
86 :
"r" (rax),
"r" (rdi),
"r" (rsi),
"r" (rdx),
88 :
"memory",
"rcx",
"r11");
97 register uintptr_t rax __asm__(
"%rax") = call_id;
98 register uintptr_t rdi __asm__(
"%rdi") = arg1;
99 register uintptr_t rsi __asm__(
"%rsi") = arg2;
100 register uintptr_t rdx __asm__(
"%rdx") = arg3;
101 register uintptr_t r10 __asm__(
"%r10") = arg4;
103 __asm__
volatile(
"syscall\n\t"
105 :
"r" (rax),
"r" (rdi),
"r" (rsi),
"r" (rdx),
107 :
"memory",
"rcx",
"r11");
116 register uintptr_t rax __asm__(
"%rax") = call_id;
117 register uintptr_t rdi __asm__(
"%rdi") = arg1;
118 register uintptr_t rsi __asm__(
"%rsi") = arg2;
119 register uintptr_t rdx __asm__(
"%rdx") = arg3;
121 __asm__
volatile(
"syscall\n\t"
123 :
"r" (rax),
"r" (rdi),
"r" (rsi),
"r" (rdx)
124 :
"memory",
"rcx",
"r11");
133 register uintptr_t rax __asm__(
"%rax") = call_id;
134 register uintptr_t rdi __asm__(
"%rdi") = arg1;
135 register uintptr_t rsi __asm__(
"%rsi") = arg2;
137 __asm__
volatile(
"syscall\n\t"
139 :
"r" (rax),
"r" (rdi),
"r" (rsi)
140 :
"memory",
"rcx",
"r11");
148 register uintptr_t rax __asm__(
"%rax") = call_id;
149 register uintptr_t rdi __asm__(
"%rdi") = arg1;
151 __asm__
volatile(
"syscall\n\t"
153 :
"r" (rax),
"r" (rdi)
154 :
"memory",
"rcx",
"r11");
161 register uintptr_t rax __asm__(
"%rax") = call_id;
163 __asm__
volatile(
"syscall\n\t"
166 :
"memory",
"rcx",
"r11");
175 __asm__
volatile (
"mov %%cs, %[cs_val]" : [cs_val]
"=r" (cs));
177 return (cs & 0x3) != 0;
static uintptr_t arch_syscall_invoke4(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t call_id)
Definition: syscall.h:93
static uintptr_t arch_syscall_invoke2(uintptr_t arg1, uintptr_t arg2, uintptr_t call_id)
Definition: syscall.h:129
static uintptr_t arch_syscall_invoke1(uintptr_t arg1, uintptr_t call_id)
Definition: syscall.h:145
static uintptr_t arch_syscall_invoke0(uintptr_t call_id)
Definition: syscall.h:159
static bool arch_is_user_context(void)
Definition: syscall.h:171
static uintptr_t arch_syscall_invoke5(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5, uintptr_t call_id)
Definition: syscall.h:72
static uintptr_t arch_syscall_invoke3(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t call_id)
Definition: syscall.h:112
static uintptr_t arch_syscall_invoke6(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5, uintptr_t arg6, uintptr_t call_id)
Definition: syscall.h:50
__UINTPTR_TYPE__ uintptr_t
Definition: stdint.h:75