Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 2003 17:00:05 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 29653 for review
Message-ID:  <200304250000.h3P0059O078806@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=29653

Change 29653 by peter@peter_daintree on 2003/04/24 16:59:32

	maybe savectx will work, if we ever get to dumpsys() stage.
	At least, it isn't guaranteed to explode at this point.

Affected files ...

.. //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#20 edit

Differences ...

==== //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#20 (text+ko) ====

@@ -240,9 +240,9 @@
  */
 ENTRY(savectx)
 	/* Fetch PCB. */
-	movq	8(%rsp),%rcx
+	movq	%rdi,%rcx
 
-	/* Save caller's return address.  Child won't execute this routine. */
+	/* Save caller's return address. */
 	movq	(%rsp),%rax
 	movq	%rax,PCB_RIP(%rcx)
 
@@ -278,21 +278,17 @@
 	je	1f
 
 	pushq	%rcx
-	movq	TD_PCB(%rax),%rax
-	leaq	PCB_SAVEFPU(%rax),%rax
 	pushq	%rax
-	pushq	%rax
+	movq	TD_PCB(%rax),%rdi
+	leaq	PCB_SAVEFPU(%rdi),%rdi
 	call	npxsave
-	addq	$8,%rsp
 	popq	%rax
 	popq	%rcx
 
-	pushq	$PCB_SAVEFPU_SIZE
-	leaq	PCB_SAVEFPU(%rcx),%rcx
-	pushq	%rcx
-	pushq	%rax
+	movq	$PCB_SAVEFPU_SIZE,%rdx	/* arg 3 */
+	leaq	PCB_SAVEFPU(%rcx),%rsi	/* arg 2 */
+	movq	%rax,%rdi		/* arg 1 */
 	call	bcopy
-	addq	$24,%rsp
 1:
 	popfq
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304250000.h3P0059O078806>