Rev. 1.50, 10/04, page 357 of 448
union {
float f;
int l;
} dstf,srcf;
union {
long d;
int l[2];
} dstd,srcd;
union { /* “long double” format: */
long double x; /* 1-bit sign */
int l[4]; /* 15-bit exponent */
} dstx; /* 112-bit mantissa */
if(FPSCR_PR == 0) {
if(type == FADD) srcf.f = FR[m];
else srcf.f = -FR[m];
dstd.d = FR[n]; /*
Conversion from single-precision to double-precision
*/
dstd.d += srcf.f;
if(((dstd.d == FR[n]) && (srcf.f != 0.0)) ||
((dstd.d == srcf.f) && (FR[n] != 0.0))) {
set_I();
if(sign_of(m)^ sign_of(n)) {
dstd.l[1] -= 1;
if(dstd.l[1] == 0xffffffff) dstd.l[0] -= 1;
}
}
if(dstd.l[1] & 0x1fffffff) set_I();
dstf.f += srcf.f; /*
Round to nearest
*/
if(FPSCR_RM == 1) {
dstd.l[1] &= 0xe0000000; /*
Round to zero
*/
dstf.f = dstd.d;
}
check_single_exception(&FR[n],dstf.f);
} else {
Содержание 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 ...