Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/include/arm32 Add code to make sure the trapfra...
details: https://anonhg.NetBSD.org/src/rev/f0c12330d38f
branches: trunk
changeset: 780623:f0c12330d38f
user: matt <matt%NetBSD.org@localhost>
date: Tue Jul 31 15:47:58 2012 +0000
description:
Add code to make sure the trapframe is aligned to a doubleword boundary.
diffstat:
sys/arch/arm/include/arm32/frame.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r f2c238ffd5f5 -r f0c12330d38f sys/arch/arm/include/arm32/frame.h
--- a/sys/arch/arm/include/arm32/frame.h Tue Jul 31 14:23:33 2012 +0000
+++ b/sys/arch/arm/include/arm32/frame.h Tue Jul 31 15:47:58 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: frame.h,v 1.26 2012/07/31 08:01:30 matt Exp $ */
+/* $NetBSD: frame.h,v 1.27 2012/07/31 15:47:58 matt Exp $ */
/*
* Copyright (c) 1994-1997 Mark Brinicombe.
@@ -372,6 +372,8 @@
mrs r3, spsr; /* Save xxx32 spsr */ \
SET_CPSR_MODE(r2, PSR_SVC32_MODE); \
mov r2, sp; /* Save SVC sp */ \
+ tst sp, #4; /* check for alignment */ \
+ subne sp, sp, #4; /* adjust if not aligned */ \
str r0, [sp, #-4]!; /* Push return address */ \
str lr, [sp, #-4]!; /* Push SVC lr */ \
str r2, [sp, #-4]!; /* Push SVC sp */ \
Home |
Main Index |
Thread Index |
Old Index