]> git.pld-linux.org Git - packages/geos.git/blame - geos-x32.patch
- updated to 3.8.3 (last version with swig bindings)
[packages/geos.git] / geos-x32.patch
CommitLineData
82e55ccc
JB
1--- geos-3.8.1/include/geos/algorithm/ttmath/ttmathtypes.h.orig 2019-09-18 23:38:19.000000000 +0200
2+++ geos-3.8.1/include/geos/algorithm/ttmath/ttmathtypes.h 2020-11-08 20:39:00.133786117 +0100
3@@ -109,7 +109,7 @@
4 */
5 #if !defined TTMATH_PLATFORM32 && !defined TTMATH_PLATFORM64
6
7- #if !defined _M_X64 && !defined __x86_64__
8+ #if !defined _M_X64 && !defined __x86_64__ || defined __ILP32__
9
10 /*
11 other platforms than x86 and amd64 are not recognized at the moment
12--- geos-3.8.1/include/geos/algorithm/ttmath/ttmathuint_x86.h.orig 2019-09-18 23:38:19.000000000 +0200
13+++ geos-3.8.1/include/geos/algorithm/ttmath/ttmathuint_x86.h 2020-11-08 21:56:34.060500817 +0100
14@@ -524,7 +524,11 @@
15 uint dummy1, dummy2, dummy3;
16
17 __asm__ __volatile__(
18+#ifdef __x86_64__
19+ "push %%rdx \n"
20+#else
21 "push %%edx \n"
22+#endif
23 "xor %%edx, %%edx \n" // edx = 0, cf = 0
24 "1: \n"
25 "mov (%%esi,%%edx,4), %%eax \n"
26@@ -536,7 +540,11 @@
27 "jnz 1b \n"
28
29 "adc %%ecx, %%ecx \n" // ecx has the cf state
30+#ifdef __x86_64__
31+ "pop %%rax \n" // eax = rest
32+#else
33 "pop %%eax \n" // eax = rest
34+#endif
35
36 "or %%eax, %%eax \n"
37 "jz 3f \n"
38@@ -857,7 +865,11 @@
39 uint dummy1, dummy2, dummy3;
40
41 __asm__ __volatile__(
42+#ifdef __x86_64__
43+ "push %%rdx \n"
44+#else
45 "push %%edx \n"
46+#endif
47 "xor %%edx, %%edx \n" // edx = 0, cf = 0
48 "1: \n"
49 "mov (%%esi,%%edx,4), %%eax \n"
50@@ -869,7 +881,11 @@
51 "jnz 1b \n"
52
53 "adc %%ecx, %%ecx \n" // ecx has the cf state
54+#ifdef __x86_64__
55+ "pop %%rax \n" // eax = rest
56+#else
57 "pop %%eax \n" // eax = rest
58+#endif
59
60 "or %%eax, %%eax \n"
61 "jz 3f \n"
62@@ -1141,7 +1157,11 @@
63
64 __asm__ __volatile__(
65
66+#ifdef __x86_64__
67+ "push %%rbp \n"
68+#else
69 "push %%ebp \n"
70+#endif
71
72 "movl %%ecx, %%esi \n"
73 "movl $32, %%ecx \n"
74@@ -1171,7 +1191,11 @@
75
76 "and $1, %%eax \n"
77
78+#ifdef __x86_64__
79+ "pop %%rbp \n"
80+#else
81 "pop %%ebp \n"
82+#endif
83
84 : "=a" (c), "=D" (dummy), "=S" (dummy2), "=d" (dummy3)
85 : "0" (c), "1" (b), "b" (p1), "c" (bits)
86@@ -1272,7 +1296,11 @@
87
88 __asm__ __volatile__(
89
90+#ifdef __x86_64__
91+ "push %%rbp \n"
92+#else
93 "push %%ebp \n"
94+#endif
95
96 "movl %%ecx, %%esi \n"
97 "movl $32, %%ecx \n"
98@@ -1305,7 +1333,11 @@
99 "roll $1, %%eax \n"
100 "andl $1, %%eax \n"
101
102+#ifdef __x86_64__
103+ "pop %%rbp \n"
104+#else
105 "pop %%ebp \n"
106+#endif
107
108 : "=a" (c), "=D" (dummy), "=S" (dummy2), "=d" (dummy3)
109 : "0" (c), "1" (b), "b" (p1), "c" (bits)
This page took 0.082091 seconds and 4 git commands to generate.