ARM Architecture Reference Manual ARMv8, For ARMv8 A Profile AArch64

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 5158 [warning: Documents this large are best viewed by clicking the View PDF Link!]

Copyright © 2013 ARM Limited. All rights reserved.
ARM DDI 0487A.a (ID090413)
ARM® Architecture Reference Manual
ARMv8, for ARMv8-A architecture profile
Beta
ii Copyright © 2013 ARM Limited. All rights reserved. ARM DDI 0487A.a
Non-Confidential - Beta ID090413
ARM Architecture Reference Manual
ARMv8, for ARMv8-A architecture profile
Copyright © 2013 ARM Limited. All rights reserved.
Release Information
The following releases of this document have been made.
Proprietary Notice
This document is protected by copyright and other related rights and the practice or implementation of the information contained
in this document may be protected by one or more patents or pending patent applications. No part of this document may be
reproduced in any form by any means without the express prior written permission of ARM Limited (“ARM”). No license,
express or implied, by estoppel or otherwise to any intellectual property rights is granted by this document unless
specifically stated.
Your access to the information in this document is conditional upon your acceptance that you will not use or permit others to use
the information for the purposes of determining whether implementations infringe any third party patents.
THIS DOCUMENT IS PROVIDED “AS IS”. ARM PROVIDES NO REPRESENTATIONS AND NO WARRANTIES,
EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, SATISFACTORY QUALITY, NON-INFRINGEMENT OR FITNESS FOR A PARTICULAR
PURPOSE WITH RESPECT TO THE DOCUMENT. For the avoidance of doubt, ARM makes no representation with respect to,
and has undertaken no analysis to identify or understand the scope and content of, third party patents, copyrights, trade secrets, or
other rights.
This document may include technical inaccuracies or typographical errors.
TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ARM BE LIABLE FOR ANY DAMAGES,
INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR
CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING
OUT OF ANY USE OF THIS DOCUMENT, EVEN IF ARM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
This document consists solely of commercial items. You shall be responsible for ensuring that any use, duplication or disclosure
of this document complies fully with any relevant export laws and regulations to assure that this document or any portion thereof
is not exported, directly or indirectly, in violation of such export laws. Use of the word “partner” in reference to ARM’s customers
is not intended to create or refer to any partnership relationship with any other company. ARM may make changes to this document
at any time and without notice.
If any of the provisions contained in these terms conflict with any of the provisions of any signed written agreement specifically
covering this document with ARM, then the signed written agreement prevails over and supersedes the conflicting provisions of
these terms.
Words and logos marked with ® or are registered trademarks or trademarks of ARM Limited or its affiliates in the EU and/or
elsewhere. All rights reserved. Other brands and names mentioned in this document may be the trademarks of their respective
owners. You must follow the ARM trademark usage guidelines, http://www.arm.com/about/trademark-usage-guidelines.php.
This document is Non-Confidential but any disclosure by you is subject to you providing the recipient the conditions set out in
this notice and procuring the acceptance by the recipient of the conditions set out in this notice.
Copyright © 2013 ARM Limited or its affiliates. All rights reserved.
ARM Limited. Company 02557590 registered in England.
110 Fulbourn Road, Cambridge, England CB1 9NJ.
LES-PRE-20327
In this document, where the term ARM is used to refer to the company it means “ARM or any of its subsidiaries as appropriate”.
Release history
Date Issue Confidentiality Change
30 April 2013 A.a-1 Confidential-Beta Draft Beta draft of first issue, limited circulation
12 June 2013 A.a-2 Confidential-Beta Draft Second beta draft of first issue, limited circulation
04 September 2013 A.a Non-Confidential Beta Beta release.
ARM DDI 0487A.a Copyright © 2013 ARM Limited. All rights reserved. iii
ID090413 Non-Confidential - Beta
Note
The term ARM can refer to versions of the ARM architecture, for example ARMv7 refers to version 7 of the ARM architecture.
The context makes it clear when the term is used in this way.
Web Address
http://www.arm.com
iv Copyright © 2013 ARM Limited. All rights reserved. ARM DDI 0487A.a
Non-Confidential - Beta ID090413
ARM DDI 0487A.a Copyright © 2013 ARM Limited. All rights reserved. v
ID090413 Non-Confidential - Beta
Contents
ARM Architecture Reference Manual ARMv8, for
ARMv8-A architecture profile
Preface
About this manual ..................................................................................................... xvi
Using this manual ................................................................................................... xviii
Conventions ............................................................................................................ xxiii
Additional reading .................................................................................................... xxv
Feedback ................................................................................................................ xxvi
Part A ARMv8 Architecture Introduction and Overview
Chapter A1 Introduction to the ARMv8 Architecture
A1.1 About the ARM architecture ................................................................................. A1-30
A1.2 Architecture profiles ............................................................................................. A1-32
A1.3 ARMv8 architectural concepts ............................................................................. A1-33
A1.4 Supported data types ........................................................................................... A1-36
A1.5 Floating-point and Advanced SIMD support ........................................................ A1-46
A1.6 Cryptographic Extension ...................................................................................... A1-52
A1.7 The ARM memory model ..................................................................................... A1-53
Part B The AArch64 Application Level Architecture
Chapter B1 The AArch64 Application Level Programmers’ Model
B1.1 About the Application level programmers’ model ................................................. B1-58
B1.2 Registers in AArch64 Execution state .................................................................. B1-59
B1.3 Software control features and EL0 ....................................................................... B1-65
vi Copyright © 2013 ARM Limited. All rights reserved. ARM DDI 0487A.a
Non-Confidential - Beta ID090413
Chapter B2 The AArch64 Application Level Memory Model
B2.1 Address space ..................................................................................................... B2-68
B2.2 Memory type overview ........................................................................................ B2-69
B2.3 Caches and memory hierarchy ........................................................................... B2-70
B2.4 Alignment support ............................................................................................... B2-75
B2.5 Endian support .................................................................................................... B2-76
B2.6 Atomicity in the ARM architecture ....................................................................... B2-79
B2.7 Memory ordering ................................................................................................. B2-82
B2.8 Memory types and attributes ............................................................................... B2-89
B2.9 Mismatched memory attributes ........................................................................... B2-98
B2.10 Synchronization and semaphores ..................................................................... B2-100
Part C The AArch64 Instruction Set
Chapter C1 The A64 Instruction Set
C1.1 Introduction ........................................................................................................ C1-112
C1.2 Structure of the A64 assembler language ......................................................... C1-113
C1.3 Address generation ........................................................................................... C1-118
C1.4 Instruction aliases .............................................................................................. C1-121
Chapter C2 A64 Instruction Set Overview
C2.1 Branches, Exception generating, and System instructions ............................... C2-124
C2.2 Loads and stores ............................................................................................... C2-129
C2.3 Data processing - immediate ............................................................................. C2-140
C2.4 Data processing - register ................................................................................. C2-145
C2.5 Data processing - SIMD and floating-point ........................................................ C2-152
Chapter C3 A64 Instruction Set Encoding
C3.1 A64 instruction index by encoding ..................................................................... C3-172
C3.2 Branches, exception generating and system instructions ................................. C3-173
C3.3 Loads and stores ............................................................................................... C3-176
C3.4 Data processing - immediate ............................................................................. C3-193
C3.5 Data processing - register ................................................................................. C3-196
C3.6 Data processing - SIMD and floating point ........................................................ C3-203
Chapter C4 The AArch64 System Instruction Class
C4.1 About the System instruction and System register descriptions ....................... C4-230
C4.2 The System instruction class encoding space .................................................. C4-232
C4.3 PSTATE and special purpose registers ............................................................ C4-251
C4.4 A64 system instructions for cache maintenance ............................................... C4-306
C4.5 A64 system instructions for address translation ................................................ C4-322
C4.6 A64 system instructions for TLB maintenance .................................................. C4-335
Chapter C5 A64 Base Instruction Descriptions
C5.1 Introduction ........................................................................................................ C5-386
C5.2 Register size ...................................................................................................... C5-387
C5.3 Use of the PC .................................................................................................... C5-388
C5.4 Use of the stack pointer ..................................................................................... C5-389
C5.5 Condition flags and related instructions ............................................................ C5-390
C5.6 Alphabetical list of instructions .......................................................................... C5-391
Chapter C6 A64 SIMD and Floating-point Instruction Descriptions
C6.1 Introduction ........................................................................................................ C6-776
C6.2 About the SIMD and floating-point instructions ................................................. C6-777
C6.3 Alphabetical list of floating-point and Advanced SIMD instructions ................... C6-779
ARM DDI 0487A.a Copyright © 2013 ARM Limited. All rights reserved. vii
ID090413 Non-Confidential - Beta
Part D The AArch64 System Level Architecture
Chapter D1 The AArch64 System Level Programmers’ Model
D1.1 Exception levels ............................................................................................... D1-1408
D1.2 Exception terminology ...................................................................................... D1-1409
D1.3 Execution state ................................................................................................ D1-1411
D1.4 Security state ................................................................................................... D1-1412
D1.5 Virtualization .................................................................................................... D1-1414
D1.6 Registers for instruction processing and exception handling ........................... D1-1416
D1.7 Process state, PSTATE ................................................................................... D1-1421
D1.8 Program counter and stack pointer alignment ................................................. D1-1423
D1.9 Reset ................................................................................................................ D1-1426
D1.10 Exception entry ................................................................................................ D1-1429
D1.11 Exception return ............................................................................................... D1-1439
D1.12 The Exception level hierarchy .......................................................................... D1-1443
D1.13 Synchronous exception types, routing and priorities ....................................... D1-1450
D1.14 Asynchronous exception types, routing, masking and priorities ...................... D1-1456
D1.15 Trapping functionality to higher Exception levels ............................................. D1-1462
D1.16 System calls ..................................................................................................... D1-1511
D1.17 Use of the ESR_EL1, ESR_EL2, and ESR_EL3 ............................................. D1-1512
D1.18 Mechanisms for entering a low-power state .................................................... D1-1533
D1.19 Self-hosted debug ............................................................................................ D1-1539
D1.20 Performance Monitors extension ..................................................................... D1-1541
D1.21 Interprocessing ................................................................................................ D1-1542
D1.22 Supported configurations ................................................................................. D1-1554
Chapter D2 Debug Exceptions
D2.1 Introduction to debug exceptions ..................................................................... D2-1560
D2.2 Legacy debug exceptions ................................................................................ D2-1564
D2.3 Understanding the descriptions for AArch64 state and AArch32 state ............ D2-1565
D2.4 Software Breakpoint Instruction exceptions ..................................................... D2-1566
D2.5 Breakpoint exceptions ...................................................................................... D2-1569
D2.6 Watchpoint exceptions ..................................................................................... D2-1606
D2.7 Vector Catch exceptions .................................................................................. D2-1627
D2.8 Software Step exceptions ................................................................................ D2-1634
D2.9 Synchronization and debug exceptions ........................................................... D2-1647
Chapter D3 The Debug Exception Model
D3.1 About debug exceptions .................................................................................. D3-1650
D3.2 The debug exceptions enable controls ............................................................ D3-1651
D3.3 Routing debug exceptions ............................................................................... D3-1652
D3.4 Enabling debug exceptions from current Exception level and Security state .. D3-1656
D3.5 The effect of powerdown on debug exceptions ............................................... D3-1661
D3.6 Summary of permitted routing and enabling of debug exceptions ................... D3-1662
D3.7 Debug exception behavior ............................................................................... D3-1665
D3.8 Pseudocode descriptions of debug exceptions ................................................ D3-1669
Chapter D4 The AArch64 System Level Memory Model
D4.1 About the memory system architecture ........................................................... D4-1672
D4.2 Address space ................................................................................................. D4-1673
D4.3 Mixed-endian support ...................................................................................... D4-1674
D4.4 Cache support .................................................................................................. D4-1675
D4.5 External aborts ................................................................................................. D4-1694
D4.6 Memory barrier instructions ............................................................................. D4-1696
D4.7 Pseudocode details of general memory system instructions ........................... D4-1697
Chapter D5 The AArch64 Virtual Memory System Architecture
D5.1 About the Virtual Memory System Architecture (VMSA) .................................. D5-1708
viii Copyright © 2013 ARM Limited. All rights reserved. ARM DDI 0487A.a
Non-Confidential - Beta ID090413
D5.2 The VMSAv8-64 address translation system .................................................. D5-1710
D5.3 Translation table walk examples ..................................................................... D5-1760
D5.4 VMSAv8-64 translation table format descriptors ............................................. D5-1772
D5.5 Access controls and memory region attributes ............................................... D5-1781
D5.6 MMU faults ...................................................................................................... D5-1796
D5.7 Translation Lookaside Buffers (TLBs) ............................................................. D5-1804
D5.8 Caches in a VMSA implementation ................................................................. D5-1818
Chapter D6 The Performance Monitors Extension
D6.1 About the Performance Monitors ..................................................................... D6-1822
D6.2 Accuracy of the Performance Monitors ........................................................... D6-1824
D6.3 Behavior on overflow ....................................................................................... D6-1826
D6.4 Attributability .................................................................................................... D6-1828
D6.5 Effect of EL3 and EL2 ..................................................................................... D6-1829
D6.6 Event filtering ................................................................................................... D6-1831
D6.7 Performance Monitors and Debug state .......................................................... D6-1832
D6.8 Counter enables .............................................................................................. D6-1833
D6.9 Counter access ............................................................................................... D6-1834
D6.10 Event numbers and mnemonics ...................................................................... D6-1836
D6.11 Performance Monitors Extension registers ..................................................... D6-1851
D6.12 Pseudocode details ......................................................................................... D6-1854
Chapter D7 The Generic Timer
D7.1 About the Generic Timer ................................................................................. D7-1856
D7.2 About the Generic Timer registers .................................................................. D7-1864
Chapter D8 AArch64 System Register Descriptions
D8.1 About the AArch64 System registers .............................................................. D8-1866
D8.2 General system control registers ..................................................................... D8-1870
D8.3 Debug registers ............................................................................................... D8-2077
D8.4 Performance Monitors registers ...................................................................... D8-2134
D8.5 Generic Timer registers ................................................................................... D8-2170
D8.6 Generic Interrupt Controller CPU interface registers ....................................... D8-2194
Part E The AArch32 Application Level Architecture
Chapter E1 The AArch32 Application Level Programmers’ Model
E1.1 About the Application level programmers’ model ............................................ E1-2288
E1.2 Additional information about the programmers’ model in AArch32 state ......... E1-2289
E1.3 Advanced SIMD and floating-point instructions ............................................... E1-2303
E1.4 Coprocessor support ....................................................................................... E1-2331
E1.5 Exceptions and debug events ......................................................................... E1-2332
Chapter E2 The AArch32 Application Level Memory Model
E2.1 Address space ................................................................................................. E2-2334
E2.2 Memory type overview .................................................................................... E2-2336
E2.3 Caches and memory hierarchy ....................................................................... E2-2337
E2.4 Alignment support ........................................................................................... E2-2341
E2.5 Endian support ................................................................................................ E2-2343
E2.6 Atomicity in the ARM architecture ................................................................... E2-2346
E2.7 Memory ordering ............................................................................................. E2-2350
E2.8 Memory types and attributes ........................................................................... E2-2357
E2.9 Mismatched memory attributes ....................................................................... E2-2366
E2.10 Synchronization and semaphores ................................................................... E2-2369
ARM DDI 0487A.a Copyright © 2013 ARM Limited. All rights reserved. ix
ID090413 Non-Confidential - Beta
Part F The AArch32 Instruction Sets
Chapter F1 The AArch32 Instruction Sets Overview
F1.1 Unified Assembler Language ........................................................................... F1-2380
F1.2 Branch instructions .......................................................................................... F1-2382
F1.3 Data-processing instructions ............................................................................ F1-2383
F1.4 Status register access instructions .................................................................. F1-2391
F1.5 Load/store instructions ..................................................................................... F1-2392
F1.6 Load/store multiple instructions ....................................................................... F1-2394
F1.7 Miscellaneous instructions ............................................................................... F1-2395
F1.8 Exception-generating and exception-handling instructions .............................. F1-2396
F1.9 Coprocessor instructions ................................................................................. F1-2397
F1.10 Advanced SIMD and floating-point load/store instructions .............................. F1-2398
F1.11 Advanced SIMD and floating-point register transfer instructions ..................... F1-2400
F1.12 Advanced SIMD data-processing instructions ................................................. F1-2401
F1.13 Floating-point data-processing instructions ..................................................... F1-2408
Chapter F2 About the T32 and A32 Instruction Descriptions
F2.1 Format of instruction descriptions .................................................................... F2-2410
F2.2 Standard assembler syntax fields .................................................................... F2-2415
F2.3 Conditional execution ....................................................................................... F2-2416
F2.4 Shifts applied to a register ............................................................................... F2-2419
F2.5 Memory accesses ............................................................................................ F2-2422
F2.6 Integer arithmetic in the T32 and A32 instruction sets ..................................... F2-2423
F2.7 Encoding of lists of general-purpose registers and the PC .............................. F2-2426
F2.8 Additional pseudocode support for instruction descriptions ............................. F2-2427
Chapter F3 T32 Base Instruction Set Encoding
F3.1 T32 instruction set encoding ............................................................................ F3-2432
F3.2 16-bit T32 instruction encoding ........................................................................ F3-2435
F3.3 32-bit T32 instruction encoding ........................................................................ F3-2442
Chapter F4 A32 Base Instruction Set Encoding
F4.1 A32 instruction set encoding ............................................................................ F4-2466
F4.2 Data-processing and miscellaneous instructions ............................................. F4-2468
F4.3 Load/store word and unsigned byte ................................................................. F4-2480
F4.4 Media instructions ............................................................................................ F4-2481
F4.5 Branch, branch with link, and block data transfer ............................................ F4-2486
F4.6 Coprocessor instructions, and Supervisor Call ................................................ F4-2487
F4.7 Unconditional instructions ................................................................................ F4-2488
Chapter F5 T32 and A32 Instruction Sets Advanced SIMD and floating-point
Encodings
F5.1 Overview .......................................................................................................... F5-2492
F5.2 Advanced SIMD and floating-point instruction syntax ...................................... F5-2493
F5.3 Register encoding ............................................................................................ F5-2497
F5.4 Advanced SIMD data-processing instructions ................................................. F5-2499
F5.5 Floating-point data-processing instructions ..................................................... F5-2511
F5.6 Extension register load/store instructions ........................................................ F5-2514
F5.7 Advanced SIMD element or structure load/store instructions .......................... F5-2515
F5.8 8, 16, and 32-bit transfer between general-purpose and extension registers .. F5-2518
F5.9 64-bit transfers between general-purpose and extension registers ................. F5-2519
Chapter F6 ARMv8 Changes to the T32 and A32 Instruction Sets
F6.1 The A32 and T32 instruction sets .................................................................... F6-2522
F6.2 Partial Deprecation of IT .................................................................................. F6-2523
F6.3 New A32 and T32 Load-Acquire/Store-Release instructions ........................... F6-2524
xCopyright © 2013 ARM Limited. All rights reserved. ARM DDI 0487A.a
Non-Confidential - Beta ID090413
F6.4 New A32 and T32 scalar floating-point instructions ........................................ F6-2525
F6.5 New A32 and T32 Advanced SIMD floating-point instructions ........................ F6-2528
F6.6 New A32 and T32 cryptography instructions ................................................... F6-2530
F6.7 New A32 and T32 System instructions ........................................................... F6-2531
Chapter F7 T32 and A32 Base Instruction Set Instruction Descriptions
F7.1 Alphabetical list of T32 and A32 base instruction set instructions ................... F7-2534
F7.2 General restrictions on system instructions ..................................................... F7-3028
F7.3 Encoding and use of Banked register transfer instructions ............................. F7-3029
F7.4 Alphabetical list of system instructions ............................................................ F7-3033
Chapter F8 T32 and A32 Advanced SIMD and floating-point Instruction Descriptions
F8.1 Alphabetical list of floating-point and Advanced SIMD instructions ................. F8-3076
Part G The AArch32 System Level Architecture
Chapter G1