1
2
3
4
5
6
7
8
9
10
11#include <stdio.h>
12#include <string.h>
13
14#include "utils.h"
15
16static int test_denormal_fpu(void)
17{
18 unsigned int m32;
19 unsigned long m64;
20 volatile float f;
21 volatile double d;
22
23
24
25 m32 = 0x00715fcf;
26 memcpy((float *)&f, &m32, sizeof(f));
27 d = f;
28 memcpy(&m64, (double *)&d, sizeof(d));
29
30 FAIL_IF((long)(m64 != 0x380c57f3c0000000));
31
32 return 0;
33}
34
35int main(int argc, char *argv[])
36{
37 return test_harness(test_denormal_fpu, "fpu_denormal");
38}
39