From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?= Date: Sun, 17 Feb 2013 15:04:25 +0100 (CET) Subject: [U-Boot] why bic sp, sp, #7 /* 8-byte alignment for ABI compliance */ In-Reply-To: <1361095150115-147472.post@n7.nabble.com> References: <1361095150115-147472.post@n7.nabble.com> Message-ID: <658576869.1527675.1361109865699.JavaMail.root@advansee.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On Sunday, February 17, 2013 10:59:10 AM, janpharm wrote: > Hi All, > > After searching via google,I still can not find the hint for > > I understand the function of bic command, http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf Simple bit clear with bit-mask. > but did not understand : > > why "bic sp, sp, #7" can be implied for "8-byte alignment for ABI > compliance" ? http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf 5.2.1.2. SP has to be double-word (64-bit, 8-byte) aligned, so since this is an expand-down stack, its lower 3 bits have to be cleared in order to make it a multiple of 8. > can someone offer some example? http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=arch/arm/lib/crt0.S;h=4f60958b1dbf1782863cebd7ffe884733a452b26;hb=HEAD#l110 Best regards, Beno?t