ARM assembly language series based on Android: ARM assembly language introduction

Publisher:温暖阳光Latest update time:2016-07-01 Source: eefocusKeywords:Android Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Chapter List

Part 1: Introduction to ARM assembly language 
Part 2: Analysis of the process of generating ARM assembly programs from C/C++ programs Part 
3: ARM assembly language program structure 
Part 4: Addressing methods of ARM processors 
Part 5: ARM instruction set and Thumb instruction set 
Part 6: NEON instruction set and VFP instruction set

This is the opening article of the blog. Here I will first introduce the general classification and functions of ARM processors.

1. ARM processor and ARM instruction set

The entire ARM processor is divided into three parts:

  • Classic
  • Embedded
  • Application

Classic is called the classic series.

ARM1~ARM11 have always been named with numbers, and ARM12 and later have been named Cortex. Cortex has the following categories:

  • Cortex-A: Widely used in smartphones, netbooks, e-books, and digital TVs.
  • Cortex-M: Used in the field of microcontrollers, this series is characterized by high energy efficiency and low power consumption.
  • Cortex-R: Used to support deeply embedded real-time applications, this series is characterized by low power consumption, good interrupt behavior, excellent performance and high compatibility with existing platforms.

Although there are many versions of ARM processors, many models of ARM processors are compatible with a set of ARM instruction sets. The corresponding relationship between ARM architecture and ARM processors is shown in the following figure:

ARM assembly language series based on Android: ARM assembly language introduction

The technologies involved in the above figure are briefly mentioned here:

  • VFP: Provides floating-point arithmetic capabilities for ARM processors.
  • Jazelle: Allows accelerated execution of Java bytecode on certain hardware architectures.
  • SIMD: SIMD instruction set.
  • TrustZone: Security control to protect products from external malicious attacks.
  • NEON: NEON is an extension of the SIMD architecture. NEON takes fewer instruction cycles to execute than traditional SIMD.

Android initially chose ARM as the processor architecture for platform devices and made special optimizations. After the development of Android 4.1, it has fully supported processors of three architectures: ARM, x86 and MIPS.

2. Working mode and working status of ARM processor

2.1 ARM processor working mode

The ARM processor has a total of 37 32-bit processors, including 31 general registers and 6 status registers. The ARM processor supports 7 operating modes, namely:

  • User mode (usr): The normal program running state of the ARM processor.
  • Fast interrupt mode (FLQ): used for high-speed data transmission or channel processing.
  • External interrupt mode (irq): used for general interrupt processing.
  • Supervisor mode (svc): The protection mode used by the operating system.
  • Data access termination mode (abt): This mode is entered when data or instruction prefetching is terminated and can be used for virtual storage and storage protection.
  • System mode (sys): runs very short-lived operating system tasks.
  • Undefined instruction termination mode (und): This mode is entered when an undefined instruction is executed.

2.2 Working status of ARM processor

  • ARM state: Execute 32-bit word-aligned ARM instructions.
  • Thumb state: executes 16-bit word-aligned ARM instructions.

The naming of registers in Thumb state is slightly different from that in ARM. Their corresponding relationships are as follows:

  • R0~R7 in Thumb state are the same as R0~R7 in ARM state.
  • The CPSR in Thumb state is the same as the CPSR in ARM state.
  • FP in Thumb state is the same as R11 in ARM state.
  • IP in Thumb state is the same as R12 in ARM state.
  • SP in Thumb state is the same as R13 in ARM state.
  • LR in Thumb state is the same as R14 in ARM state.
  • The PC in Thumb state is the same as R15 in ARM state.
Keywords:Android Reference address:ARM assembly language series based on Android: ARM assembly language introduction

Previous article:ARM assembly language series based on Android 4: addressing mode of ARM processor
Next article:ARM assembly language series based on Android II: C/C++ program generates ARM assembly program

Recommended ReadingLatest update time:2024-11-23 13:50

Linux system learning 1-8: The first ARM bare board program and extension
Section 001: Auxiliary Line 1_Hardware Knowledge_LED Schematic Diagram Steps to light up the LED:  1. Look at the schematic diagram and determine the pins that control the LED  Use the pin output through the main chip: 3.3V lights up the LED; 0V turns off the LED.  -Connection:  Insufficient pin drive capability: Us
[Microcontroller]
Linux system learning 1-8: The first ARM bare board program and extension
Design of smart home monitoring system based on ARM
 1 Introduction   Information technology has been widely used in all aspects of people's lives. People have higher and higher requirements for their family living environment. Smart homes have emerged. Compared with ordinary homes, smart homes not only have traditional living functions, but also provide comfortable, s
[Microcontroller]
Design of smart home monitoring system based on ARM
Data communication method between ARM and DSP in embedded machine vision system
DSP has powerful computing and processing capabilities for digital signals and numerical algorithms, so it is widely used in signal acquisition and processing, but it does not have an advantage in task management, real-time control, human-computer interaction, etc. ARM microcontrollers have powerful control function
[Embedded]
Data communication method between ARM and DSP in embedded machine vision system
A brief discussion on timers in ARM
The LPC21XX/22XX has two 32-bit timers: Timer 0 and Timer 1. These two timers are identical except for the peripheral base address. They have the following features: 1. Two 32-bit timer/counters, each with a programmable 32-bit prescaler. 2. With up to 4 capture channels, the instantaneous value of the timer can be
[Microcontroller]
Interrupt Control Method of Touch Screen in ARM Embedded System
With the improvement of embedded microprocessor performance, more and more peripheral interface devices are integrated, and the peripheral devices and processors mostly communicate in the form of interrupts. Even in the absence of an operating system, it is often necessary to dynamically load the interrupt processin
[Microcontroller]
Interrupt Control Method of Touch Screen in ARM Embedded System
Create nfs file system on arm linux
NFS file system is established (host IP address is 192.168.3.170, development board IP address is 192.168.3.100)  1.Install nfs-kernel-server  # sudo aptitude install nfs-kernel-server  2. Set up the host shared directory. I will directly use the root directory. Edit the file /etc/exports and add the following conte
[Microcontroller]
ARM11 S3C6410 address table
Reference: 1) "ARM1176 JZF-S Technical Reference Manual": Chapter 3 System Control Coprocessor Chapter 6 Memory Management Unit 2) u-boot source code: u-boot-xxx/cpu/s3c64xx/start.S u-boot-xxx/board/samsung/smdk6410/lowlevel_init.S 1. Brief description of ARMv6 MMU 1) MMU is controlled by coprocessor CP15; 2) MMU func
[Microcontroller]
Learn ARM development (10)
/* Call all initialization functions in a loop*/ for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { if ((*init_fnc_ptr)() != 0) { /* When each function fails to initialize, it will hang here. */ hang(); } } Last time, we talked about calling all initialization fun
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号