EasyManuals Logo
Home>ST>Computer Hardware>STM32H7 Series

ST STM32H7 Series User Manual

ST STM32H7 Series
262 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #144 background imageLoading...
Page #144 background image
The STM32 Cortex-M4 instruction set PM0214
144/262 PM0214 Rev 9
BLX R0 ; Branch with link and exchange (Call) to a address stored
; in R0
3.9.6 CBZ and CBNZ
Compare and Branch on Zero, Compare and Branch on Non-Zero.
Syntax
CBZ Rn, label
CBNZ Rn, label
Where:
• ‘Rn’ is the register holding the operand.
• ‘label’ is the branch destination.
Operation
Use the CBZ or CBNZ instructions to avoid changing the condition code flags and to reduce
the number of instructions.
CBZ Rn, label does not change condition flags but is otherwise equivalent to:
CMP Rn, #0
BEQ label
CBNZ Rn, label does not change condition flags but is otherwise equivalent to:
CMP Rn, #0
BNE label
Restrictions
The restrictions are:
• Rn must be in the range of R0 to R7.
• The branch destination must be within 4 to 130 bytes after the instruction.
• These instructions must not be used inside an IT block.
Condition flags
These instructions do not change the flags.
Examples
CBZ R5, target ; Forward branch if R5 is zero
CBNZ R0, target ; Forward branch if R0 is not zero

Table of Contents

Other manuals for ST STM32H7 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32H7 Series and is the answer not in the manual?

ST STM32H7 Series Specifications

General IconGeneral
BrandST
ModelSTM32H7 Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals