Lines Matching refs:out

50 void x86_fill_in_gregs_from_syscall(zx_thread_state_general_regs_t* out,  in x86_fill_in_gregs_from_syscall()  argument
52 memcpy(out, in, sizeof(*in)); in x86_fill_in_gregs_from_syscall()
55 void x86_fill_in_syscall_from_gregs(x86_syscall_general_regs_t* out, in x86_fill_in_syscall_from_gregs() argument
59 const uint64_t orig_rflags = out->rflags; in x86_fill_in_syscall_from_gregs()
60 memcpy(out, in, sizeof(*in)); in x86_fill_in_syscall_from_gregs()
61 out->rflags = orig_rflags & ~X86_FLAGS_USER; in x86_fill_in_syscall_from_gregs()
62 out->rflags |= in->rflags & X86_FLAGS_USER; in x86_fill_in_syscall_from_gregs()
65 #define COPY_REG(out, in, reg) (out)->reg = (in)->reg argument
66 #define COPY_COMMON_IFRAME_REGS(out, in) \ argument
68 COPY_REG(out, in, rax); \
69 COPY_REG(out, in, rbx); \
70 COPY_REG(out, in, rcx); \
71 COPY_REG(out, in, rdx); \
72 COPY_REG(out, in, rsi); \
73 COPY_REG(out, in, rdi); \
74 COPY_REG(out, in, rbp); \
75 COPY_REG(out, in, r8); \
76 COPY_REG(out, in, r9); \
77 COPY_REG(out, in, r10); \
78 COPY_REG(out, in, r11); \
79 COPY_REG(out, in, r12); \
80 COPY_REG(out, in, r13); \
81 COPY_REG(out, in, r14); \
82 COPY_REG(out, in, r15); \
85 void x86_fill_in_gregs_from_iframe(zx_thread_state_general_regs_t* out, in x86_fill_in_gregs_from_iframe() argument
87 COPY_COMMON_IFRAME_REGS(out, in); in x86_fill_in_gregs_from_iframe()
88 out->rsp = in->user_sp; in x86_fill_in_gregs_from_iframe()
89 out->rip = in->ip; in x86_fill_in_gregs_from_iframe()
90 out->rflags = in->flags; in x86_fill_in_gregs_from_iframe()
93 void x86_fill_in_iframe_from_gregs(x86_iframe_t* out, in x86_fill_in_iframe_from_gregs() argument
95 COPY_COMMON_IFRAME_REGS(out, in); in x86_fill_in_iframe_from_gregs()
96 out->user_sp = in->rsp; in x86_fill_in_iframe_from_gregs()
97 out->ip = in->rip; in x86_fill_in_iframe_from_gregs()
100 out->flags &= ~X86_FLAGS_USER; in x86_fill_in_iframe_from_gregs()
101 out->flags |= in->rflags & X86_FLAGS_USER; in x86_fill_in_iframe_from_gregs()
203 zx_status_t arch_get_general_regs(struct thread* thread, zx_thread_state_general_regs_t* out) { in arch_get_general_regs() argument
214 x86_fill_in_gregs_from_syscall(out, thread->arch.suspended_general_regs.syscall); in arch_get_general_regs()
217 x86_fill_in_gregs_from_iframe(out, thread->arch.suspended_general_regs.iframe); in arch_get_general_regs()
315 zx_status_t arch_get_fp_regs(struct thread* thread, zx_thread_state_fp_regs* out) { in arch_get_fp_regs() argument
317 memset(out, 0, sizeof(zx_thread_state_fp_regs)); in arch_get_fp_regs()
327 out->fcw = save->fcw; in arch_get_fp_regs()
328 out->fsw = save->fsw; in arch_get_fp_regs()
329 out->ftw = save->ftw; in arch_get_fp_regs()
330 out->fop = save->fop; in arch_get_fp_regs()
331 out->fip = save->fip; in arch_get_fp_regs()
332 out->fdp = save->fdp; in arch_get_fp_regs()
333 memcpy(&out->st[0], &save->st[0], sizeof(out->st)); in arch_get_fp_regs()
358 zx_status_t arch_get_vector_regs(struct thread* thread, zx_thread_state_vector_regs* out) { in arch_get_vector_regs() argument
359 return x86_get_set_vector_regs(thread, out, RegAccess::kGet); in arch_get_vector_regs()
378 zx_status_t arch_get_debug_regs(struct thread* thread, zx_thread_state_debug_regs* out) { in arch_get_debug_regs() argument
384 out->dr[0] = thread->arch.debug_state.dr[0]; in arch_get_debug_regs()
385 out->dr[1] = thread->arch.debug_state.dr[1]; in arch_get_debug_regs()
386 out->dr[2] = thread->arch.debug_state.dr[2]; in arch_get_debug_regs()
387 out->dr[3] = thread->arch.debug_state.dr[3]; in arch_get_debug_regs()
388 out->dr6 = thread->arch.debug_state.dr6; in arch_get_debug_regs()
389 out->dr7 = thread->arch.debug_state.dr7; in arch_get_debug_regs()
434 zx_status_t arch_get_x86_register_fs(struct thread* thread, uint64_t* out) { in arch_get_x86_register_fs() argument
437 *out = thread->arch.fs_base; in arch_get_x86_register_fs()
448 zx_status_t arch_get_x86_register_gs(struct thread* thread, uint64_t* out) { in arch_get_x86_register_gs() argument
451 *out = thread->arch.gs_base; in arch_get_x86_register_gs()