- Notifications
You must be signed in to change notification settings - Fork15
Commitcce07bb

Vitaly Davydov
Fix test fails on Debian 32 bit system due to gcc bug 323
On some 32 bit platforms, there is a gcc bug that makes floating pointcalculations and comparisons unstable (see the link below). The problemoriginates in FPU 80 bits registers where double values are not truncatedto 64 bit values. When gcc compiles some code with enabled optimizations,the intermediate results may be kept in the FPU registers without truncationto 64 bit values. Extra bits may produce unstable results when comparingthe numbers.The generic solution is to save the intermediate results in the memory wherethe values are truncated to 64 bit values. It affects the performance butmakes the tests stable on all platforms.PGSPHERE_FLOAT_STORE macro enables storing of intermediate results for FPxxoperations in the memory. It is enabled by default for 32 bit platforms.It can be explicitly enabled or disabled in CFLAGS. To enable it for allcode the gcc option -ffloat-store may be used as well.Link to gcc bug:https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3231 parent2385d5d commitcce07bb
1 file changed
+77
-0
lines changedLines changed: 77 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
48 | 77 |
| |
49 | 78 |
| |
50 | 79 |
| |
51 | 80 |
| |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
52 | 127 |
| |
53 | 128 |
| |
54 | 129 |
| |
| |||
85 | 160 |
| |
86 | 161 |
| |
87 | 162 |
| |
| 163 | + | |
| 164 | + | |
88 | 165 |
| |
89 | 166 |
| |
90 | 167 |
| |
|
0 commit comments
Comments
(0)