Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/target/arm implement md_get_pc and md_set_pc
details: https://anonhg.NetBSD.org/src/rev/b4ab3db290b8
branches: trunk
changeset: 791273:b4ab3db290b8
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Nov 11 13:52:04 2013 +0000
description:
implement md_get_pc and md_set_pc
diffstat:
sys/arch/usermode/target/arm/cpu_arm.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (38 lines):
diff -r dd06e632f2e1 -r b4ab3db290b8 sys/arch/usermode/target/arm/cpu_arm.c
--- a/sys/arch/usermode/target/arm/cpu_arm.c Mon Nov 11 11:10:45 2013 +0000
+++ b/sys/arch/usermode/target/arm/cpu_arm.c Mon Nov 11 13:52:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_arm.c,v 1.1 2013/11/10 20:03:46 jmcneill Exp $ */
+/* $NetBSD: cpu_arm.c,v 1.2 2013/11/11 13:52:04 jmcneill Exp $ */
/*-
* Copyright (c) 2011 Reinoud Zandijk <reinoud%netbsd.org@localhost>
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_arm.c,v 1.1 2013/11/10 20:03:46 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_arm.c,v 1.2 2013/11/11 13:52:04 jmcneill Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -99,15 +99,15 @@
register_t
md_get_pc(ucontext_t *ucp)
{
- panic("md_get_pc not implemented");
- return 0;
+ unsigned int *reg = (unsigned int *)&ucp->uc_mcontext;
+ return reg[15];
}
register_t
md_get_sp(ucontext_t *ucp)
{
- panic("md_get_sp not implemented");
- return 0;
+ unsigned int *reg = (unsigned int *)&ucp->uc_mcontext;
+ return reg[13];
}
int
Home |
Main Index |
Thread Index |
Old Index