Rev. 1.50, 10/04, page 359 of 448
union {
long double x;
int l[4];
} tmpx;
if(FPSCR_PR == 0) {
tmpd.d = FR[n]; /*
Single-precision to double-precision
*/
tmpd.d *= FR[m]; /*
Precise creation
*/
tmpf.f *= FR[m]; /*
Round to nearest
*/
if(tmpf.f != tmpd.d) set_I();
if((tmpf.f > tmpd.d) && (FPSCR_RM == 1)) {
tmpf.l -= 1; /*
Round to zero
*/
}
check_single_exception(&FR[n],tmpf.f);
} else {
tmpx.x = DR[n>>1]; /*
Single-precision to double-precision
*/
tmpx.x *= DR[m>>1]; /*
Precise creation
*/
tmpd.d *= DR[m>>1]; /*
Round to nearest
*/
if(tmpd.d != tmpx.x) set_I();
if(tmpd.d > tmpx.x) && (FPSCR_RM == 1)) {
tmpd.l[1] -= 1; /*
Round to zero
*/
if(tmpd.l[1] == 0xffffffff) tmpd.l[0] -= 1;
}
check_double_exception(&DR[n>>1], tmpd.d);
}
}
void fipr(int m,n)
{
union {
double d;
int l[2];
} mlt[4];
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 ...