Rev. 1.50, 10/04, page 358 of 448
if(type == FADD) srcd.d = DR[m>>1];
else srcd.d = -DR[m>>1];
dstx.x = DR[n>>1];
/*
Conversion from double-precision to extended double-precision
*/
dstx.x += srcd.d;
if(((dstx.x == DR[n>>1]) && (srcd.d != 0.0)) ||
((dstx.x == srcd.d) && (DR[n>>1] != 0.0)) ) {
set_I();
if(sign_of(m)^ sign_of(n)) {
dstx.l[3] -= 1;
if(dstx.l[3] == 0xffffffff) {dstx.l[2] -= 1;
if(dstx.l[2] == 0xffffffff) {dstx.l[1] -= 1;
if(dstx.l[1] == 0xffffffff) {dstx.l[0] -= 1;}}}
}
}
if((dstx.l[2] & 0x0fffffff) || dstx.l[3]) set_I();
dst.d += srcd.d; /*
Round to nearest
*/
if(FPSCR_RM == 1) {
dstx.l[2] &= 0xf0000000; /*
Round to zero
*/
dstx.l[3] = 0x00000000;
dst.d = dstx.x;
}
check_double_exception(&DR[n>>1] ,dst.d);
}
}
void normal_fmul(int m,n)
{
union {
float f;
int l;
} tmpf;
union {
double d;
int l[2];
} tmpd;
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 ...