Module Name: src Committed By: kamil Date: Sun Nov 27 02:32:56 UTC 2016
Modified Files: src/sys/arch/amd64/amd64: cpufunc.S Log Message: Fix rdr6() function on amd64 According to the AMD64 SysV ABI the first returned value is passed in RAX, not in RDI. Actually RDI is used for the first argument passed to a function. So far this function was dead code, it will be used for a ptrace(2) feature to support CPU watchpoints. The rdr6() function reads state of the DR6 register and returns its value. Sponsored by <The NetBSD Foundation> To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/amd64/amd64/cpufunc.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/cpufunc.S diff -u src/sys/arch/amd64/amd64/cpufunc.S:1.25 src/sys/arch/amd64/amd64/cpufunc.S:1.26 --- src/sys/arch/amd64/amd64/cpufunc.S:1.25 Wed Feb 12 23:24:09 2014 +++ src/sys/arch/amd64/amd64/cpufunc.S Sun Nov 27 02:32:56 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.S,v 1.25 2014/02/12 23:24:09 dsl Exp $ */ +/* $NetBSD: cpufunc.S,v 1.26 2016/11/27 02:32:56 kamil Exp $ */ /*- * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. @@ -163,7 +163,7 @@ ENTRY(ldr6) ret ENTRY(rdr6) - movq %dr6, %rdi + movq %dr6, %rax ret ENTRY(x86_disable_intr)