All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] why bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
Date: Sun, 17 Feb 2013 15:04:25 +0100 (CET)	[thread overview]
Message-ID: <658576869.1527675.1361109865699.JavaMail.root@advansee.com> (raw)
In-Reply-To: <1361095150115-147472.post@n7.nabble.com>

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

      parent reply	other threads:[~2013-02-17 14:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-17  9:59 [U-Boot] why bic sp, sp, #7 /* 8-byte alignment for ABI compliance */ janpharm
2013-02-17 11:30 ` [U-Boot] u-boot recovery mode TigerLiu at viatech.com.cn
2013-02-17 14:34   ` Albert ARIBAUD
2013-02-18  1:44     ` TigerLiu at viatech.com.cn
2013-02-18  7:42       ` Albert ARIBAUD
2013-02-17 14:04 ` Benoît Thébaudeau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=658576869.1527675.1361109865699.JavaMail.root@advansee.com \
    --to=benoit.thebaudeau@advansee.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.