Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/arch/arm Don't hardcode offset in assembler. This e...



details:   https://anonhg.NetBSD.org/src/rev/d8439b343f9f
branches:  trunk
changeset: 786515:d8439b343f9f
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Apr 30 12:24:31 2013 +0000

description:
Don't hardcode offset in assembler. This ensures the return value in the
context is the correct value (0) on earm*

diffstat:

 lib/libc/arch/arm/genassym.cf |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 4ef15c9f461b -r d8439b343f9f lib/libc/arch/arm/genassym.cf
--- a/lib/libc/arch/arm/genassym.cf     Tue Apr 30 11:29:12 2013 +0000
+++ b/lib/libc/arch/arm/genassym.cf     Tue Apr 30 12:24:31 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.1 2012/09/27 11:20:20 skrll Exp $
+#      $NetBSD: genassym.cf,v 1.2 2013/04/30 12:24:31 skrll Exp $
 
 #
 # Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -32,5 +32,6 @@
 include <sys/types.h>
 include <ucontext.h>
 
+define _UC_REGS_R0     offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R0])
 define _UC_REGS_SP     offsetof(ucontext_t, uc_mcontext.__gregs[_REG_SP])
 define _UC_REGS_PC     offsetof(ucontext_t, uc_mcontext.__gregs[_REG_PC])



Home | Main Index | Thread Index | Old Index