Rev. 1.50, 10/04, page 407 of 448
10.3.18 FRCHG (FR-bit Change): Floating-Point Instruction
PR
Format
Operation
Instruction Code
Cycle
T Bit
0
FRCHG
~FPSCR.FR
→
FPSCR.FR
1111101111111101
1 —
1 —
—
—
—
—
Description:
This instruction inverts the FR bit in floating-point register FPSCR. When the FR bit
in FPSCR is changed, FR0 to FR15 in FPR0_BANK0 to FPR15_BANK0 and FPR0_BANK1 to
FPR15_BANK1 become XR0 to XR15, and XR0 to XR15 become FR0 to FR15. When
FPSCR.FR = 0, FPR0_BANK0 to FPR15_BANK0 correspond to FR0 to FR15, and
FPR0_BANK1 to FPR15_BANK1 correspond to XR0 to XR15. When FPSCR.FR = 1,
FPR0_BANK1 to FPR15_BANK1 correspond to FR0 to FR15, and FPR0_BANK0 to
FPR15_BANK0 correspond to XR0 to XR15.
Notes:
None
Operation:
void FRCHG() /* FRCHG */
{
if(FPSCR_PR == 0){
FPSCR ^= 0x00200000; /* bit 21 */
PC += 2;
}
else undefined_operation();
}
Possible Exceptions:
None
Summary of Contents for SuperH SH-4A
Page 2: ...Rev 1 50 10 04 page ii of xx ...
Page 8: ...Rev 1 50 10 04 page viii of xx ...
Page 116: ...Rev 1 50 10 04 page 96 of 448 ...
Page 178: ...Rev 1 50 10 04 page 158 of 448 ...
Page 206: ...Rev 1 50 10 04 page 186 of 448 ...
Page 231: ...Rev 1 50 10 04 page 211 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 235: ...Rev 1 50 10 04 page 215 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 238: ...Rev 1 50 10 04 page 218 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 408: ...Rev 1 50 10 04 page 388 of 448 Possible Exceptions Inexact Not generated when FPSCR PR 1 ...
Page 446: ...Rev 1 50 10 04 page 426 of 448 ...
Page 468: ...Rev 1 50 10 04 page 448 of 448 ...
Page 471: ......
Page 472: ...SH 4A Software Manual ...