Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Dec 2018 04:53:09 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341719 - head/sys/amd64/amd64
Message-ID:  <201812080453.wB84r9tO060253@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Sat Dec  8 04:53:08 2018
New Revision: 341719
URL: https://svnweb.freebsd.org/changeset/base/341719

Log:
  amd64: stop re-reading curpc on subyte/suword
  
  Originally read value is still safely kept. Re-reading code was there
  for previous iterations which were partially shared with i386.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/amd64/amd64/support.S

Modified: head/sys/amd64/amd64/support.S
==============================================================================
--- head/sys/amd64/amd64/support.S	Sat Dec  8 00:48:10 2018	(r341718)
+++ head/sys/amd64/amd64/support.S	Sat Dec  8 04:53:08 2018	(r341719)
@@ -1155,7 +1155,6 @@ ENTRY(suword16_nosmap)
 
 	movw	%si,(%rdi)
 	xorl	%eax,%eax
-	movq	PCPU(CURPCB),%rcx		/* restore trashed register */
 	movq	%rax,PCB_ONFAULT(%rcx)
 	POP_FRAME_POINTER
 	ret
@@ -1174,7 +1173,6 @@ ENTRY(suword16_smap)
 	movw	%si,(%rdi)
 	clac
 	xorl	%eax,%eax
-	movq	PCPU(CURPCB),%rcx		/* restore trashed register */
 	movq	%rax,PCB_ONFAULT(%rcx)
 	POP_FRAME_POINTER
 	ret
@@ -1192,7 +1190,6 @@ ENTRY(subyte_nosmap)
 	movl	%esi,%eax
 	movb	%al,(%rdi)
 	xorl	%eax,%eax
-	movq	PCPU(CURPCB),%rcx		/* restore trashed register */
 	movq	%rax,PCB_ONFAULT(%rcx)
 	POP_FRAME_POINTER
 	ret
@@ -1212,7 +1209,6 @@ ENTRY(subyte_smap)
 	movb	%al,(%rdi)
 	clac
 	xorl	%eax,%eax
-	movq	PCPU(CURPCB),%rcx		/* restore trashed register */
 	movq	%rax,PCB_ONFAULT(%rcx)
 	POP_FRAME_POINTER
 	ret



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