The Instruction Set In Cortex-M3
The Cortex-M3 supports the Thumb-2 instruction set. This is one of the most important features of the Cortex-M3 processor because it allows 32-bit instructions and 16-bit instructions to be used together for high code density and high efficiency. It is flexible and powerful yet easy to use.
In previous ARM processors, the central processing unit (CPU) had two operation states: a 32-bit ARM state and a 16-bit Thumb state. In the ARM state, the instructions are 32 bits and can execute all supported instructions with very high performance. In the Thumb state, the instructions are 16 bits, so there is a much higher instruction code density, but the Thumb state does not have all the functionality of ARM instructions and may require more instructions to complete certain types of operations.
To get the best of both worlds, many applications have mixed ARM and Thumb codes. However, the mixed-code arrangement does not always work best. There is overhead (in terms of both execution time and instruction space, see Figure 2.7) to switch between the states, and ARM and Thumb codes might need to be compiled separately in different files. This increases the complexity of software develop- ment and reduces maximum efficiency of the CPU core.
With the introduction of the Thumb-2 instruction set, it is now possible to handle all process- ing requirements in one operation state. There is no need to switch between the two. In fact, the Cortex-M3 does not support the ARM code. Even interrupts are now handled with the Thumb state. (Previously, the ARM core entered interrupt handlers in the ARM state.) Since there is no need to switch between states, the Cortex-M3 processor has a number of advantages over traditional ARM processors, such as:
No state switching overhead, saving both execution time and instruction space
No need to separate ARM code and Thumb code source files, making software development and
maintenance easier
It’s easier to get the best efficiency and performance, in turn making it easier to write software, because there is no need to worry about switching code between ARM and Thumb to try to get the best density/performance
  
 | 
| 
 Switching between ARM Code and Thumb Code in Traditional ARM Processors Such as the ARM7. The Cortex-M3 processor has a number of interesting and powerful instructions. Here are a few examples: 
 Since the Cortex-M3 processor supports the Thumb-2 instruction set only, existing program code for ARM needs to be ported to the new architecture. Most C applications simply need to be recompiled using new compilers that support the Cortex-M3. Some assembler codes need modification and porting to use the new architecture and the new unified assembler framework. Note that not all the instructions in the Thumb-2 instruction set are implemented on the Cortex-M3. The ARMv7-M Architecture Application Level Reference Manual [Ref. 2] only requires a subset of the Thumb-2 instructions to be implemented. For example, coprocessor instructions are not supported on the Cortex-M3 (external data processing engines can be added), and Single Instruction–Multiple Data (SIMD) is not implemented on the Cortex-M3. In addition, a few Thumb instructions are not supported, such as Branch with Link and Exchange (BLX) with immediate (used to switch processor state from Thumb to ARM), a couple of change process state (CPS) instructions, and the SETEND (Set Endian) instructions, which were introduced in architecture v6. For a complete list of supported instructions, refer to Appendix A. 摘抄自:《The definitive guide to the ARM Cortex-M3》Second Edition.  | 
The Instruction Set In Cortex-M3的更多相关文章
- ARM Cortex M3(V7-M架构)硬件启动程序 一
		
Cortex-m3启动代码分析笔记 启动代码文件名是STM32F10X.S,它的作用先总结下,然后再分析. 启动代码作用一般是: 1)堆和栈的初始化: 2)中断向量表定义: 3)地址重映射及中断向量表 ...
 - ARM Cortex M3系列GPIO口介绍(工作方式探讨)
		
一.Cortex M3的GPIO口特性 在介绍GPIO口功能前,有必要先说明一下M3的结构框图,这样能够更好理解总线结构和GPIO所处的位置. Cortex M3结构框图 从图中可以看出 ...
 - ARM 架构、ARM7、ARM9、STM32、Cortex M3 M4 、51、AVR 之间有什么区别和联系?(转载自知乎)
		
ARM架构: 由英国ARM公司设计的一系列32位的RISC微处理器架构总称,现有ARMv1~ARMv8种类. ARM7: 一类采用ARMv3或ARMv4架构的,使用冯诺依曼结构的内核. ...
 - STM32学习之路入门篇之指令集及cortex——m3的存储系统
		
