Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/arch/amd64/amd64 Pull up following revision(s) (reque...



details:   https://anonhg.NetBSD.org/src/rev/04f598363754
branches:  netbsd-8
changeset: 434952:04f598363754
user:      martin <martin%NetBSD.org@localhost>
date:      Sat May 05 15:00:29 2018 +0000

description:
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.

diffstat:

 sys/arch/amd64/amd64/locore.S |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r a5871c3e857f -r 04f598363754 sys/arch/amd64/amd64/locore.S
--- a/sys/arch/amd64/amd64/locore.S     Fri May 04 16:26:29 2018 +0000
+++ b/sys/arch/amd64/amd64/locore.S     Sat May 05 15:00:29 2018 +0000
@@ -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 @@
 
        /* 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 @@
 
        /* 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 @@
        .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_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)



Home | Main Index | Thread Index | Old Index