Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/cloudabi64/cloudabi64_sysvec.c
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | cloudabi64_fetch_syscall_args(struct thread *td) | ||||
struct trapframe *frame; | struct trapframe *frame; | ||||
struct syscall_args *sa; | struct syscall_args *sa; | ||||
frame = td->td_frame; | frame = td->td_frame; | ||||
sa = &td->td_sa; | sa = &td->td_sa; | ||||
/* Obtain system call number. */ | /* Obtain system call number. */ | ||||
sa->code = frame->tf_rax; | sa->code = frame->tf_rax; | ||||
sa->original_code = sa->code; | |||||
if (sa->code >= CLOUDABI64_SYS_MAXSYSCALL) | if (sa->code >= CLOUDABI64_SYS_MAXSYSCALL) | ||||
return (ENOSYS); | return (ENOSYS); | ||||
sa->callp = &cloudabi64_sysent[sa->code]; | sa->callp = &cloudabi64_sysent[sa->code]; | ||||
/* Fetch system call arguments. */ | /* Fetch system call arguments. */ | ||||
sa->args[0] = frame->tf_rdi; | sa->args[0] = frame->tf_rdi; | ||||
sa->args[1] = frame->tf_rsi; | sa->args[1] = frame->tf_rsi; | ||||
sa->args[2] = frame->tf_rdx; | sa->args[2] = frame->tf_rdx; | ||||
▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines |