cpu_switch.S (10b3b54548f2290bbe8d8f88c59c28d12b7a635d) cpu_switch.S (6cf9a08d2c338e25f0be42326e6880f089156562)
1/*-
2 * Copyright (c) 2003 Peter Wemm.
3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * William Jolitz.
8 *

--- 102 unchanged lines hidden (view full) ---

111
112 testl $PCB_DBREGS,PCB_FLAGS(%r8)
113 jnz store_dr /* static predict not taken */
114done_store_dr:
115
116 /* have we used fp, and need a save? */
117 cmpq %rdi,PCPU(FPCURTHREAD)
118 jne 1f
1/*-
2 * Copyright (c) 2003 Peter Wemm.
3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * William Jolitz.
8 *

--- 102 unchanged lines hidden (view full) ---

111
112 testl $PCB_DBREGS,PCB_FLAGS(%r8)
113 jnz store_dr /* static predict not taken */
114done_store_dr:
115
116 /* have we used fp, and need a save? */
117 cmpq %rdi,PCPU(FPCURTHREAD)
118 jne 1f
119 addq $PCB_SAVEFPU,%r8
119 movq PCB_SAVEFPU(%r8),%r8
120 clts
121 fxsave (%r8)
122 smsw %ax
123 orb $CR0_TS,%al
124 lmsw %ax
125 xorl %eax,%eax
126 movq %rax,PCPU(FPCURTHREAD)
1271:

--- 208 unchanged lines hidden (view full) ---

336 */
337 pushfq
338 cli
339 movq PCPU(FPCURTHREAD),%rax
340 testq %rax,%rax
341 je 1f
342
343 movq TD_PCB(%rax),%rdi
120 clts
121 fxsave (%r8)
122 smsw %ax
123 orb $CR0_TS,%al
124 lmsw %ax
125 xorl %eax,%eax
126 movq %rax,PCPU(FPCURTHREAD)
1271:

--- 208 unchanged lines hidden (view full) ---

336 */
337 pushfq
338 cli
339 movq PCPU(FPCURTHREAD),%rax
340 testq %rax,%rax
341 je 1f
342
343 movq TD_PCB(%rax),%rdi
344 leaq PCB_SAVEFPU(%rdi),%rdi
344 movq PCB_SAVEFPU(%rdi),%rdi
345 clts
346 fxsave (%rdi)
347 smsw %ax
348 orb $CR0_TS,%al
349 lmsw %ax
350
351 movq $PCB_SAVEFPU_SIZE,%rdx /* arg 3 */
345 clts
346 fxsave (%rdi)
347 smsw %ax
348 orb $CR0_TS,%al
349 lmsw %ax
350
351 movq $PCB_SAVEFPU_SIZE,%rdx /* arg 3 */
352 leaq PCB_SAVEFPU(%rcx),%rsi /* arg 2 */
352 movq PCB_SAVEFPU(%rcx),%rsi /* arg 2 */
353 /* arg 1 (%rdi) already loaded */
354 call bcopy
3551:
356 popfq
357
358 ret
359END(savectx)
360

--- 64 unchanged lines hidden ---
353 /* arg 1 (%rdi) already loaded */
354 call bcopy
3551:
356 popfq
357
358 ret
359END(savectx)
360

--- 64 unchanged lines hidden ---