Commit 451c1a7
committed
[x64] Move all sequences in same compilation unit
Currently, sequences are in separate compilation units, but their
constructors all share the same unordered_map, which is in one of the
compilation unit.
Due to that, when compiling using GCC with LTO enabled, the constructor of
some units is called before the constructor of the unit with the map, also
called 'Static Initialization Order Fiasco'
(see: https://en.cppreference.com/w/cpp/language/siof). Thus, the
map is not initialized, which causes a division-by-zero error (SIGFPE).
Fix this by converting the files that contain specific sequences to be
includable in the main file. This way all sequences are in the same
compilation unit and guarantees the map is initialized.1 parent 47271f2 commit 451c1a7
File tree
5 files changed
+29
-92
lines changed- src/xenia/cpu/backend/x64
5 files changed
+29
-92
lines changedLines changed: 2 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 10 | + | |
23 | 11 | | |
24 | 12 | | |
25 | 13 | | |
| |||
546 | 534 | | |
547 | 535 | | |
548 | 536 | | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
Lines changed: 2 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 10 | + | |
25 | 11 | | |
26 | 12 | | |
27 | 13 | | |
| |||
1169 | 1155 | | |
1170 | 1156 | | |
1171 | 1157 | | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
Lines changed: 1 addition & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 10 | + | |
26 | 11 | | |
27 | 12 | | |
28 | 13 | | |
| |||
2684 | 2669 | | |
2685 | 2670 | | |
2686 | 2671 | | |
2687 | | - | |
2688 | | - | |
2689 | | - | |
2690 | | - | |
2691 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
57 | 77 | | |
58 | 78 | | |
59 | 79 | | |
| |||
3299 | 3319 | | |
3300 | 3320 | | |
3301 | 3321 | | |
3302 | | - | |
3303 | | - | |
3304 | | - | |
3305 | | - | |
3306 | | - | |
3307 | | - | |
3308 | | - | |
3309 | | - | |
3310 | | - | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
3311 | 3325 | | |
3312 | 3326 | | |
3313 | 3327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 22 | | |
44 | 23 | | |
45 | 24 | | |
| |||
0 commit comments