Lines Matching defs:ts
143 get_thread_state32(thread_t thread, x86_thread_state32_t *ts);
146 get_thread_state64(thread_t thread, x86_thread_state64_t *ts);
149 set_thread_state32(thread_t thread, x86_thread_state32_t *ts);
152 set_thread_state64(thread_t thread, x86_thread_state64_t *ts);
617 set_thread_state32(thread_t thread, x86_thread_state32_t *ts)
628 ts->cs = USER_CS;
630 if (ts->ss == 0) ts->ss = USER_DS;
631 if (ts->ds == 0) ts->ds = USER_DS;
632 if (ts->es == 0) ts->es = USER_DS;
640 ts->ss = USER_DS;
641 ts->ds = USER_DS;
642 ts->es = USER_DS;
646 if (!valid_user_segment_selectors(ts->cs,
647 ts->ss,
648 ts->ds,
649 ts->es,
650 ts->fs,
651 ts->gs))
654 saved_state->eax = ts->eax;
655 saved_state->ebx = ts->ebx;
656 saved_state->ecx = ts->ecx;
657 saved_state->edx = ts->edx;
658 saved_state->edi = ts->edi;
659 saved_state->esi = ts->esi;
660 saved_state->ebp = ts->ebp;
661 saved_state->uesp = ts->esp;
662 saved_state->efl = (ts->eflags & ~EFL_USER_CLEAR) | EFL_USER_SET;
663 saved_state->eip = ts->eip;
664 saved_state->cs = ts->cs;
665 saved_state->ss = ts->ss;
666 saved_state->ds = ts->ds;
667 saved_state->es = ts->es;
668 saved_state->fs = ts->fs;
669 saved_state->gs = ts->gs;
683 set_thread_state64(thread_t thread, x86_thread_state64_t *ts)
691 if (!IS_USERADDR64_CANONICAL(ts->rsp) ||
692 !IS_USERADDR64_CANONICAL(ts->rip))
695 saved_state->r8 = ts->r8;
696 saved_state->r9 = ts->r9;
697 saved_state->r10 = ts->r10;
698 saved_state->r11 = ts->r11;
699 saved_state->r12 = ts->r12;
700 saved_state->r13 = ts->r13;
701 saved_state->r14 = ts->r14;
702 saved_state->r15 = ts->r15;
703 saved_state->rax = ts->rax;
704 saved_state->rbx = ts->rbx;
705 saved_state->rcx = ts->rcx;
706 saved_state->rdx = ts->rdx;
707 saved_state->rdi = ts->rdi;
708 saved_state->rsi = ts->rsi;
709 saved_state->rbp = ts->rbp;
710 saved_state->isf.rsp = ts->rsp;
711 saved_state->isf.rflags = (ts->rflags & ~EFL_USER_CLEAR) | EFL_USER_SET;
712 saved_state->isf.rip = ts->rip;
714 saved_state->fs = (uint32_t)ts->fs;
715 saved_state->gs = (uint32_t)ts->gs;
723 get_thread_state32(thread_t thread, x86_thread_state32_t *ts)
731 ts->eax = saved_state->eax;
732 ts->ebx = saved_state->ebx;
733 ts->ecx = saved_state->ecx;
734 ts->edx = saved_state->edx;
735 ts->edi = saved_state->edi;
736 ts->esi = saved_state->esi;
737 ts->ebp = saved_state->ebp;
738 ts->esp = saved_state->uesp;
739 ts->eflags = saved_state->efl;
740 ts->eip = saved_state->eip;
741 ts->cs = saved_state->cs;
742 ts->ss = saved_state->ss;
743 ts->ds = saved_state->ds;
744 ts->es = saved_state->es;
745 ts->fs = saved_state->fs;
746 ts->gs = saved_state->gs;
751 get_thread_state64(thread_t thread, x86_thread_state64_t *ts)
759 ts->r8 = saved_state->r8;
760 ts->r9 = saved_state->r9;
761 ts->r10 = saved_state->r10;
762 ts->r11 = saved_state->r11;
763 ts->r12 = saved_state->r12;
764 ts->r13 = saved_state->r13;
765 ts->r14 = saved_state->r14;
766 ts->r15 = saved_state->r15;
767 ts->rax = saved_state->rax;
768 ts->rbx = saved_state->rbx;
769 ts->rcx = saved_state->rcx;
770 ts->rdx = saved_state->rdx;
771 ts->rdi = saved_state->rdi;
772 ts->rsi = saved_state->rsi;
773 ts->rbp = saved_state->rbp;
774 ts->rsp = saved_state->isf.rsp;
775 ts->rflags = saved_state->isf.rflags;
776 ts->rip = saved_state->isf.rip;
777 ts->cs = saved_state->isf.cs;
778 ts->fs = saved_state->fs;
779 ts->gs = saved_state->gs;