forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita7a7387
committed
Further improve code for probing the availability of ARM CRC instructions.
Andrew Gierth pointed out that commit1c72ec6 would yield the wronganswer on big-endian ARM systems, because the data being CRC'd would bedifferent. To fix that, and avoid the rather unsightly hard-wiredconstant, simply compare the hardware and software implementations'results.While we're at it, also log the resulting decision at DEBUG1, and errorout if the hw and sw results unexpectedly differ. Also, since thisfile must compile for both frontend and backend, avoid incorrectdependencies on backend-only headers.In passing, add a comment to postmaster.c about when the CRC functionpointer will get initialized.Thomas Munro, based on complaints from Andrew Gierth and Tom LaneDiscussion:https://postgr.es/m/HE1PR0801MB1323D171938EABC04FFE7FA9E3110@HE1PR0801MB1323.eurprd08.prod.outlook.com1 parent30c66e7 commita7a7387
File tree
2 files changed
+39
-8
lines changed- src
- backend/postmaster
- port
2 files changed
+39
-8
lines changedLines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
957 | 957 |
| |
958 | 958 |
| |
959 | 959 |
| |
960 |
| - | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
961 | 969 |
| |
962 | 970 |
| |
963 | 971 |
| |
|
Lines changed: 30 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 |
| - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 |
| |
23 | 27 |
| |
| 28 | + | |
24 | 29 |
| |
25 |
| - | |
26 | 30 |
| |
27 | 31 |
| |
28 | 32 |
| |
| |||
33 | 37 |
| |
34 | 38 |
| |
35 | 39 |
| |
36 |
| - | |
| 40 | + | |
37 | 41 |
| |
38 | 42 |
| |
39 | 43 |
| |
| |||
42 | 46 |
| |
43 | 47 |
| |
44 | 48 |
| |
45 |
| - | |
| 49 | + | |
46 | 50 |
| |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
47 | 55 |
| |
48 | 56 |
| |
49 |
| - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
50 | 62 |
| |
51 |
| - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
52 | 67 |
| |
53 | 68 |
| |
54 |
| - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
55 | 78 |
| |
56 | 79 |
| |
57 | 80 |
| |
|
0 commit comments
Comments
(0)