Module Name:    src
Committed By:   martin
Date:           Sat May  5 15:00:29 UTC 2018

Modified Files:
        src/sys/arch/amd64/amd64 [netbsd-8]: locore.S

Log Message:
Pull up following revision(s) (requested by maxv in ticket #786):

        sys/arch/amd64/amd64/locore.S: revision 1.164,1.165

Adjust Xsyscall_svs to not use movq for 64bit immediates either.

Do not use movq for loading arbitrary 64bit immediates. The ISA
restricts it to 32bit immediates.


To generate a diff of this commit:
cvs rdiff -u -r1.123.6.5 -r1.123.6.6 src/sys/arch/amd64/amd64/locore.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/amd64/locore.S
diff -u src/sys/arch/amd64/amd64/locore.S:1.123.6.5 src/sys/arch/amd64/amd64/locore.S:1.123.6.6
--- src/sys/arch/amd64/amd64/locore.S:1.123.6.5	Thu Mar 22 16:59:03 2018
+++ src/sys/arch/amd64/amd64/locore.S	Sat May  5 15:00:29 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.123.6.5 2018/03/22 16:59:03 martin Exp $	*/
+/*	$NetBSD: locore.S,v 1.123.6.6 2018/05/05 15:00:29 martin Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -1368,8 +1368,8 @@ IDTVEC(\name)
 
 	/* Get the LWP's kernel stack pointer in %rax */
 	.if	\is_svs
-		movq	%rax,SVS_UTLS+UTLS_SCRATCH
-		movq	SVS_UTLS+UTLS_RSP0,%rax
+		movabs	%rax,SVS_UTLS+UTLS_SCRATCH
+		movabs	SVS_UTLS+UTLS_RSP0,%rax
 	.else
 		movq	%rax,CPUVAR(SCRATCH)
 		movq	CPUVAR(CURLWP),%rax
@@ -1387,7 +1387,7 @@ IDTVEC(\name)
 
 	/* Restore %rax */
 	.if	\is_svs
-		movq	SVS_UTLS+UTLS_SCRATCH,%rax
+		movabs	SVS_UTLS+UTLS_SCRATCH,%rax
 	.else
 		movq	CPUVAR(SCRATCH),%rax
 	.endif
@@ -1579,7 +1579,7 @@ END(intrfastexit)
 	.globl	nosvs_leave_altstack, nosvs_leave_altstack_end
 
 LABEL(svs_enter)
-	movq	SVS_UTLS+UTLS_KPDIRPA,%rax
+	movabs	SVS_UTLS+UTLS_KPDIRPA,%rax
 	movq	%rax,%cr3
 	movq	CPUVAR(KRSP0),%rsp
 LABEL(svs_enter_end)
@@ -1587,7 +1587,7 @@ LABEL(svs_enter_end)
 LABEL(svs_enter_altstack)
 	testb	$SEL_UPL,TF_CS(%rsp)
 	jz	1234f
-	movq	SVS_UTLS+UTLS_KPDIRPA,%rax
+	movabs	SVS_UTLS+UTLS_KPDIRPA,%rax
 	movq	%rax,%cr3
 1234:
 LABEL(svs_enter_altstack_end)

Reply via email to