EasyManua.ls Logo

Renesas SuperH SH-4A - Page 233

Renesas SuperH SH-4A
472 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rev. 1.50, 10/04, page 213 of 448
Operation:
BFS(int d) /* BFS disp */
{
int disp;
unsigned int temp;
temp = PC;
if ((d&0x80)==0)
disp = (0x000000FF & d);
else disp = (0xFFFFFF00 | d);
if (T==0)
PC = PC + 4 + (disp<<1);
else PC += 4;
Delay_Slot(temp+2);
}
Example:
CLRT ;Normally T = 0
BT/S TRGET_T ;T = 0, so branch is not taken.
NOP ;
BF/S TRGET_F ;T = 0, so branch to TRGET.
ADD R0,R1 ;Executed before branch.
NOP ;
TRGET_F: ; BF/S instruction branch destination
Possible Exceptions:
Slot illegal instruction exception

Table of Contents

Related product manuals