PERFORCE change 28525 for review
Peter Wemm
peter at FreeBSD.org
Tue Apr 8 09:46:38 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=28525
Change 28525 by peter at peter_daintree on 2003/04/08 09:45:53
update cpu_switch for C calling conventions. save/restore
%rdi/%rsi around call to npxsave, and pass npxsave arg in %rdi.
Affected files ...
.. //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#16 edit
Differences ...
==== //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#16 (text+ko) ====
@@ -109,10 +109,13 @@
/* have we used fp, and need a save? */
cmpq %rdi,PCPU(FPCURTHREAD)
jne 1f
+ pushq %rdi
+ pushq %rsi
addq $PCB_SAVEFPU,%rdx /* h/w bugs make saving complicated */
- pushq %rdx
+ movq %rdx, %rdi
call npxsave /* do it in a big C function */
- popq %rax
+ popq %rsi
+ popq %rdi
1:
/* Save is done. Now fire up new thread. Leave old vmspace. */
More information about the p4-projects
mailing list