From owner-svn-src-all@FreeBSD.ORG Sat Aug 4 05:31:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BCBD21065670; Sat, 4 Aug 2012 05:31:26 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7E338FC1B; Sat, 4 Aug 2012 05:31:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q745VQp0014096; Sat, 4 Aug 2012 05:31:26 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q745VQPT014094; Sat, 4 Aug 2012 05:31:26 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201208040531.q745VQPT014094@svn.freebsd.org> From: Andrew Turner Date: Sat, 4 Aug 2012 05:31:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239032 - head/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Aug 2012 05:31:26 -0000 Author: andrew Date: Sat Aug 4 05:31:26 2012 New Revision: 239032 URL: http://svn.freebsd.org/changeset/base/239032 Log: Ensure we align the stack to 8 bytes in system calls. This is not strictly required with the current ABI but will be when we switch to the ARM EABI. The aapcs requires the stack to be 4 byte aligned at all times and 8 byte aligned when calling a public subroutine where the current ABI only requires sp to be a multiple of 4. Modified: head/sys/arm/arm/exception.S Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Sat Aug 4 05:30:20 2012 (r239031) +++ head/sys/arm/arm/exception.S Sat Aug 4 05:31:26 2012 (r239032) @@ -80,7 +80,10 @@ ASENTRY_NP(swi_entry) PUSHFRAME mov r0, sp /* Pass the frame to any function */ + mov r6, sp /* Backup the stack pointer */ + bic sp, sp, #7 /* Align the stack pointer */ bl _C_LABEL(swi_handler) /* It's a SWI ! */ + mov sp, r6 /* Restore the stack */ DO_AST PULLFRAME