3.2.79. c15, BTB array operations

The purpose of the Branch Target Buffer (BTB) array operations is to:

The BTB array operation is accessible in secure privileged modes only.

Figure 3.77 shows the bit arrangement of the BTB array read operation.

Figure 3.77. BTB array read operation format


Figure 3.78 shows the bit arrangement of the BTB array write operation.

Figure 3.78. BTB array write operation format


To write one entry in the instruction side BTB array, for example:

LDR R0, =0x01234567;            
MCR p15, 0, R0, c15, c1, 0;     Move R0 to I-L1 Data 0 Register
LDR R2, =0x0DDFFFFF;            
MCR p15, 0, R2, c15, c1, 1;     Move R0 to I-L1 Data 1 Register
LDR R1, =0x40000408;            
MCR p15, 0, R1, c15, c5, 3;     Write I-L1 Data 0 or 1 Register to BTB

To read one entry in instruction side BTB array, for example:

LDR R1, =0x40000408;            
MCR p15, 0, R1, c15, c7, 3;     Read BTB into I-L1 Data 0 or 1 Register
MRC p15, 0, R0, c15, c1, 0;     Move I-L1 Data 0 Register to R0
MRC p15, 0, R2, c15, c1, 1;     Move I-L1 Data 1 Register to R2
Copyright © 2006-2009 ARM Limited. All rights reserved.ARM DDI 0344I
Non-Confidential