IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 游戏开发 -> [011] [ARM-Cortex-M3/4] CM3指令集与CMSIS函数汇总 -> 正文阅读

[游戏开发][011] [ARM-Cortex-M3/4] CM3指令集与CMSIS函数汇总

ARM
Contents
指令集
CMSIS函数··

1 指令集

MnemonicOperandsBrief descriptionFlagsSee
ADC, ADCS{Rd,} Rn, Op2Add with CarryN,Z,C,VADD, ADC, SUB, SBC, and RSB
ADD, ADDS{Rd,} Rn, Op2AddN,Z,C,VADD, ADC, SUB, SBC, and RSB
ADD, ADDW{Rd,} Rn, #imm12AddN,Z,C,VADD, ADC, SUB, SBC, and RSB
ADRRd, labelLoad PC-relative Address-ADR
AND, ANDS{Rd,} Rn, Op2Logical ANDN,Z,CAND, ORR, EOR, BIC, and ORN
ASR, ASRSRd, Rm, <Rs|#n>Arithmetic Shift RightN,Z,CASR, LSL, LSR, ROR, and RRX
BlabelBranch-B, BL, BX, and BLX
BFCRd, #lsb, #widthBit Field Clear-BFC and BFI
BFIRd, Rn, #lsb, #widthBit Field Insert-BFC and BFI
BIC, BICS{Rd,} Rn, Op2Bit ClearN,Z,CAND, ORR, EOR, BIC, and ORN
BKPT#immBreakpoint-BKPT
BLlabelBranch with Link-B, BL, BX, and BLX
BLXRmBranch indirect with Link-B, BL, BX, and BLX
BXRmBranch indirect-B, BL, BX, and BLX
CBNZRn, labelCompare and Branch if Non Zero-CBZ and CBNZ
CBZRn, labelCompare and Branch if Zero-CBZ and CBNZ
CLREX-Clear Exclusive-CLREX
CLZRd, RmCount Leading Zeros-CLZ
CMNRn, Op2Compare NegativeN,Z,C,VCMP and CMN
CMPRn, Op2CompareN,Z,C,VCMP and CMN
CPSIDiChange Processor State, Disable Interrupts-CPS
CPSIEiChange Processor State, Enable Interrupts-CPS
DMB-Data Memory Barrier-DMB
DSB-Data Synchronization Barrier-DSB
EOR, EORS{Rd,} Rn, Op2Exclusive ORN,Z,CAND, ORR, EOR, BIC, and ORN
ISB-Instruction Synchronization Barrier-ISB
IT-If-Then condition block-IT
LDMRn{!}, reglistLoad Multiple registers, increment after-LDM and STM
LDMDB, LDMEARn{!}, reglistLoad Multiple registers, decrement before-LDM and STM
LDMFD, LDMIARn{!}, reglistLoad Multiple registers, increment after-LDM and STM
LDRRt, [Rn, #offset]Load Register with word-Memory access instructions
LDRB, LDRBTRt, [Rn, #offset]Load Register with byte-Memory access instructions
LDRDRt, Rt2, [Rn, #offset]Load Register with two bytes-LDR and STR, immediate offset
LDREXRt, [Rn, #offset]Load Register Exclusive-LDREX and STREX
LDREXBRt, [Rn]Load Register Exclusive with Byte-LDREX and STREX
LDREXHRt, [Rn]Load Register Exclusive with Halfword-LDREX and STREX
LDRH, LDRHTRt, [Rn, #offset]Load Register with Halfword-Memory access instructions
LDRSB, LDRSBTRt, [Rn, #offset]Load Register with Signed Byte-Memory access instructions
LDRSH, LDRSHTRt, [Rn, #offset]Load Register with Signed Halfword-Memory access instructions
LDRTRt, [Rn, #offset]Load Register with word-Memory access instructions
LSL, LSLSRd, Rm, <Rs|#n>Logical Shift LeftN,Z,CASR, LSL, LSR, ROR, and RRX
LSR, LSRSRd, Rm, <Rs|#n>Logical Shift RightN,Z,CASR, LSL, LSR, ROR, and RRX
MLARd, Rn, Rm, RaMultiply with Accumulate, 32-bit result-MUL, MLA, and MLS
MLSRd, Rn, Rm, RaMultiply and Subtract, 32-bit result-MUL, MLA, and MLS
MOV, MOVSRd, Op2MoveN,Z,CMOV and MVN
MOVTRd, #imm16Move Top-MOVT
MOVW, MOVRd, #imm16Move 16-bit constantN,Z,CMOV and MVN
MRSRd, spec_regMove from Special Register to general register-MRS
MSRspec_reg, RmMove from general register to Special RegisterN,Z,C,VMSR
MUL, MULS{Rd,} Rn, RmMultiply, 32-bit resultN,ZMUL, MLA, and MLS
MVN, MVNSRd, Op2Move NOTN,Z,CMOV and MVN
NOP-No Operation-NOP
ORN, ORNS{Rd,} Rn, Op2Logical OR NOTN,Z,CAND, ORR, EOR, BIC, and ORN
ORR, ORRS{Rd,} Rn, Op2Logical ORN,Z,CAND, ORR, EOR, BIC, and ORN
POPreglistPop registers from stack-PUSH and POP
PUSHreglistPush registers onto stack-PUSH and POP
RBITRd, RnReverse Bits-REV, REV16, REVSH, and RBIT
REVRd, RnReverse byte order in a word-REV, REV16, REVSH, and RBIT
REV16Rd, RnReverse byte order in each halfword-REV, REV16, REVSH, and RBIT
REVSHRd, RnReverse byte order in bottom halfword and sign extend-REV, REV16, REVSH, and RBIT
ROR, RORSRd, Rm, <Rs|#n>Rotate RightN,Z,CASR, LSL, LSR, ROR, and RRX
RRX, RRXSRd, RmRotate Right with ExtendN,Z,CASR, LSL, LSR, ROR, and RRX
RSB, RSBS{Rd,} Rn, Op2Reverse SubtractN,Z,C,VADD, ADC, SUB, SBC, and RSB
SBC, SBCS{Rd,} Rn, Op2Subtract with CarryN,Z,C,VADD, ADC, SUB, SBC, and RSB
SBFXRd, Rn, #lsb, #widthSigned Bit Field Extract-SBFX and UBFX
SDIV{Rd,} Rn, RmSigned Divide-SDIV and UDIV
SEV-Send Event-SEV
SMLALRdLo, RdHi, Rn, RmSigned Multiply with Accumulate (32 x 32 + 64), 64-bit result-UMULL, UMLAL, SMULL, and SMLAL
SMULLRdLo, RdHi, Rn, RmSigned Multiply (32 x 32), 64-bit result-UMULL, UMLAL, SMULL, and SMLAL
SSATRd, #n, Rm {,shift #s}Signed SaturateQSSAT and USAT
STMRn{!}, reglistStore Multiple registers, increment after-LDM and STM
STMDB, STMEARn{!}, reglistStore Multiple registers, decrement before-LDM and STM
STMFD, STMIARn{!}, reglistStore Multiple registers, increment after-LDM and STM
STRRt, [Rn, #offset]Store Register word-Memory access instructions
STRB, STRBTRt, [Rn, #offset]Store Register byte-Memory access instructions
STRDRt, Rt2, [Rn, #offset]Store Register two words-LDR and STR, immediate offset
STREXRd, Rt, [Rn, #offset]Store Register Exclusive-LDREX and STREX
STREXBRd, Rt, [Rn]Store Register Exclusive Byte-LDREX and STREX
STREXHRd, Rt, [Rn]Store Register Exclusive Halfword-LDREX and STREX
STRH, STRHTRt, [Rn, #offset]Store Register Halfword-Memory access instructions
STRTRt, [Rn, #offset]Store Register word-Memory access instructions
SUB, SUBS{Rd,} Rn, Op2SubtractN,Z,C,VADD, ADC, SUB, SBC, and RSB
SUB, SUBW{Rd,} Rn, #imm12SubtractN,Z,C,VADD, ADC, SUB, SBC, and RSB
SVC#immSupervisor Call-SVC
SXTB{Rd,} Rm {,ROR #n}Sign extend a byte-SXT and UXT
SXTH{Rd,} Rm {,ROR #n}Sign extend a halfword-SXT and UXT
TBB[Rn, Rm]Table Branch Byte-TBB and TBH
TBH[Rn, Rm, LSL #1]Table Branch Halfword-TBB and TBH
TEQRn, Op2Test EquivalenceN,Z,CTST and TEQ
TSTRn, Op2TestN,Z,CTST and TEQ
UBFXRd, Rn, #lsb, #widthUnsigned Bit Field Extract-SBFX and UBFX
UDIV{Rd,} Rn, RmUnsigned Divide-SDIV and UDIV
UMLALRdLo, RdHi, Rn, RmUnsigned Multiply with Accumulate (32 x 32 + 64), 64-bit result-UMULL, UMLAL, SMULL, and SMLAL
UMULLRdLo, RdHi, Rn, RmUnsigned Multiply (32 x 32), 64-bit result-UMULL, UMLAL, SMULL, and SMLAL
USATRd, #n, Rm {,shift #s}Unsigned SaturateQSSAT and USAT
UXTB{Rd,} Rm {,ROR #n}Zero extend a Byte-SXT and UXT
UXTH{Rd,} Rm {,ROR #n}Zero extend a Halfword-SXT and UXT
WFE-Wait For Event-WFE
WFI-Wait For Interrupt-WFI

2 CMSIS函数

InstructionCMSIS function
CPSIE Ivoid __enable_irq(void)
CPSID Ivoid __disable_irq(void)
CPSIE Fvoid __enable_fault_irq(void)
CPSID Fvoid __disable_fault_irq(void)
ISBvoid __ISB(void)
DSBvoid __DSB(void)
DMBvoid __DMB(void)
REVuint32_t __REV(uint32_t int value)
REV16uint32_t __REV16(uint32_t int value)
REVSHuint32_t __REVSH(uint32_t int value)
RBITuint32_t __RBIT(uint32_t int value)
SEVvoid __SEV(void)
WFEvoid __WFE(void)
WFIvoid __WFI(void)
▲ CMSIS functions to generate some Cortex-M3 instructions

使用`MRS`和`MSR`指令访问特殊寄存器的函数:
Special registerAccessCMSIS function
PRIMASKReaduint32_t __get_PRIMASK (void)
Writevoid __set_PRIMASK (uint32_t value)
FAULTMASKReaduint32_t __get_FAULTMASK(void)
Writevoid __set_FAULTMASK (uint32_t value)
BASEPRIReaduint32_t __get_BASEPRI (void)
Writevoid __set_BASEPRI (uint32_t value)
CONTROLReaduint32_t __get_CONTROL (void)
Writevoid __set_CONTROL (uint32_t value)
MSPReaduint32_t __get_MSP (void)
Writevoid __set_MSP (uint32_t TopOfMainStack)
PSPReaduint32_t __get_PSP (void)
Writevoid __set_PSP (uint32_t TopOfProcStack)
▲ CMSIS functions to access the special registers

END

  游戏开发 最新文章
6、英飞凌-AURIX-TC3XX: PWM实验之使用 GT
泛型自动装箱
CubeMax添加Rtthread操作系统 组件STM32F10
python多线程编程:如何优雅地关闭线程
数据类型隐式转换导致的阻塞
WebAPi实现多文件上传,并附带参数
from origin ‘null‘ has been blocked by
UE4 蓝图调用C++函数(附带项目工程)
Unity学习笔记(一)结构体的简单理解与应用
【Memory As a Programming Concept in C a
上一篇文章      下一篇文章      查看所有文章
加:2022-03-21 21:25:48  更:2022-03-21 21:30:04 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2025年1日历 -2025/1/16 18:45:52-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码