Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amd64/amd64 Fix rdr6() function on amd64
details: https://anonhg.NetBSD.org/src/rev/ebb963439497
branches: trunk
changeset: 349178:ebb963439497
user: kamil <kamil%NetBSD.org@localhost>
date: Sun Nov 27 02:32:56 2016 +0000
description:
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>
diffstat:
sys/arch/amd64/amd64/cpufunc.S | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r d6373d85d54c -r ebb963439497 sys/arch/amd64/amd64/cpufunc.S
--- a/sys/arch/amd64/amd64/cpufunc.S Sun Nov 27 00:21:43 2016 +0000
+++ b/sys/arch/amd64/amd64/cpufunc.S Sun Nov 27 02:32:56 2016 +0000
@@ -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 @@
ret
ENTRY(rdr6)
- movq %dr6, %rdi
+ movq %dr6, %rax
ret
ENTRY(x86_disable_intr)
Home |
Main Index |
Thread Index |
Old Index