Rev. 1.50, 10/04, page 421 of 448
else{ /* case FPSCR.PR=1 */
case(ftrc_double_type_of(m)){
NORM: *FPUL = DR[m>>1]; break;
PINF: ftrc_invalid(0,*FPUL);
break;
NINF: ftrc_invalid(1, *FPUL); break;
}
}
}
int ftrc_signle_type_of(int m)
{
if(sign_of(m) == 0){
if(FR_HEX[m] > 0x7f800000) return(NINF); /* NaN */
else if(FR_HEX[m] > P_INT_SINGLE_RANGE)
return(PINF); /* out of range,+INF */
else return(NORM); /* +0,+NORM */
} else {
if((FR_HEX[m] & 0x7fffffff) > N_INT_SINGLE_RANGE)
return(NINF); /* out of range ,+INF,NaN*/
else return(NORM); /* -0,-NORM */
}
}
int ftrc_double_type_of(int m)
{
if(sign_of(m) == 0){
if((FR_HEX[m] > 0x7ff00000) ||
((FR_HEX[m] == 0x7ff00000) &&
(FR_HEX[m+1] != 0x00000000))) return(NINF); /* NaN */
else if(DR_HEX[m>>1] >= P_INT_DOUBLE_RANGE)
return(PINF); /* out of range,+INF */
else return(NORM); /* +0,+NORM */
} else {
if((DR_HEX[m>>1] & 0x7fffffffffffffff) >= N_INT_DOUBLE_RANGE)
return(NINF); /* out of range ,+INF,NaN*/
else return(NORM); /* -0,-NORM */
}
}
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 ...