Date: Fri, 24 Jan 2014 20:51:56 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261137 - head/sys/arm/include Message-ID: <201401242051.s0OKpun0020340@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Fri Jan 24 20:51:56 2014 New Revision: 261137 URL: http://svnweb.freebsd.org/changeset/base/261137 Log: Correct the alignment of sp through functions that use UNWINDSVCFRAME. We were incorrectly adding the trap frame padding to the stack pointer after reading it's value and unaligning it. Modified: head/sys/arm/include/asmacros.h Modified: head/sys/arm/include/asmacros.h ============================================================================== --- head/sys/arm/include/asmacros.h Fri Jan 24 20:26:00 2014 (r261136) +++ head/sys/arm/include/asmacros.h Fri Jan 24 20:51:56 2014 (r261137) @@ -216,8 +216,13 @@ ldmia sp, {sp, lr, pc}^ /* Restore lr and exit */ #endif #if defined(__ARM_EABI__) +/* + * Unwind hints so we can unwind past functions that use + * PULLFRAMEFROMSVCANDEXIT. They are run in reverse order. + * As the last thing we do is restore the stack pointer + * we can ignore the padding at the end of struct trapframe. + */ #define UNWINDSVCFRAME \ - .pad #(4); /* Skip stack alignment */ \ .save {r13-r15}; /* Restore sp, lr, pc */ \ .pad #(2*4); /* Skip user sp and lr */ \ .save {r0-r12}; /* Restore r0-r12 */ \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401242051.s0OKpun0020340>