From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] omap3evm: Clean-up EVM detection code.
Date: Thu, 02 Dec 2010 20:32:09 +0100 [thread overview]
Message-ID: <4CF7F439.3020102@free.fr> (raw)
In-Reply-To: <20101202185136.499ACEA6600@gemini.denx.de>
Le 02/12/2010 19:51, Wolfgang Denk a ?crit :
> Dear Albert ARIBAUD,
>
> In message<4CF7C7F4.6030803@free.fr> you wrote:
>>
>>> Well, an u8 is as good a data type as any other. The available range
>>> of 0...255 seems more than sufficient to store the needed
>>> information, so why should I waste 4 bytes of storage when a single
>>> byte is sufficient as well?
>>
>> You don't necessarily use only one byte when declaring an u8 instead of
>> an int, because the next declaration may have alignment requirements
>> that will cause the compiler to skip bytes after the u8. Besides, u8 is
>
> The compiler / linker may (or may not) optimize this and collect
> variables of similar alignment. An "int foo;" is likely to end in
> .bss segment, while an "char foo;" will probably show up in .sbss - I
> don;t know how good or bad the current situation for ARM is, but I'm
> sure it is improving (look for example at all the microoptimizations
> done by Linaro).
There is only a single .bss for ARM.
>> not "as good a data type" as any other, it is a specific data type
>> whereas 'int' is the native data type of the platform, supposed to be
>> the most natural to deal with for the cpu -- 32-bit for an ARM.
>
> Can an ARM CPU not read1s and write single bytes, too?
It can, but for many of its operations, it can only work with 32-bit data.
> Let's stop this here.
Understood.
> Best regards,
>
> Wolfgang Denk
Amicalement,
--
Albert.
next prev parent reply other threads:[~2010-12-02 19:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 11:20 [U-Boot] [PATCH] omap3evm: Clean-up EVM detection code Sanjeev Premi
2010-12-02 11:37 ` Wolfgang Denk
2010-12-02 11:56 ` Albert ARIBAUD
2010-12-02 12:01 ` Wolfgang Denk
2010-12-02 12:33 ` Albert ARIBAUD
2010-12-02 13:58 ` Wolfgang Denk
2010-12-02 16:23 ` Albert ARIBAUD
2010-12-02 18:51 ` Wolfgang Denk
2010-12-02 19:32 ` Albert ARIBAUD [this message]
2010-12-02 13:30 ` Premi, Sanjeev
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=4CF7F439.3020102@free.fr \
--to=albert.aribaud@free.fr \
--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.