Re: C programming on ARM
- From: "Wilco Dijkstra" <Wilco_dot_Dijkstra@xxxxxxxxxxxx>
- Date: Thu, 31 Jan 2008 00:01:43 GMT
"Grant Edwards" <grante@xxxxxxxx> wrote in message news:13q21msqkij3dbb@xxxxxxxxxxxxxxxxxxxxx
On 2008-01-30, Wilco Dijkstra <Wilco_dot_Dijkstra@xxxxxxxxxxxx> wrote:
Actually most architectures are byte addressable, including ARM,
True, but many of them (ARM, SPARC, MSP430, ...) have alignment
requirements for objects larger than 1 byte in size.
Byte addressability refers to the smallest unit of addressability, not
to the coursest.
so casting pointers just works.
Unless the resulting pointer is misaligned.
Or the pointer is aligned but points to the wrong place, or invalid memory,
or a peripheral, or ... If you don't know what you're doing then pointer
casting is likely the least of your problems.
My point was that the bitpatterns of all pointer types are the same for
all addresses in the address space.
Wilco
.
- Follow-Ups:
- Re: C programming on ARM
- From: Stefan Reuther
- Re: C programming on ARM
- From: Grant Edwards
- Re: C programming on ARM
- From: CBFalconer
- Re: C programming on ARM
- 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: Grant Edwards
- C programming on ARM
- Prev by Date: Re: C programming on ARM
- 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
|