05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ARM</strong>v6 Differences<br />

G.3 Application level memory support<br />

Memory support covers address alignment, endian support, semaphore support, memory order model,<br />

caches, <strong>and</strong> write buffers. The following sections give an application level description of <strong>ARM</strong>v6 memory<br />

support:<br />

Alignment<br />

Endian support on page AppxG-7<br />

Semaphore support on page AppxG-8<br />

Memory model <strong>and</strong> memory ordering on page AppxG-8.<br />

G.3.1 Alignment<br />

<strong>ARM</strong>v6 supports:<br />

a legacy alignment configuration compatible with <strong>ARM</strong>v5<br />

the <strong>ARM</strong>v7 alignment configuration that supports unaligned loads <strong>and</strong> stores of 16-bit halfwords <strong>and</strong><br />

32-bit words.<br />

The alignment configuration is controlled by the SCTLR.U bit, see c1, System Control Register (SCTLR) on<br />

page AppxG-34:<br />

SCTLR.U == 0<br />

<strong>ARM</strong>v5 compatible alignment support, see Alignment on page AppxH-6, except for the<br />

LDRD <strong>and</strong> STRD instructions. LDRD <strong>and</strong> STRD must be doubleword-aligned, otherwise:<br />

if SCTLR.A == 0, the instruction is UNPREDICTABLE<br />

if SCTLR.A == 1, the instruction causes an Alignment fault.<br />

Note<br />

The behavior of LDRD <strong>and</strong> STRD with SCTLR.A == 0 is compatible with <strong>ARM</strong>v5. When<br />

SCTLR.A == 1, whether the alignment check is for word or doubleword alignment is:<br />

IMPLEMENTATION DEFINED in <strong>ARM</strong>v5<br />

required to be for doubleword alignment in <strong>ARM</strong>v6.<br />

SCTLR.U == 1<br />

Unaligned access support for loads <strong>and</strong> stores of single 16-bit halfwords <strong>and</strong> 32-bit words,<br />

using the LDR, LDRH, LDRHT, LDRSH, LDRSHT, LDRT, STRH, STRHT, STR, <strong>and</strong> STRT instructions. Some<br />

of these instructions were introduced in <strong>ARM</strong>v6T2.<br />

The following requirements also apply:<br />

LDREX <strong>and</strong> STREX exclusive access instructions must be word-aligned, otherwise the<br />

instruction generates an abort.<br />

In <strong>ARM</strong>v6K, an abort is generated if:<br />

— an LDREXH or STREXH exclusive access instruction is not halfword-aligned<br />

— an LDREXD or STREXD exclusive access instruction is not doubleword-aligned.<br />

AppxG-6 Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DDI 0406B

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!