0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <stdio.h>
0012 #include <string.h>
0013
0014 #include "utils.h"
0015
0016 static int test_denormal_fpu(void)
0017 {
0018 unsigned int m32;
0019 unsigned long m64;
0020 volatile float f;
0021 volatile double d;
0022
0023
0024
0025 m32 = 0x00715fcf;
0026 memcpy((float *)&f, &m32, sizeof(f));
0027 d = f;
0028 memcpy(&m64, (double *)&d, sizeof(d));
0029
0030 FAIL_IF((long)(m64 != 0x380c57f3c0000000));
0031
0032 return 0;
0033 }
0034
0035 int main(int argc, char *argv[])
0036 {
0037 return test_harness(test_denormal_fpu, "fpu_denormal");
0038 }