Branch And Exchange (Bx); Instruction Cycle Times; Assembler Syntax; Using R15 As An Operand - Samsung S3C2501X User Manual

32-bit risc microprocessor
Table of Contents

Advertisement

S3C2501X

3.3 BRANCH AND EXCHANGE (BX)

This instruction is only executed if the condition is true. The various conditions are defined in Table 3-2.
This instruction performs a branch by copying the contents of a general register, Rn, into the program counter,
PC. The branch causes a pipeline flush and refill from the address specified by Rn. This instruction also permits
the instruction set to be exchanged. When the instruction is executed, the value of Rn[0] determines whether the
instruction stream will be decoded as ARM or THUMB instructions.
31
28
27
0 0
Cond

3.3.1 INSTRUCTION CYCLE TIMES

The BX instruction takes 2S + 1N cycles to execute, where S and N are defined as sequential (S-cycle) and non-
sequential (N-cycle), respectively.

3.3.2 ASSEMBLER SYNTAX

BX - branch and exchange.
BX {cond} Rn
{cond}
Two character condition mnemonic. See Table 3-2.
Rn
is an expression evaluating to a valid register number.

3.3.3 USING R15 AS AN OPERAND

If R15 is used as an operand, the behaviour is undefined.
24
23
20
19
0
1
0 0
1
0
1 1
[3:0] Operand Register
If bit0 of Rn = 1, subsequent instructions decoded as THUMB instructions
If bit0 of Rn =0, subsequent instructions decoded as ARM instructions
[31:28] Condition Field
Figure 3-2. Branch and Exchange Instructions
16
15
12
11
1
1
1 1
1
1
1 1
INSTRUCTION SET
8 7
4 3
1
1
0 0
0
1
Rn
0
3-5

Advertisement

Table of Contents
loading

Table of Contents