1 /// Assert the fixed point precision macros according to ISO/IEC TR 18037:2008 7.18a.3 are
2 /// defined when -ffixed-point is provided.
4 // RUN: %clang_cc1 -triple=x86_64 -E -dM -ffixed-point -x c < /dev/null | FileCheck -match-full-lines %s
5 // RUN: %clang_cc1 -triple=x86_64 -E -dM -ffixed-point -x c++ < /dev/null | FileCheck -match-full-lines %s
7 /// These are the implementation-defined values for x86_64.
8 // CHECK-DAG:#define __SFRACT_EPSILON__ 0.0078125HR
9 // CHECK-DAG:#define __SFRACT_FBIT__ 7
10 // CHECK-DAG:#define __SFRACT_MAX__ 0.9921875HR
11 // CHECK-DAG:#define __SFRACT_MIN__ (-0.5HR-0.5HR)
13 // CHECK-DAG:#define __USFRACT_EPSILON__ 0.00390625UHR
14 // CHECK-DAG:#define __USFRACT_FBIT__ 8
15 // CHECK-DAG:#define __USFRACT_MAX__ 0.99609375UHR
17 // CHECK-DAG:#define __FRACT_EPSILON__ 0.000030517578125R
18 // CHECK-DAG:#define __FRACT_FBIT__ 15
19 // CHECK-DAG:#define __FRACT_MAX__ 0.999969482421875R
20 // CHECK-DAG:#define __FRACT_MIN__ (-0.5R-0.5R)
22 // CHECK-DAG:#define __UFRACT_EPSILON__ 0.0000152587890625UR
23 // CHECK-DAG:#define __UFRACT_FBIT__ 16
24 // CHECK-DAG:#define __UFRACT_MAX__ 0.9999847412109375UR
26 // CHECK-DAG:#define __LFRACT_EPSILON__ 0.0000000004656612873077392578125LR
27 // CHECK-DAG:#define __LFRACT_FBIT__ 31
28 // CHECK-DAG:#define __LFRACT_MAX__ 0.9999999995343387126922607421875LR
29 // CHECK-DAG:#define __LFRACT_MIN__ (-0.5LR-0.5LR)
31 // CHECK-DAG:#define __ULFRACT_EPSILON__ 0.00000000023283064365386962890625ULR
32 // CHECK-DAG:#define __ULFRACT_FBIT__ 32
33 // CHECK-DAG:#define __ULFRACT_MAX__ 0.99999999976716935634613037109375ULR
35 // CHECK-DAG:#define __SACCUM_EPSILON__ 0.0078125HK
36 // CHECK-DAG:#define __SACCUM_FBIT__ 7
37 // CHECK-DAG:#define __SACCUM_MAX__ 255.9921875HK
38 // CHECK-DAG:#define __SACCUM_MIN__ (-128.0HK-128.0HK)
40 // CHECK-DAG:#define __USACCUM_EPSILON__ 0.00390625UHK
41 // CHECK-DAG:#define __USACCUM_FBIT__ 8
42 // CHECK-DAG:#define __USACCUM_MAX__ 255.99609375UHK
44 // CHECK-DAG:#define __ACCUM_EPSILON__ 0.000030517578125K
45 // CHECK-DAG:#define __ACCUM_FBIT__ 15
46 // CHECK-DAG:#define __ACCUM_MAX__ 65535.999969482421875K
47 // CHECK-DAG:#define __ACCUM_MIN__ (-32768.0K-32768.0K)
49 // CHECK-DAG:#define __UACCUM_EPSILON__ 0.0000152587890625UK
50 // CHECK-DAG:#define __UACCUM_FBIT__ 16
51 // CHECK-DAG:#define __UACCUM_MAX__ 65535.9999847412109375UK
53 // CHECK-DAG:#define __LACCUM_EPSILON__ 0.0000000004656612873077392578125LK
54 // CHECK-DAG:#define __LACCUM_FBIT__ 31
55 // CHECK-DAG:#define __LACCUM_MAX__ 4294967295.9999999995343387126922607421875LK
56 // CHECK-DAG:#define __LACCUM_MIN__ (-2147483648.0LK-2147483648.0LK)
58 // CHECK-DAG:#define __ULACCUM_EPSILON__ 0.00000000023283064365386962890625ULK
59 // CHECK-DAG:#define __ULACCUM_FBIT__ 32
60 // CHECK-DAG:#define __ULACCUM_MAX__ 4294967295.99999999976716935634613037109375ULK
62 // CHECK-DAG:#define __SACCUM_IBIT__ 8
63 // CHECK-DAG:#define __USACCUM_IBIT__ 8
64 // CHECK-DAG:#define __ACCUM_IBIT__ 16
65 // CHECK-DAG:#define __UACCUM_IBIT__ 16
66 // CHECK-DAG:#define __LACCUM_IBIT__ 32
67 // CHECK-DAG:#define __ULACCUM_IBIT__ 32