Rev. 1.50, 10/04, page 376 of 448
10.3.5
FCNVSD (Floating-point Convert Single to Double Precision): Floating-Point
Instruction
PR
Format
Operation
Instruction Code
Cycle
T Bit
0 —
—
—
—
—
1
FCNVSD FPUL,DRn
(double) FPUL
→
DRn
1111nnn01010110
1
1 —
Description:
When FPSCR.PR = 1: This instruction converts the single-precision floating-point
number in FPUL to a double-precision floating-point number, and stores the result in DRn.
Notes:
None
Operation:
void FCNVSD(int n, float *FPUL){
pc += 2;
clear_cause();
case((FPSCR_PR){
0: undefined_operation(); /* reserved */
1: fcnvsd (n, *FPUL); break; /* FCNVSD */
}
}
void fcnvsd(int n, float *FPUL)
{
case(fpul_type(*FPUL)){
PZERO :
NZERO :
PINF :
NINF :
DR[n>>1] = *FPUL;
break;
DENORM : set_E();
break;
qNaN :
qnan(n);
break;
sNaN :
invalid(n);
break;
}
}
int fpul_type(int *FPUL)
{
int abs;
Содержание 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 ...