Module Name: src Committed By: maxv Date: Wed Aug 23 08:04:22 UTC 2017
Modified Files: src/sys/arch/amd64/amd64: copy.S Log Message: Fix a bug in ucas_32 and ucas_64. There is a branch where they don't initialize %rax. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amd64/amd64/copy.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/copy.S diff -u src/sys/arch/amd64/amd64/copy.S:1.20 src/sys/arch/amd64/amd64/copy.S:1.21 --- src/sys/arch/amd64/amd64/copy.S:1.20 Wed Dec 9 16:55:18 2015 +++ src/sys/arch/amd64/amd64/copy.S Wed Aug 23 08:04:22 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.20 2015/12/09 16:55:18 maxv Exp $ */ +/* $NetBSD: copy.S,v 1.21 2017/08/23 08:04:22 maxv Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -446,7 +446,7 @@ ENTRY(ucas_64) /* Fail if kernel-space */ movq $VM_MAXUSER_ADDRESS-8, %r8 cmpq %r8, %rdi - ja _C_LABEL(ucas_fault) + ja _C_LABEL(ucas_efault) movq %rsi, %rax .Lucas64_start: /* Perform the CAS */ @@ -470,7 +470,7 @@ ENTRY(ucas_32) /* Fail if kernel-space */ movq $VM_MAXUSER_ADDRESS-4, %r8 cmpq %r8, %rdi - ja _C_LABEL(ucas_fault) + ja _C_LABEL(ucas_efault) movl %esi, %eax .Lucas32_start: /* Perform the CAS */ @@ -486,10 +486,9 @@ ENTRY(ucas_32) ret DEFERRED_SWITCH_CALL -/* - * Fault handler for ucas_*(). - * Just return the error set by trap(). - */ +ENTRY(ucas_efault) + movq $EFAULT,%rax + NENTRY(ucas_fault) ret