English
Language : 

SH-2A Datasheet, PDF (96/501 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperH™ RISC engine Family
Section 6 Instruction Descriptions
float f;
int l;
} tmpf;
union {
double d;
int l[2];
} tmpd;
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 check_single_exception(float *dst,result)
{
union {
Rev. 3.00 Jul 08, 2005 page 82 of 484
REJ09B0051-0300