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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Application Level Memory Model<br />

Reverse halfword <strong>and</strong> sign-extend, for transforming signed 16-bit representations. See REVSH on<br />

page A8-276.<br />

Reverse packed halfwords in a register for transforming big- <strong>and</strong> little-endian 16-bit representations.<br />

See REV16 on page A8-274.<br />

A3.3.5 Endianness in Advanced SIMD<br />

Advanced SIMD element load/store instructions transfer vectors of elements between memory <strong>and</strong> the<br />

Advanced SIMD register bank. An instruction specifies both the length of the transfer <strong>and</strong> the size of the<br />

data elements being transferred. This information is used by the processor to load <strong>and</strong> store data correctly<br />

in both big-endian <strong>and</strong> little-endian systems.<br />

Consider. for example, the instruction:<br />

VLD1.16 {D0}, [R1]<br />

This loads a 64-bit register with four 16-bit values. The four elements appear in the register in array order,<br />

with the lowest indexed element fetched from the lowest address. The order of bytes in the elements depends<br />

on the endianness configuration, as shown in Figure A3-1. Therefore, the order of the elements in the<br />

registers is the same regardless of the endianness configuration. This means that Advanced SIMD code is<br />

usually independent of endianness.<br />

0 A[7:0]<br />

1 A[15:8]<br />

2 B[7:0]<br />

3 B[15:8]<br />

4 C[7:0]<br />

5 C[15:8]<br />

6 D[7:0]<br />

7 D[15:8]<br />

Memory system with<br />

Little endian addressing (LE)<br />

64-bit register containing four 16-bit elements<br />

D[15:8] D[7:0] C[15:8] C[7:0] B[15:8] B[7:0] A[15:8] A[7:0]<br />

VLD1.16 {D0}, [R1]<br />

VLD1.16 {D0}, [R1]<br />

Figure A3-1 Advanced SIMD byte order example<br />

The Advanced SIMD extension supports Little-Endian (LE) <strong>and</strong> Big-Endian (BE) models.<br />

A[15:8]<br />

A[7:0]<br />

B[15:8]<br />

B[7:0]<br />

C[15:8]<br />

C[7:0]<br />

D[15:8]<br />

D[7:0]<br />

Memory system with<br />

Big endian addressing (BE)<br />

For information about the alignment of Advanced SIMD instructions see Unaligned data access on<br />

page A3-5.<br />

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

0<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7

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

Saved successfully!

Ooh no, something went wrong!