Lines Matching refs:ecx
75 movl S_ARG0,%ecx /* get thread */
76 movl TH_KERNEL_STACK(%ecx),%ecx /* get kernel stack */
77 lea -IKS_SIZE(%ecx),%edx
79 movl %ecx,%gs:CPU_ACTIVE_STACK /* store stack address */
101 movl %gs:CPU_KERNEL_STACK,%ecx /* get old kernel stack top */
102 movl %ebx,KSS_EBX(%ecx) /* save registers */
103 movl %ebp,KSS_EBP(%ecx)
104 movl %edi,KSS_EDI(%ecx)
105 movl %esi,KSS_ESI(%ecx)
106 movl %eax,KSS_EIP(%ecx) /* save return PC */
107 movl %esp,KSS_ESP(%ecx) /* save SP */
110 movl 8(%esp),%ecx /* get new thread */
111 movl %ecx,%gs:CPU_ACTIVE_THREAD /* new thread is active */
112 movl TH_KERNEL_STACK(%ecx),%ebx /* get its kernel stack */
113 lea -IKS_SIZE(%ebx),%ecx
114 add EXT(kernel_stack_size),%ecx
118 movl %ecx,%gs:CPU_KERNEL_STACK /* set stack top */
121 movl KSS_ESP(%ecx),%esp /* switch stacks */
122 movl KSS_ESI(%ecx),%esi /* restore registers */
123 movl KSS_EDI(%ecx),%edi
124 movl KSS_EBP(%ecx),%ebp
125 movl KSS_EBX(%ecx),%ebx
126 jmp *KSS_EIP(%ecx) /* return old thread */
146 movl %gs:CPU_KERNEL_STACK,%ecx /* get old kernel stack */
147 movl %ebx,KSS_EBX(%ecx) /* save registers */
148 movl %ebp,KSS_EBP(%ecx)
149 movl %edi,KSS_EDI(%ecx)
150 movl %esi,KSS_ESI(%ecx)
151 popl KSS_EIP(%ecx) /* save return PC */
152 movl %esp,KSS_ESP(%ecx) /* save SP */
154 movl %gs:CPU_ACTIVE_STACK,%ecx /* get old stack */
156 movl %ecx,TH_KERNEL_STACK(%eax) /* save old stack */