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
Содержание SuperH SH-4A
Страница 2: ...Rev 1 50 10 04 page ii of xx ...
Страница 8: ...Rev 1 50 10 04 page viii of xx ...
Страница 116: ...Rev 1 50 10 04 page 96 of 448 ...
Страница 178: ...Rev 1 50 10 04 page 158 of 448 ...
Страница 206: ...Rev 1 50 10 04 page 186 of 448 ...
Страница 231: ...Rev 1 50 10 04 page 211 of 448 Possible Exceptions Slot illegal instruction exception ...
Страница 235: ...Rev 1 50 10 04 page 215 of 448 Possible Exceptions Slot illegal instruction exception ...
Страница 238: ...Rev 1 50 10 04 page 218 of 448 Possible Exceptions Slot illegal instruction exception ...
Страница 408: ...Rev 1 50 10 04 page 388 of 448 Possible Exceptions Inexact Not generated when FPSCR PR 1 ...
Страница 445: ...Rev 1 50 10 04 page 425 of 448 Possible Exceptions Invalid operation Overflow Underflow Inexact ...
Страница 446: ...Rev 1 50 10 04 page 426 of 448 ...
Страница 468: ...Rev 1 50 10 04 page 448 of 448 ...
Страница 471: ......
Страница 472: ...SH 4A Software Manual ...