Rev. 1.50, 10/04, page 360 of 448
float dstf;
if((data_type_of(m) == sNaN) || (data_type_of(n) == sNaN) ||
(data_type_of(m+1) == sNaN) || (data_type_of(n+1) == sNaN) ||
(data_type_of(m+2) == sNaN) || (data_type_of(n+2) == sNaN) ||
(data_type_of(m+3) == sNaN) || (data_type_of(n+3) == sNaN) ||
(check_product_invalid(m,n)) ||
(check_product_invalid(m+1,n+1)) ||
(check_product_invalid(m+2,n+2)) ||
(check_product_invalid(m+3,n+3)) ) invalid(n+3);
else if((data_type_of(m) == qNaN)|| (data_type_of(n) == qNaN)||
(data_type_of(m+1) == qNaN) || (data_type_of(n+1) == qNaN) ||
(data_type_of(m+2) == qNaN) || (data_type_of(n+2) == qNaN) ||
(data_type_of(m+3) == qNaN) || (data_type_of(n+3) == qNaN))
qnan(n+3);
else if (check_ positive_infinity() &&
(check_ negative_infinity()) invalid(n+3);
else if (check_ positive_infinity()) inf(n+3,0);
else if (check_ negative_infinity()) inf(n+3,1);
else {
for(i=0;i<4;i++) {
/*
If FPSCR_DN == 1, zeroize
*/
if (data_type_of(m+i) == PZERO) FR[m+i] = +0.0;
else if(data_type_of(m+i) == NZERO) FR[m+i] = -0.0;
if (data_type_of(n+i) == PZERO) FR[n+i] = +0.0;
else if(data_type_of(n+i) == NZERO) FR[n+i] = -0.0;
mlt[i].d = FR[m+i];
mlt[i].d *= FR[n+i];
/*
To be precise, with FIPR, the lower 18 bits are discarded; therefore, this description
is simplified, and differs from the hardware.
*/
mlt[i].l[1] &= 0xff000000;
mlt[i].l[1] |= 0x00800000;
}
mlt[0].d += mlt[1].d + mlt[2].d + mlt[3].d;
mlt[0].l[1] &= 0xff800000;
dstf = mlt[0].d;
set_I();
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 ...