Appendix E

Assembly Instructions

This appendix lists the different assembly instructions used on ARM cores, and what architecture each instruction introduced.

ARM INSTRUCTIONS

The following is a list of ARM-state instructions, separated into various categories.

Arithmetic Instructions

Arithmetic instructions do basic mathematical calculations: addition, subtraction, multiplication, and division. These instructions are listed in Table E-1, as well as the architecture in which they were introduced.

TABLE E-1: List of Arithmetic Instructions

image
image
image

Parallel Arithmetic

Parallel arithmetic instructions are instructions that work on two or more values packed into 32-bit data. Parallel arithmetic instructions use prefixes, listed in Table E-2.

TABLE E-2: Parallel Arithmetic Prefixes

PREFIX FUNCTION
S Signed arithmetic modulo 28 or 216. Sets APSR GE flags
Q Signed saturating arithmetic
SH Signed arithmetic, halving the results
U Unsigned arithmetic modulo 28 or 216. Sets APSR GE flags
UQ Unsigned saturating arithmetic
UH Unsigned arithmetic, halving the results

Table E-3 lists parallel arithmetic instructions, their usage, and their effect.

TABLE E-3: Parallel Arithmetic Instructions ...

Get Professional Embedded ARM Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.