Re: C programming on ARM
- From: Grant Edwards <grante@xxxxxxxx>
- Date: Thu, 31 Jan 2008 00:34:42 -0000
On 2008-01-30, Wilco Dijkstra <Wilco_dot_Dijkstra@xxxxxxxxxxxx> wrote:
"Hans-Bernhard Bröker" <HBBroeker@xxxxxxxxxxx> wrote in message news:fnr0vs$mp6$00$1@xxxxxxxxxxxxxxxxxxxx
Wilco Dijkstra wrote:
With any byte addressable architecture, a pointer is just a pointer.
But there are quite a few non-byte addressable architectures out there.
Including ARM, last I checked.
Actually most architectures are byte addressable, including ARM,
Depends on what exactly you mean by the term.
AFAIK ARM7 is byte-addressable only for bytes, but not for larger objects. Well, may be it's just me, but I wouldn't
call what happens when an ARM7 accesses a 32-bit integer without 4-byte alignment "addressing".
Obviously not all possible pointer values are valid for all types. This doesn't
affect byte addressability as casting between char* and int* doesn't lose
information. Accessing a misaligned pointer will result in an exception
On some systems. On others you just get garbage values.
(which is a good way to detect corrupted pointers). However if
you use the correct type (eg. __packed int *p rather than int
*p), the compiler will generate an unaligned access.
I tried to figure out how to do that using gcc, but never I
seemed to get the declarations or typedefs right...
--
Grant Edwards grante Yow! We have DIFFERENT
at amounts of HAIR --
visi.com
.
- References:
- C programming on ARM
- From: aamer
- Re: C programming on ARM
- From: Arlet Ottens
- Re: C programming on ARM
- From: Jim Relsh
- Re: C programming on ARM
- From: CBFalconer
- Re: C programming on ARM
- From: Paul Keinanen
- Re: C programming on ARM
- From: Hans-Bernhard Bröker
- Re: C programming on ARM
- From: Wilco Dijkstra
- Re: C programming on ARM
- From: Hans-Bernhard Bröker
- Re: C programming on ARM
- From: Wilco Dijkstra
- C programming on ARM
- Prev by Date: Re: Ubuntu versus Fedora for cross-development host
- Next by Date: Re: C programming on ARM
- Previous by thread: Re: C programming on ARM
- Next by thread: Re: C programming on ARM
- Index(es):
Relevant Pages
|