arm compiler armasm reference guide€¦ · arm compiler armasm reference guide ... and

1176
Copyright © 2014 ARM. All rights reserved. ARM DUI 0802A (ID031214) ARM ® Compiler Version 6.00 armasm Reference Guide

Upload: others

Post on 14-Oct-2020

125 views

Category:

Documents


0 download

TRANSCRIPT

  • ARM® CompilerVersion 6.00

    armasm Reference Guide

    Copyright © 2014 ARM. All rights reserved.ARM DUI 0802A (ID031214)

  • ARM Compilerarmasm Reference Guide

    Copyright © 2014 ARM. All rights reserved.

    Release Information

    The following changes have been made to this book.

    Proprietary Notice

    Words and logos marked with ™ or ® are registered trademarks or trademarks of ARM® in the EU and other countries, except as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the trademarks of their respective owners.

    Neither the whole nor any part of the information contained in, or the product described in, this document may be adapted or reproduced in any material form except with the prior written permission of the copyright holder.

    The product described in this document is subject to continuous developments and improvements. All particulars of the product and its use contained in this document are given by ARM in good faith. However, all warranties implied or expressed, including but not limited to implied warranties of merchantability, or fitness for purpose, are excluded.

    This document is intended only to assist the reader in the use of the product. ARM shall not be liable for any loss or damage arising from the use of any information in this document, or any error or omission in such information, or any incorrect use of the product.

    Where the term ARM is used it means “ARM or any of its subsidiaries as appropriate”.

    Confidentiality Status

    This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this document to.

    Product Status

    The information in this document is final, that is for a developed product.

    Web Address

    http://www.arm.com

    Change History

    Date Issue Confidentiality Change

    14 March 2014 A Non-Confidential ARM Compiler v6.00 Release

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. iiID031214 Non-Confidential

  • ContentsARM Compiler armasm Reference Guide

    Chapter 1 Conventions and Feedback

    Chapter 2 armasm Command-line Options2.1 armasm command-line syntax ................................................................................. 2-22.2 armasm command-line options ................................................................................ 2-32.3 --16 .......................................................................................................................... 2-52.4 --32 .......................................................................................................................... 2-62.5 --apcs ....................................................................................................................... 2-72.6 --arm ........................................................................................................................ 2-92.7 --arm_only .............................................................................................................. 2-102.8 --bi .......................................................................................................................... 2-112.9 --bigend .................................................................................................................. 2-122.10 --brief_diagnostics ................................................................................................. 2-132.11 --checkreglist ......................................................................................................... 2-142.12 --cpu ....................................................................................................................... 2-152.13 --debug .................................................................................................................. 2-172.14 --depend ................................................................................................................ 2-182.15 --depend_format .................................................................................................... 2-192.16 --diag_error ............................................................................................................ 2-202.17 --diag_remark ........................................................................................................ 2-212.18 --diag_style ............................................................................................................ 2-222.19 --diag_suppress ..................................................................................................... 2-232.20 --diag_warning ....................................................................................................... 2-242.21 --dllexport_all ......................................................................................................... 2-252.22 --dwarf2 .................................................................................................................. 2-262.23 --dwarf3 .................................................................................................................. 2-272.24 --errors ................................................................................................................... 2-282.25 --execstack ............................................................................................................ 2-292.26 --exceptions ........................................................................................................... 2-30

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. iiiID031214 Non-Confidential

  • Contents

    2.27 --exceptions_unwind .............................................................................................. 2-312.28 --fpmode ................................................................................................................ 2-322.29 --fpu ....................................................................................................................... 2-332.30 -g ............................................................................................................................ 2-342.31 --help ...................................................................................................................... 2-352.32 -i ............................................................................................................................. 2-362.33 --keep ..................................................................................................................... 2-372.34 --length ................................................................................................................... 2-382.35 --li ........................................................................................................................... 2-392.36 --library_type .......................................................................................................... 2-402.37 --licretry .................................................................................................................. 2-412.38 --list ........................................................................................................................ 2-422.39 --littleend ................................................................................................................ 2-432.40 -m ........................................................................................................................... 2-442.41 --maxcache ............................................................................................................ 2-452.42 --md ....................................................................................................................... 2-462.43 --no_code_gen ....................................................................................................... 2-472.44 --no_esc ................................................................................................................. 2-482.45 --no_execstack ...................................................................................................... 2-492.46 --no_exceptions ..................................................................................................... 2-502.47 --no_exceptions_unwind ........................................................................................ 2-512.48 --no_hide_all .......................................................................................................... 2-522.49 --no_reduce_paths ................................................................................................. 2-532.50 --no_regs ............................................................................................................... 2-542.51 --no_terse .............................................................................................................. 2-552.52 --no_unaligned_access .......................................................................................... 2-562.53 --no_warn ............................................................................................................... 2-572.54 -o ............................................................................................................................ 2-582.55 --pd ........................................................................................................................ 2-592.56 --predefine ............................................................................................................. 2-602.57 --reduce_paths ....................................................................................................... 2-612.58 --regnames ............................................................................................................ 2-622.59 --report-if-not-wysiwyg ........................................................................................... 2-632.60 --show_cmdline ...................................................................................................... 2-642.61 --thumb .................................................................................................................. 2-652.62 --unaligned_access ................................................................................................ 2-662.63 --unsafe .................................................................................................................. 2-672.64 --untyped_local_labels ........................................................................................... 2-682.65 --version_number ................................................................................................... 2-692.66 --via ........................................................................................................................ 2-702.67 --vsn ....................................................................................................................... 2-712.68 --width .................................................................................................................... 2-722.69 --xref ...................................................................................................................... 2-73

    Chapter 3 A32 and T32 Instructions3.1 A32 and T32 instruction summary ........................................................................... 3-23.2 Instruction width specifiers ....................................................................................... 3-83.3 Memory access instructions .................................................................................... 3-93.4 General data processing instructions .................................................................... 3-113.5 Flexible second operand (Operand2) .................................................................... 3-123.6 Operand2 as a constant ........................................................................................ 3-133.7 Operand2 as a register with optional shift ............................................................. 3-143.8 Shift operations ...................................................................................................... 3-153.9 Multiply instructions ............................................................................................... 3-183.10 Saturating instructions ........................................................................................... 3-193.11 Parallel instructions ................................................................................................ 3-203.12 Packing and unpacking instructions ...................................................................... 3-213.13 Branch and control instructions ............................................................................. 3-223.14 Coprocessor instructions ....................................................................................... 3-233.15 Miscellaneous instructions ..................................................................................... 3-24

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. ivID031214 Non-Confidential

  • Contents

    3.16 Pseudo-instructions ............................................................................................... 3-253.17 Condition codes ..................................................................................................... 3-263.18 ADD, SUB, RSB, ADC, SBC, and RSC ................................................................. 3-273.19 ADR (PC-relative) .................................................................................................. 3-323.20 ADR (register-relative) ........................................................................................... 3-343.21 ADRL pseudo-instruction ....................................................................................... 3-363.22 AND, ORR, EOR, BIC, and ORN .......................................................................... 3-383.23 ASR, LSL, LSR, ROR, and RRX ........................................................................... 3-413.24 B, BL, BX, BLX, and BXJ ....................................................................................... 3-443.25 BFC and BFI .......................................................................................................... 3-473.26 BKPT ..................................................................................................................... 3-483.27 CBZ and CBNZ ...................................................................................................... 3-493.28 CLREX ................................................................................................................... 3-503.29 CLZ ........................................................................................................................ 3-513.30 CMP and CMN ....................................................................................................... 3-523.31 CPS ....................................................................................................................... 3-543.32 CPY pseudo-instruction ......................................................................................... 3-553.33 DBG ....................................................................................................................... 3-563.34 DMB, DSB, and ISB ............................................................................................... 3-573.35 ERET ..................................................................................................................... 3-603.36 HLT ........................................................................................................................ 3-613.37 HVC ....................................................................................................................... 3-623.38 IT ............................................................................................................................ 3-633.39 LDC and STC ........................................................................................................ 3-663.40 LDM and STM ........................................................................................................ 3-683.41 LDR and STR (immediate offset) ........................................................................... 3-713.42 LDR and STR (register offset) ............................................................................... 3-743.43 LDR and STR, unprivileged ................................................................................... 3-773.44 LDR (PC-relative) .................................................................................................. 3-793.45 LDR (register-relative) ........................................................................................... 3-813.46 LDR pseudo-instruction ......................................................................................... 3-833.47 LDA and STL ......................................................................................................... 3-863.48 LDAEX and STLEX ................................................................................................ 3-883.49 LDREX and STREX ............................................................................................... 3-903.50 MCR and MCRR .................................................................................................... 3-923.51 MOV and MVN ....................................................................................................... 3-933.52 MOVT .................................................................................................................... 3-963.53 MOV32 pseudo-instruction .................................................................................... 3-973.54 MRC and MRRC .................................................................................................... 3-983.55 MRS (system coprocessor register to ARM register) ............................................ 3-993.56 MRS (PSR to general-purpose register) .............................................................. 3-1003.57 MSR (ARM register to system coprocessor register) .......................................... 3-1023.58 MSR (general-purpose register to PSR) .............................................................. 3-1033.59 MUL, MLA, and MLS ........................................................................................... 3-1053.60 NEG pseudo-instruction ....................................................................................... 3-1073.61 NOP ..................................................................................................................... 3-1083.62 Parallel add and subtract ..................................................................................... 3-1093.63 PKHBT and PKHTB ............................................................................................. 3-1123.64 PLD, PLDW, and PLI ........................................................................................... 3-1143.65 PUSH and POP ................................................................................................... 3-1163.66 QADD, QSUB, QDADD, and QDSUB ................................................................. 3-1183.67 REV, REV16, REVSH, and RBIT ........................................................................ 3-1203.68 RFE ...................................................................................................................... 3-1223.69 SBFX and UBFX .................................................................................................. 3-1243.70 SDIV and UDIV .................................................................................................... 3-1253.71 SEL ...................................................................................................................... 3-1263.72 SETEND .............................................................................................................. 3-1283.73 SEV, SEVL, WFE, WFI, and YIELD .................................................................... 3-1293.74 SMC ..................................................................................................................... 3-1313.75 SMLAD and SMLSD ............................................................................................ 3-132

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. vID031214 Non-Confidential

  • Contents

    3.76 SMLALxy ............................................................................................................. 3-1343.77 SMLALD and SMLSLD ........................................................................................ 3-1353.78 SMMUL, SMMLA, and SMMLS ........................................................................... 3-1373.79 SMUAD{X} and SMUSD{X} ................................................................................. 3-1393.80 SMULWy and SMLAWy ....................................................................................... 3-1403.81 SMULxy and SMLAxy .......................................................................................... 3-1413.82 SRS ..................................................................................................................... 3-1433.83 SSAT and USAT .................................................................................................. 3-1453.84 SSAT16 and USAT16 .......................................................................................... 3-1473.85 SUBS pc, lr .......................................................................................................... 3-1493.86 SVC ..................................................................................................................... 3-1513.87 SXT, SXTA, UXT, and UXTA ............................................................................... 3-1523.88 SYS ...................................................................................................................... 3-1543.89 TBB and TBH ....................................................................................................... 3-1553.90 TST and TEQ ....................................................................................................... 3-1563.91 UMAAL ................................................................................................................ 3-1583.92 UMULL, UMLAL, SMULL, and SMLAL ................................................................ 3-1593.93 UND pseudo-instruction ....................................................................................... 3-1613.94 USAD8 and USADA8 .......................................................................................... 3-162

    Chapter 4 Advanced SIMD and Floating-point Programming (32-bit)4.1 Advanced SIMD and floating-point instruction summary ......................................... 4-24.2 Shared Advanced SIMD and floating-point instructions .......................................... 4-74.3 Advanced SIMD logical and compare operations .................................................... 4-84.4 Advanced SIMD general data processing instructions ............................................ 4-94.5 Advanced SIMD shift instructions .......................................................................... 4-104.6 Advanced SIMD general arithmetic instructions .................................................... 4-114.7 Advanced SIMD multiply instructions .................................................................... 4-124.8 Advanced SIMD load and store element and structure instructions ...................... 4-134.9 Interleaving provided by load and store, element and structure instructions ......... 4-144.10 Alignment restrictions in load and store, element and structure instructions ......... 4-154.11 Advanced SIMD and floating-point pseudo-instructions ........................................ 4-164.12 Floating-point instructions ...................................................................................... 4-174.13 Cryptographic instructions ..................................................................................... 4-184.14 V{Q}{R}SHL (by signed variable) ........................................................................... 4-194.15 V{Q}ABS and V{Q}NEG ......................................................................................... 4-204.16 V{Q}ADD, VADDL, VADDW, V{Q}SUB, VSUBL, and VSUBW ............................. 4-214.17 V{R}ADDHN and V{R}SUBHN ............................................................................... 4-224.18 V{R}HADD and VHSUB ......................................................................................... 4-234.19 V{R}SHR (by immediate) ....................................................................................... 4-244.20 V{R}SHRN (by immediate) .................................................................................... 4-254.21 V{R}SRA (by immediate) ....................................................................................... 4-264.22 VABA{L} and VABD{L} ........................................................................................... 4-274.23 VABS, VNEG, and VSQRT .................................................................................... 4-284.24 VACGE and VACGT .............................................................................................. 4-294.25 VACLE and VACLT ............................................................................................... 4-304.26 VADD, VSUB, and VDIV ........................................................................................ 4-314.27 VAND, VBIC, VEOR, VORN, and VORR (register) ............................................... 4-324.28 VAND and VORN (immediate) .............................................................................. 4-334.29 VBIC and VORR (immediate) ................................................................................ 4-344.30 VBIF, VBIT, and VBSL ........................................................................................... 4-354.31 VCEQ, VCGE, VCGT, VCLE, and VCLT ............................................................... 4-364.32 VCLE and VCLT ................................................................................................... 4-374.33 VCLS, VCLZ, and VCNT ....................................................................................... 4-384.34 VCMP, VCMPE ...................................................................................................... 4-394.35 VCVT (between fixed-point or integer, and floating-point) ..................................... 4-404.36 VCVT (from floating-point to integer with directed rounding modes) ..................... 4-414.37 VCVT (between half-precision and single-precision floating-point) ....................... 4-424.38 VCVT (between single-precision and double-precision) ........................................ 4-434.39 VCVT (between floating-point and integer) ............................................................ 4-44

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. viID031214 Non-Confidential

  • Contents

    4.40 VCVT (from floating-point to integer with directed rounding modes) ..................... 4-454.41 VCVT (between floating-point and fixed-point) ...................................................... 4-464.42 VCVTB, VCVTT (half-precision extension) ............................................................ 4-474.43 VCVTB, VCVTT (between half-precision and double-precision) ........................... 4-484.44 VDUP ..................................................................................................................... 4-494.45 VEXT ..................................................................................................................... 4-504.46 VFMA, VFMS ......................................................................................................... 4-514.47 VFNMA, VFNMS .................................................................................................... 4-524.48 VLDM, VSTM, VPOP, and VPUSH ....................................................................... 4-534.49 VLDR and VSTR .................................................................................................... 4-544.50 VLDn and VSTn (single n-element structure to one lane) ..................................... 4-554.51 VLDn (single n-element structure to all lanes) ....................................................... 4-574.52 VLDn and VSTn (multiple n-element structures) ................................................... 4-594.53 VLDR pseudo-instruction ....................................................................................... 4-614.54 VLDR and VSTR (post-increment and pre-decrement) ......................................... 4-624.55 VMAX, VMIN, VPMAX, and VPMIN ....................................................................... 4-634.56 VMAXNM, VMINNM (Advanced SIMD) ................................................................. 4-644.57 VMAXNM, VMINNM (floating-point) ...................................................................... 4-654.58 VMOV .................................................................................................................... 4-664.59 VMOV, VMVN (immediate) .................................................................................... 4-674.60 VMOV, VMVN (register) ........................................................................................ 4-684.61 VMOV (between two ARM registers and an extension register) ........................... 4-694.62 VMOV (between an ARM register and an Advanced SIMD scalar) ....................... 4-704.63 VMOV (between one ARM register and single precision floating-point register) ... 4-714.64 VMOV2 .................................................................................................................. 4-724.65 VMOVL, V{Q}MOVN, VQMOVUN ......................................................................... 4-734.66 VMRS and VMSR .................................................................................................. 4-744.67 VMUL, VMLA, VMLS, VNMUL, VNMLA, and VNMLS ........................................... 4-754.68 VMUL{L}, VMLA{L}, and VMLS{L} ......................................................................... 4-764.69 VMUL{L}, VMLA{L}, and VMLS{L} (by scalar) ....................................................... 4-774.70 VPADD{L}, VPADAL .............................................................................................. 4-784.71 VQ{R}DMULH (by vector or by scalar) .................................................................. 4-804.72 VQ{R}SHR{U}N (by immediate) ............................................................................. 4-814.73 VQDMULL, VQDMLAL, and VQDMLSL (by vector or by scalar) .......................... 4-824.74 VRECPE and VRSQRTE ....................................................................................... 4-834.75 VRECPS and VRSQRTS ....................................................................................... 4-844.76 VREV ..................................................................................................................... 4-864.77 VRINT (Advanced SIMD) ....................................................................................... 4-874.78 VRINT (floating-point) ............................................................................................ 4-884.79 VSEL ...................................................................................................................... 4-894.80 VSHL, VQSHL, VQSHLU, and VSHLL (by immediate) ......................................... 4-904.81 VSLI and VSRI ....................................................................................................... 4-924.82 VSWP .................................................................................................................... 4-944.83 VTBL, VTBX .......................................................................................................... 4-954.84 VTRN ..................................................................................................................... 4-964.85 VTST ...................................................................................................................... 4-974.86 VUZP, VZIP ........................................................................................................... 4-98

    Chapter 5 A64 General Instructions5.1 A64 general instructions in alphabetical order ......................................................... 5-25.2 Register restrictions for A64 instructions ................................................................. 5-85.3 ADC ......................................................................................................................... 5-95.4 ADCS ..................................................................................................................... 5-105.5 ADD (extended register) ........................................................................................ 5-115.6 ADD (immediate) ................................................................................................... 5-135.7 ADD (shifted register) ............................................................................................ 5-145.8 ADDS (extended register) ...................................................................................... 5-155.9 ADDS (immediate) ................................................................................................. 5-175.10 ADDS (shifted register) .......................................................................................... 5-185.11 ADR ....................................................................................................................... 5-19

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. viiID031214 Non-Confidential

  • Contents

    5.12 ADRL pseudo-instruction ....................................................................................... 5-205.13 ADRP ..................................................................................................................... 5-215.14 AND (immediate) ................................................................................................... 5-225.15 AND (shifted register) ............................................................................................ 5-235.16 ANDS (immediate) ................................................................................................. 5-245.17 ANDS (shifted register) .......................................................................................... 5-255.18 ASR (register) ........................................................................................................ 5-265.19 ASR (immediate) ................................................................................................... 5-275.20 ASRV ..................................................................................................................... 5-285.21 AT .......................................................................................................................... 5-295.22 B.cond .................................................................................................................... 5-305.23 B ............................................................................................................................ 5-315.24 BFI ......................................................................................................................... 5-325.25 BFM ....................................................................................................................... 5-335.26 BFXIL ..................................................................................................................... 5-345.27 BIC (shifted register) .............................................................................................. 5-355.28 BICS (shifted register) ........................................................................................... 5-365.29 BL .......................................................................................................................... 5-375.30 BLR ........................................................................................................................ 5-385.31 BR .......................................................................................................................... 5-395.32 BRK ....................................................................................................................... 5-405.33 CBNZ ..................................................................................................................... 5-415.34 CBZ ........................................................................................................................ 5-425.35 CCMN (immediate) ................................................................................................ 5-435.36 CCMN (register) ..................................................................................................... 5-445.37 CCMP (immediate) ................................................................................................ 5-455.38 CCMP (register) ..................................................................................................... 5-465.39 CINC ...................................................................................................................... 5-475.40 CINV ...................................................................................................................... 5-485.41 CLREX ................................................................................................................... 5-495.42 CLS ........................................................................................................................ 5-505.43 CLZ ........................................................................................................................ 5-515.44 CMN (extended register) ....................................................................................... 5-525.45 CMN (immediate) ................................................................................................... 5-545.46 CMN (shifted register) ............................................................................................ 5-555.47 CMP (extended register) ........................................................................................ 5-565.48 CMP (immediate) ................................................................................................... 5-585.49 CMP (shifted register) ............................................................................................ 5-595.50 CNEG .................................................................................................................... 5-605.51 CRC32B, CRC32H, CRC32W, CRC32X ............................................................... 5-615.52 CRC32CB, CRC32CH, CRC32CW, CRC32CX .................................................... 5-625.53 CSEL ..................................................................................................................... 5-635.54 CSET ..................................................................................................................... 5-645.55 CSETM .................................................................................................................. 5-655.56 CSINC .................................................................................................................... 5-665.57 CSINV .................................................................................................................... 5-675.58 CSNEG .................................................................................................................. 5-685.59 DC .......................................................................................................................... 5-695.60 DCPS1 ................................................................................................................... 5-705.61 DCPS2 ................................................................................................................... 5-715.62 DCPS3 ................................................................................................................... 5-725.63 DMB ....................................................................................................................... 5-735.64 DRPS ..................................................................................................................... 5-745.65 DSB ....................................................................................................................... 5-755.66 EON (shifted register) ............................................................................................ 5-765.67 EOR (immediate) ................................................................................................... 5-775.68 EOR (shifted register) ............................................................................................ 5-785.69 ERET ..................................................................................................................... 5-795.70 EXTR ..................................................................................................................... 5-805.71 HINT ...................................................................................................................... 5-81

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. viiiID031214 Non-Confidential

  • Contents

    5.72 HLT ........................................................................................................................ 5-825.73 HVC ....................................................................................................................... 5-835.74 IC ........................................................................................................................... 5-845.75 ISB ......................................................................................................................... 5-855.76 LSL (register) ......................................................................................................... 5-865.77 LSL (immediate) .................................................................................................... 5-875.78 LSLV ...................................................................................................................... 5-885.79 LSR (register) ........................................................................................................ 5-895.80 LSR (immediate) .................................................................................................... 5-905.81 LSRV ..................................................................................................................... 5-915.82 MADD .................................................................................................................... 5-925.83 MNEG .................................................................................................................... 5-935.84 MOV (to or from SP) .............................................................................................. 5-945.85 MOV (inverted wide immediate) ............................................................................ 5-955.86 MOV (wide immediate) .......................................................................................... 5-965.87 MOV (bitmask immediate) ..................................................................................... 5-975.88 MOV (register) ....................................................................................................... 5-985.89 MOVK .................................................................................................................... 5-995.90 MOVL pseudo-instruction .................................................................................... 5-1005.91 MOVN .................................................................................................................. 5-1025.92 MOVZ .................................................................................................................. 5-1035.93 MRS ..................................................................................................................... 5-1045.94 MSR (immediate) ................................................................................................. 5-1055.95 MSR (register) ..................................................................................................... 5-1065.96 MSUB .................................................................................................................. 5-1075.97 MUL ..................................................................................................................... 5-1085.98 MVN ..................................................................................................................... 5-1095.99 NEG ..................................................................................................................... 5-1105.100 NEGS ................................................................................................................... 5-1115.101 NGC ..................................................................................................................... 5-1125.102 NGCS .................................................................................................................. 5-1135.103 NOP ..................................................................................................................... 5-1145.104 ORN (shifted register) .......................................................................................... 5-1155.105 ORR (immediate) ................................................................................................. 5-1165.106 ORR (shifted register) .......................................................................................... 5-1175.107 RBIT ..................................................................................................................... 5-1185.108 RET ...................................................................................................................... 5-1195.109 REV ..................................................................................................................... 5-1205.110 REV16 ................................................................................................................. 5-1215.111 REV32 ................................................................................................................. 5-1225.112 ROR (immediate) ................................................................................................. 5-1235.113 ROR (register) ..................................................................................................... 5-1245.114 RORV .................................................................................................................. 5-1255.115 SBC ..................................................................................................................... 5-1265.116 SBCS ................................................................................................................... 5-1275.117 SBFIZ ................................................................................................................... 5-1285.118 SBFM ................................................................................................................... 5-1295.119 SBFX ................................................................................................................... 5-1315.120 SDIV .................................................................................................................... 5-1325.121 SEV ...................................................................................................................... 5-1335.122 SEVL .................................................................................................................... 5-1345.123 SMADDL .............................................................................................................. 5-1355.124 SMC ..................................................................................................................... 5-1365.125 SMNEGL .............................................................................................................. 5-1375.126 SMSUBL .............................................................................................................. 5-1385.127 SMULH ................................................................................................................ 5-1395.128 SMULL ................................................................................................................. 5-1405.129 SUB (extended register) ...................................................................................... 5-1415.130 SUB (immediate) ................................................................................................. 5-1435.131 SUB (shifted register) .......................................................................................... 5-144

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. ixID031214 Non-Confidential

  • Contents

    5.132 SUBS (extended register) .................................................................................... 5-1455.133 SUBS (immediate) ............................................................................................... 5-1475.134 SUBS (shifted register) ........................................................................................ 5-1485.135 SVC ..................................................................................................................... 5-1495.136 SXTB ................................................................................................................... 5-1505.137 SXTH ................................................................................................................... 5-1515.138 SXTW .................................................................................................................. 5-1525.139 SYS ...................................................................................................................... 5-1535.140 SYSL .................................................................................................................... 5-1545.141 TBNZ ................................................................................................................... 5-1555.142 TBZ ...................................................................................................................... 5-1565.143 TLBI ..................................................................................................................... 5-1575.144 TST (immediate) .................................................................................................. 5-1585.145 TST (shifted register) ........................................................................................... 5-1595.146 UBFIZ .................................................................................................................. 5-1605.147 UBFM ................................................................................................................... 5-1615.148 UBFX ................................................................................................................... 5-1635.149 UDIV .................................................................................................................... 5-1645.150 UMADDL .............................................................................................................. 5-1655.151 UMNEGL ............................................................................................................. 5-1665.152 UMSUBL .............................................................................................................. 5-1675.153 UMULH ................................................................................................................ 5-1685.154 UMULL ................................................................................................................. 5-1695.155 UXTB ................................................................................................................... 5-1705.156 UXTH ................................................................................................................... 5-1715.157 WFE ..................................................................................................................... 5-1725.158 WFI ...................................................................................................................... 5-1735.159 YIELD .................................................................................................................. 5-174

    Chapter 6 A64 Data Transfer Instructions6.1 A64 data transfer instructions in alphabetical order ................................................. 6-26.2 Register restrictions for A64 instructions ................................................................. 6-56.3 LDAR ....................................................................................................................... 6-66.4 LDARB ..................................................................................................................... 6-76.5 LDARH ..................................................................................................................... 6-86.6 LDAXP ..................................................................................................................... 6-96.7 LDAXR ................................................................................................................... 6-106.8 LDAXRB ................................................................................................................ 6-116.9 LDAXRH ................................................................................................................ 6-126.10 LDNP (SIMD and FP) ............................................................................................ 6-136.11 LDNP ..................................................................................................................... 6-146.12 LDP (SIMD and FP) ............................................................................................... 6-156.13 LDP ........................................................................................................................ 6-176.14 LDPSW .................................................................................................................. 6-186.15 LDR (immediate, SIMD and FP) ............................................................................ 6-196.16 LDR (immediate) .................................................................................................... 6-216.17 LDR (literal, SIMD and FP) .................................................................................... 6-226.18 LDR (literal) ............................................................................................................ 6-236.19 LDR pseudo-instruction ......................................................................................... 6-246.20 LDR (register, SIMD and FP) ................................................................................. 6-266.21 LDR (register) ........................................................................................................ 6-286.22 LDRB (immediate) ................................................................................................. 6-296.23 LDRB (register) ...................................................................................................... 6-306.24 LDRH (immediate) ................................................................................................. 6-316.25 LDRH (register) ...................................................................................................... 6-326.26 LDRSB (immediate) ............................................................................................... 6-336.27 LDRSB (register) ................................................................................................... 6-346.28 LDRSH (immediate) ............................................................................................... 6-356.29 LDRSH (register) ................................................................................................... 6-366.30 LDRSW (immediate) .............................................................................................. 6-37

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. xID031214 Non-Confidential

  • Contents

    6.31 LDRSW (literal) ...................................................................................................... 6-386.32 LDRSW (register) .................................................................................................. 6-396.33 LDTR ..................................................................................................................... 6-406.34 LDTRB ................................................................................................................... 6-416.35 LDTRH ................................................................................................................... 6-426.36 LDTRSB ................................................................................................................. 6-436.37 LDTRSH ................................................................................................................ 6-446.38 LDTRSW ................................................................................................................ 6-456.39 LDUR (SIMD and FP) ............................................................................................ 6-466.40 LDUR ..................................................................................................................... 6-476.41 LDURB ................................................................................................................... 6-486.42 LDURH .................................................................................................................. 6-496.43 LDURSB ................................................................................................................ 6-506.44 LDURSH ................................................................................................................ 6-516.45 LDURSW ............................................................................................................... 6-526.46 LDXP ..................................................................................................................... 6-536.47 LDXR ..................................................................................................................... 6-546.48 LDXRB ................................................................................................................... 6-556.49 LDXRH ................................................................................................................... 6-566.50 PRFM (immediate) ................................................................................................. 6-576.51 PRFM (literal) ......................................................................................................... 6-596.52 PRFM (register) ..................................................................................................... 6-606.53 PRFUM .................................................................................................................. 6-626.54 STLR ...................................................................................................................... 6-646.55 STLRB ................................................................................................................... 6-656.56 STLRH ................................................................................................................... 6-666.57 STLXP ................................................................................................................... 6-676.58 STLXR ................................................................................................................... 6-686.59 STLXRB ................................................................................................................. 6-696.60 STLXRH ................................................................................................................. 6-706.61 STNP (SIMD and FP) ............................................................................................ 6-716.62 STNP ..................................................................................................................... 6-726.63 STP (SIMD and FP) ............................................................................................... 6-736.64 STP ........................................................................................................................ 6-756.65 STR (immediate, SIMD and FP) ............................................................................ 6-766.66 STR (immediate) .................................................................................................... 6-786.67 STR (register, SIMD and FP) ................................................................................. 6-796.68 STR (register) ........................................................................................................ 6-816.69 STRB (immediate) ................................................................................................. 6-826.70 STRB (register) ...................................................................................................... 6-836.71 STRH (immediate) ................................................................................................. 6-846.72 STRH (register) ...................................................................................................... 6-856.73 STTR ..................................................................................................................... 6-866.74 STTRB ................................................................................................................... 6-876.75 STTRH ................................................................................................................... 6-886.76 STUR (SIMD and FP) ............................................................................................ 6-896.77 STUR ..................................................................................................................... 6-906.78 STURB ................................................................................................................... 6-916.79 STURH .................................................................................................................. 6-926.80 STXP ..................................................................................................................... 6-936.81 STXR ..................................................................................................................... 6-946.82 STXRB ................................................................................................................... 6-956.83 STXRH ................................................................................................................... 6-96

    Chapter 7 A64 Floating-point Instructions7.1 A64 floating-point instructions in alphabetical order ................................................ 7-27.2 FABS (scalar) .......................................................................................................... 7-47.3 FADD (scalar) .......................................................................................................... 7-57.4 FCCMP .................................................................................................................... 7-67.5 FCCMPE .................................................................................................................. 7-7

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. xiID031214 Non-Confidential

  • Contents

    7.6 FCMP ....................................................................................................................... 7-87.7 FCMPE .................................................................................................................... 7-97.8 FCSEL ................................................................................................................... 7-107.9 FCVT ..................................................................................................................... 7-117.10 FCVTAS (scalar) .................................................................................................... 7-127.11 FCVTAU (scalar) ................................................................................................... 7-137.12 FCVTMS (scalar) ................................................................................................... 7-147.13 FCVTMU (scalar) ................................................................................................... 7-157.14 FCVTNS (scalar) ................................................................................................... 7-167.15 FCVTNU (scalar) ................................................................................................... 7-177.16 FCVTPS (scalar) .................................................................................................... 7-187.17 FCVTPU (scalar) ................................................................................................... 7-197.18 FCVTZS (scalar, fixed-point) ................................................................................. 7-207.19 FCVTZS (scalar, integer) ....................................................................................... 7-217.20 FCVTZU (scalar, fixed-point) ................................................................................. 7-227.21 FCVTZU (scalar, integer) ....................................................................................... 7-237.22 FDIV (scalar) .......................................................................................................... 7-247.23 FMADD .................................................................................................................. 7-257.24 FMAX (scalar) ........................................................................................................ 7-267.25 FMAXNM (scalar) .................................................................................................. 7-277.26 FMIN (scalar) ......................................................................................................... 7-287.27 FMINNM (scalar) ................................................................................................... 7-297.28 FMOV (register) ..................................................................................................... 7-307.29 FMOV (general) ..................................................................................................... 7-317.30 FMOV (scalar, immediate) ..................................................................................... 7-327.31 FMSUB .................................................................................................................. 7-337.32 FMUL (scalar) ........................................................................................................ 7-347.33 FNEG (scalar) ........................................................................................................ 7-357.34 FNMADD ............................................................................................................... 7-367.35 FNMSUB ................................................................................................................ 7-377.36 FNMUL .................................................................................................................. 7-387.37 FRINTA (scalar) ..................................................................................................... 7-397.38 FRINTI (scalar) ...................................................................................................... 7-407.39 FRINTM (scalar) .................................................................................................... 7-417.40 FRINTN (scalar) ..................................................................................................... 7-427.41 FRINTP (scalar) ..................................................................................................... 7-437.42 FRINTX (scalar) ..................................................................................................... 7-447.43 FRINTZ (scalar) ..................................................................................................... 7-457.44 FSQRT (scalar) ...................................................................................................... 7-467.45 FSUB (scalar) ........................................................................................................ 7-477.46 SCVTF (scalar, fixed-point) ................................................................................... 7-487.47 SCVTF (scalar, integer) ......................................................................................... 7-497.48 UCVTF (scalar, fixed-point) ................................................................................... 7-507.49 UCVTF (scalar, integer) ......................................................................................... 7-51

    Chapter 8 A64 Advanced SIMD Scalar Instructions8.1 A64 Advanced SIMD scalar instructions in alphabetical order ................................ 8-28.2 ABS (scalar) ............................................................................................................. 8-78.3 ADD (scalar) ............................................................................................................ 8-88.4 ADDP (scalar) .......................................................................................................... 8-98.5 CMEQ (scalar, register) ......................................................................................... 8-108.6 CMEQ (scalar, zero) .............................................................................................. 8-118.7 CMGE (scalar, register) ......................................................................................... 8-128.8 CMGE (scalar, zero) .............................................................................................. 8-138.9 CMGT (scalar, register) ......................................................................................... 8-148.10 CMGT (scalar, zero) .............................................................................................. 8-158.11 CMHI (scalar, register) ........................................................................................... 8-168.12 CMHS (scalar, register) ......................................................................................... 8-178.13 CMLE (scalar, zero) ............................................................................................... 8-188.14 CMLT (scalar, zero) ............................................................................................... 8-19

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. xiiID031214 Non-Confidential

  • Contents

    8.15 CMTST (scalar) ..................................................................................................... 8-208.16 DUP (scalar, element) ........................................................................................... 8-218.17 FABD (scalar) ........................................................................................................ 8-228.18 FACGE (scalar) ..................................................................................................... 8-238.19 FACGT (scalar) ...................................................................................................... 8-248.20 FADDP (scalar) ...................................................................................................... 8-258.21 FCMEQ (scalar, register) ....................................................................................... 8-268.22 FCMEQ (scalar, zero) ............................................................................................ 8-278.23 FCMGE (scalar, register) ....................................................................................... 8-288.24 FCMGE (scalar, zero) ............................................................................................ 8-298.25 FCMGT (scalar, register) ....................................................................................... 8-308.26 FCMGT (scalar, zero) ............................................................................................ 8-318.27 FCMLE (scalar, zero) ............................................................................................. 8-328.28 FCMLT (scalar, zero) ............................................................................................. 8-338.29 FCVTAS (scalar) .................................................................................................... 8-348.30 FCVTAU (scalar) ................................................................................................... 8-358.31 FCVTMS (scalar) ................................................................................................... 8-368.32 FCVTMU (scalar) ................................................................................................... 8-378.33 FCVTNS (scalar) ................................................................................................... 8-388.34 FCVTNU (scalar) ................................................................................................... 8-398.35 FCVTPS (scalar) .................................................................................................... 8-408.36 FCVTPU (scalar) ................................................................................................... 8-418.37 FCVTXN (scalar) ................................................................................................... 8-428.38 FCVTZS (scalar, fixed-point) ................................................................................. 8-438.39 FCVTZS (scalar, integer) ....................................................................................... 8-448.40 FCVTZU (scalar, fixed-point) ................................................................................. 8-458.41 FCVTZU (scalar, integer) ....................................................................................... 8-468.42 FMAXNMP (scalar) ................................................................................................ 8-478.43 FMAXP (scalar) ..................................................................................................... 8-488.44 FMINNMP (scalar) ................................................................................................. 8-498.45 FMINP (scalar) ....................................................................................................... 8-508.46 FMLA (scalar, by element) ..................................................................................... 8-518.47 FMLS (scalar, by element) ..................................................................................... 8-528.48 FMUL (scalar, by element) .................................................................................... 8-538.49 FMULX (scalar, by element) .................................................................................. 8-548.50 FMULX (scalar) ...................................................................................................... 8-558.51 FRECPE (scalar) ................................................................................................... 8-568.52 FRECPS (scalar) ................................................................................................... 8-578.53 FRECPX (scalar) ................................................................................................... 8-588.54 FRSQRTE (scalar) ................................................................................................. 8-598.55 FRSQRTS (scalar) ................................................................................................. 8-608.56 MOV (scalar) .......................................................................................................... 8-618.57 NEG (scalar) .......................................................................................................... 8-628.58 SCVTF (scalar, fixed-point) ................................................................................... 8-638.59 SCVTF (scalar, integer) ......................................................................................... 8-648.60 SHL (scalar) ........................................................................................................... 8-658.61 SLI (scalar) ............................................................................................................ 8-668.62 SQABS (scalar) ..................................................................................................... 8-678.63 SQADD (scalar) ..................................................................................................... 8-688.64 SQDMLAL (scalar, by element) ............................................................................. 8-698.65 SQDMLAL (scalar) ................................................................................................. 8-708.66 SQDMLSL (scalar, by element) ............................................................................. 8-718.67 SQDMLSL (scalar) ................................................................................................. 8-728.68 SQDMULH (scalar, by element) ............................................................................ 8-738.69 SQDMULH (scalar) ................................................................................................ 8-748.70 SQDMULL (scalar, by element) ............................................................................. 8-758.71 SQDMULL (scalar) ................................................................................................ 8-768.72 SQNEG (scalar) ..................................................................................................... 8-778.73 SQRDMULH (scalar, by element) .......................................................................... 8-788.74 SQRDMULH (scalar) ............................................................................................. 8-79

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. xiiiID031214 Non-Confidential

  • Contents

    8.75 SQRSHL (scalar) ................................................................................................... 8-808.76 SQRSHRN (scalar) ................................................................................................ 8-818.77 SQRSHRUN (scalar) ............................................................................................. 8-828.78 SQSHL (scalar, immediate) ................................................................................... 8-838.79 SQSHL (scalar, register) ........................................................................................ 8-848.80 SQSHLU (scalar) ................................................................................................... 8-858.81 SQSHRN (scalar) .................................................................................................. 8-868.82 SQSHRUN (scalar) ................................................................................................ 8-878.83 SQSUB (scalar) ..................................................................................................... 8-888.84 SQXTN (scalar) ..................................................................................................... 8-898.85 SQXTUN (scalar) ................................................................................................... 8-908.86 SRI (scalar) ............................................................................................................ 8-918.87 SRSHL (scalar) ...................................................................................................... 8-928.88 SRSHR (scalar) ..................................................................................................... 8-938.89 SRSRA (scalar) ..................................................................................................... 8-948.90 SSHL (scalar) ........................................................................................................ 8-958.91 SSHR (scalar) ........................................................................................................ 8-968.92 SSRA (scalar) ........................................................................................................ 8-978.93 SUB (scalar) .......................................................................................................... 8-988.94 SUQADD (scalar) .................................................................................................. 8-998.95 UCVTF (scalar, fixed-point) ................................................................................. 8-1008.96 UCVTF (scalar, integer) ....................................................................................... 8-1018.97 UQADD (scalar) ................................................................................................... 8-1028.98 UQRSHL (scalar) ................................................................................................. 8-1038.99 UQRSHRN (scalar) .............................................................................................. 8-1048.100 UQSHL (scalar, immediate) ................................................................................. 8-1058.101 UQSHL (scalar, register) ..................................................................................... 8-1068.102 UQSHRN (scalar) ................................................................................................ 8-1078.103 UQSUB (scalar) ................................................................................................... 8-1088.104 UQXTN (scalar) ................................................................................................... 8-1098.105 URSHL (scalar) .................................................................................................... 8-1108.106 URSHR (scalar) ................................................................................................... 8-1118.107 URSRA (scalar) ................................................................................................... 8-1128.108 USHL (scalar) ...................................................................................................... 8-1138.109 USHR (scalar) ...................................................................................................... 8-1148.110 USQADD (scalar) ................................................................................................ 8-1158.111 USRA (scalar) ...................................................................................................... 8-116

    Chapter 9 A64 Advanced SIMD Vector Instructions9.1 A64 Advanced SIMD vector instructions in alphabetical order ................................ 9-29.2 ABS (vector) .......................................................................................................... 9-129.3 ADD (vector) .......................................................................................................... 9-139.4 ADDHN, ADDHN2 (vector) .................................................................................... 9-149.5 ADDP (vector) ........................................................................................................ 9-159.6 ADDV (vector) ........................................................................................................ 9-169.7 AND (vector) .......................................................................................................... 9-179.8 BIC (vector, immediate) ......................................................................................... 9-189.9 BIC (vector, register) .............................................................................................. 9-199.10 BIF (vector) ............................................................................................................ 9-209.11 BIT (vector) ............................................................................................................ 9-219.12 BSL (vector) ........................................................................................................... 9-229.13 CLS (vector) ........................................................................................................... 9-239.14 CLZ (vector) ........................................................................................................... 9-249.15 CMEQ (vector, register) ......................................................................................... 9-259.16 CMEQ (vector, zero) .............................................................................................. 9-269.17 CMGE (vector, register) ......................................................................................... 9-279.18 CMGE (vector, zero) .............................................................................................. 9-289.19 CMGT (vector, register) ......................................................................................... 9-299.20 CMGT (vector, zero) .............................................................................................. 9-309.21 CMHI (vector, register) .......................................................................................... 9-31

    ARM DUI 0802A Copyright © 2014 ARM. All rights reserved. xivID031214 Non-Confidential

  • Contents

    9.22 CMHS (vector, register) ......................................................................................... 9-329.23 CMLE (vector, zero) ............................................................................................... 9-339.24 CMLT (vector, zero) ............................................................................................... 9-349.25 CMTST (vector) ..................................................................................................... 9-359.26 CNT (vector) .......................................................................................................... 9-369.27 DUP (vector, element) ........................................................................................... 9-379.28 DUP (vector) (general) ........................................................................................... 9-389.29 EOR (vector) .......................................................................................................... 9-399.30 EXT (vector) ..........................................................................................