STM32学习之路入门篇之指令集及cortex——m3的存储系统 一.汇编语言基础 一).汇编语言:基本语法 1.汇编指令最典型的书写模式: 标号 操作码 操作数1, 操作数2,... ...
 - Implementation of Serial Wire JTAG flash programming in ARM Cortex M3 Processors
		
Implementation of Serial Wire JTAG flash programming in ARM Cortex M3 Processors The goal of the pro ...
 - 【ARM-Linux开发】ARM7 ARM9 ARM Cortex M3 M4 有什么区别
		
ARM7 ARM9 ARM Cortex M3 M4 区别 arm7 arm9 可以类比386和奔腾, 不同代,arm9相比arm7指令集和性能都有所增强,arm7和arm9都有带mmu和无mmu的版 ...
 - 【freertos】002-posix模拟器设计与cortex m3异常处理
		
目录 前言 posix 标准接口层设计 模拟器的系统心跳 模拟器的task底层实质 模拟器的任务切换原理 cortex M3/M4异常处理 双堆栈指针 双操作模式 栈帧 EXC_RETURN 前言 如 ...
 - CORTEX -M3 : Registers in depth
		
http://www.zembedded.com/cortex-m3-registers-in-depth/ Thanks for the overwhelm response you show in ...
 - ARM Cortex M3(V7-M架构)硬件启动程序 二
		
解析 STM32 的启动过程 解析STM32的启动过程 当前的嵌入式应用程序开发过程里,并且C语言成为了绝大部分场合的最佳选择.如此一来main函数似乎成为了理所当然的起点——因为C程序往往从main ...
 - stm32和cortex M3学习内核简单总结
		
1.stm32综述 2.寄存器组 3.操作模式和特权级别 4.存储器映射 5.中断和异常 6.其他 Stm32综述 这可以说是我第一款认真学习的单片机了,学完这个就要开启我通往arm9的大门了,接下来 ...
 
随机推荐
- MongoDB开发深入之三:复制
			
复制是基于操作日志oplog,相当于MySQL中的二进制日志,只记录发生改变的记录,复制是将主节点的oplog日志同步并应用到其他从节点的过程. 首先要理解两个概念:1.复制:提供冗余和高可用性:2. ...
 - ZXing生成二维码、读取二维码
			
使用谷歌的开源包ZXing maven引入如下两个包即可 <dependency> <groupId>com.google.zxing</groupId> & ...
 - jw  python 培训帮助 手册
			
#########sample 1 (如果python 遇到有问题,就求助于 help 命令,python 是 个人开发的胶水语言,因此不具备 java,c++的类的继承关系) Python hel ...
 - Xcode  导出C++项目在其他电脑执行
			
1. 先找到C++项目的可执行文件的位置 https://blog.csdn.net/qq_34759481/article/details/82700587 2. 关于存储和加载文件的目录,使用 ...
 - vue方法中传递dom对象示例
			
<div id="app"> <input type="text" v-on:keyup="onlyNum($event)" ...
 - 🐯 php项目中类的自动加载
			
主要函数:spl_autoload_register() — 注册给定的函数作为 __autoload() 的实现 将函数注册到SPL __autoload函数队列中.如果该队列中的函数尚未激活,则激 ...
 - NuxtJS实战,一个博客系统
			
前言 这个项目诞生于17年5月,距今已有两年多了,在这两年期间经历了很多变更,从简单到复杂,又从复杂到简单,并且以后一直会保持这种简单状态.最近迎来了一次更新,因此特意分享一下.虽然只有我一个人使用( ...
 - redis启动警告解决
			
vim /etc/rc.localecho never > /sys/kernel/mm/transparent_hugepage/enabled加入上面那句到/etc/rc.local,开机启 ...
 - haproxy转发真实IP给web
			
1.在haproxy.cfg中加入下面参数. option forwardfor #如果后端服务器需要获得客户端真实ip需要配置的参数,必须要放在listen模块下 2.如 ...
 - 解决net core mvc 中文乱码问题
			
在Startup 配置文件下的ConfigureServices方法中添加: services.AddSingleton(HtmlEncoder.Create(UnicodeRanges.All ...