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.3 Semaphore support<br />

<strong>ARM</strong> deprecates the use of the <strong>ARM</strong> semaphore instructions SWP <strong>and</strong> SWPB, in favour of the exclusive access<br />

mechanism described in Synchronization <strong>and</strong> semaphores on page A3-12:<br />

<strong>ARM</strong>v6 <strong>and</strong> <strong>ARM</strong>v6T2 support the LDREX <strong>and</strong> STREX instructions<br />

<strong>ARM</strong>v6K <strong>and</strong> <strong>ARM</strong>v7 add the CLREX, LDREXB, LDREXD, LDREXH, STREXB, STREXD, <strong>and</strong> STREXH instructions.<br />

All Load-Exclusive <strong>and</strong> Store-Exclusive access instructions must be naturally aligned. An unaligned<br />

Exclusive access instruction generates an unaligned access Data Abort exception.<br />

G.3.4 Memory model <strong>and</strong> memory ordering<br />

The memory model was formalized in <strong>ARM</strong>v6. This included:<br />

defining Normal, Device, <strong>and</strong> Strongly-ordered memory types<br />

adding a Shareable memory attribute<br />

extending the memory attributes to support two cache policies, associated with Inner <strong>and</strong> Outer levels<br />

of cache <strong>and</strong> including a write allocation hint capability<br />

adding Data Memory Barrier (DMB) <strong>and</strong> Data Synchronization Barrier (DSB) operations, to<br />

support the formalized memory ordering requirements<br />

adding an Instruction Synchronization Barrier (ISB) operation, to guarantee that instructions<br />

complete before any instructions that come after them in program order are executed.<br />

<strong>ARM</strong>v6 provided barrier operations as CP15 c7 operations. These migrated to the <strong>ARM</strong> <strong>and</strong> Thumb<br />

instruction sets as follows:<br />

<strong>ARM</strong>v6 required DMB, DSB, <strong>and</strong> ISB operations in CP15, see c7, Miscellaneous functions on<br />

page AppxH-51. The functionality of these operations is the same as that described for <strong>ARM</strong>v7 in<br />

Memory barriers on page A3-47.<br />

<strong>ARM</strong>v7 adds DMB, DSB, <strong>and</strong> ISB instructions to the <strong>ARM</strong> <strong>and</strong> Thumb instruction sets.<br />

<strong>ARM</strong> deprecates use of the CP15 barrier operations.<br />

Ordering of instructions that change the CPSR interrupt masks<br />

In <strong>ARM</strong>v6, any instruction that implicitly or explicitly changes the interrupt masks in the CPSR <strong>and</strong> appears<br />

in program order after a Strongly-ordered access must wait for the Strongly-ordered memory access to<br />

complete. These instructions are:<br />

An MSR with the control field mask bit set.<br />

The flag-setting variants of arithmetic <strong>and</strong> logical instructions with the PC as the destination register.<br />

These instructions copy the SPSR to CPSR.<br />

AppxG-8 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!