Link Here
|
|
|
1 |
--- src/external/angelscript/sdk/angelscript/source/as_callfunc_x86.cpp.orig 2017-08-02 20:09:54 UTC |
2 |
+++ src/external/angelscript/sdk/angelscript/source/as_callfunc_x86.cpp |
3 |
@@ -340,7 +340,7 @@ endcopy: |
4 |
volatile asPWORD a[] = {asPWORD(args), asPWORD(paramSize), asPWORD(func)}; |
5 |
|
6 |
asm __volatile__( |
7 |
-#ifdef __OPTIMIZE__ |
8 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
9 |
// When compiled with optimizations the stack unwind doesn't work properly, |
10 |
// causing exceptions to crash the application. By adding this prologue |
11 |
// and the epilogue below, the stack unwind works as it should. |
12 |
@@ -385,7 +385,7 @@ endcopy: |
13 |
// Pop the alignment bytes |
14 |
"popl %%esp \n" |
15 |
"popl %%ebx \n" |
16 |
-#ifdef __OPTIMIZE__ |
17 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
18 |
// Epilogue |
19 |
"movl %%ebp, %%esp \n" |
20 |
".cfi_def_cfa_register esp \n" |
21 |
@@ -462,7 +462,7 @@ endcopy: |
22 |
volatile asPWORD a[] = {asPWORD(obj), asPWORD(args), asPWORD(paramSize), asPWORD(func)}; |
23 |
|
24 |
asm __volatile__ ( |
25 |
-#ifdef __OPTIMIZE__ |
26 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
27 |
// When compiled with optimizations the stack unwind doesn't work properly, |
28 |
// causing exceptions to crash the application. By adding this prologue |
29 |
// and the epilogue below, the stack unwind works as it should. |
30 |
@@ -508,7 +508,7 @@ endcopy: |
31 |
// Pop the alignment bytes |
32 |
"popl %%esp \n" |
33 |
"popl %%ebx \n" |
34 |
-#ifdef __OPTIMIZE__ |
35 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
36 |
// Epilogue |
37 |
"movl %%ebp, %%esp \n" |
38 |
".cfi_def_cfa_register esp \n" |
39 |
@@ -585,7 +585,7 @@ endcopy: |
40 |
volatile asPWORD a[] = {asPWORD(obj), asPWORD(args), asPWORD(paramSize), asPWORD(func)}; |
41 |
|
42 |
asm __volatile__ ( |
43 |
-#ifdef __OPTIMIZE__ |
44 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
45 |
// When compiled with optimizations the stack unwind doesn't work properly, |
46 |
// causing exceptions to crash the application. By adding this prologue |
47 |
// and the epilogue below, the stack unwind works as it should. |
48 |
@@ -631,7 +631,7 @@ endcopy: |
49 |
// Pop the alignment bytes |
50 |
"popl %%esp \n" |
51 |
"popl %%ebx \n" |
52 |
-#ifdef __OPTIMIZE__ |
53 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
54 |
// Epilogue |
55 |
"movl %%ebp, %%esp \n" |
56 |
".cfi_def_cfa_register esp \n" |
57 |
@@ -717,7 +717,7 @@ endcopy: |
58 |
volatile asPWORD a[] = {asPWORD(obj), asPWORD(args), asPWORD(paramSize), asPWORD(func), asPWORD(retPtr)}; |
59 |
|
60 |
asm __volatile__ ( |
61 |
-#ifdef __OPTIMIZE__ |
62 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
63 |
// When compiled with optimizations the stack unwind doesn't work properly, |
64 |
// causing exceptions to crash the application. By adding this prologue |
65 |
// and the epilogue below, the stack unwind works as it should. |
66 |
@@ -767,7 +767,7 @@ endcopy: |
67 |
// Pop the alignment bytes |
68 |
"popl %%esp \n" |
69 |
"popl %%ebx \n" |
70 |
-#ifdef __OPTIMIZE__ |
71 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
72 |
// Epilogue |
73 |
"movl %%ebp, %%esp \n" |
74 |
".cfi_def_cfa_register esp \n" |
75 |
@@ -849,7 +849,7 @@ endcopy: |
76 |
volatile asPWORD a[] = {asPWORD(args), asPWORD(paramSize), asPWORD(func), asPWORD(retPtr)}; |
77 |
|
78 |
asm __volatile__ ( |
79 |
-#ifdef __OPTIMIZE__ |
80 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
81 |
// When compiled with optimizations the stack unwind doesn't work properly, |
82 |
// causing exceptions to crash the application. By adding this prologue |
83 |
// and the epilogue below, the stack unwind works as it should. |
84 |
@@ -896,7 +896,7 @@ endcopy: |
85 |
// Pop the alignment bytes |
86 |
"popl %%esp \n" |
87 |
"popl %%ebx \n" |
88 |
-#ifdef __OPTIMIZE__ |
89 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
90 |
// Epilogue |
91 |
"movl %%ebp, %%esp \n" |
92 |
".cfi_def_cfa_register esp \n" |
93 |
@@ -980,7 +980,7 @@ endcopy: |
94 |
volatile asPWORD a[] = {asPWORD(obj), asPWORD(args), asPWORD(paramSize), asPWORD(func), asPWORD(retPtr)}; |
95 |
|
96 |
asm __volatile__ ( |
97 |
-#ifdef __OPTIMIZE__ |
98 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
99 |
// When compiled with optimizations the stack unwind doesn't work properly, |
100 |
// causing exceptions to crash the application. By adding this prologue |
101 |
// and the epilogue below, the stack unwind works as it should. |
102 |
@@ -1030,7 +1030,7 @@ endcopy: |
103 |
// Pop the alignment bytes |
104 |
"popl %%esp \n" |
105 |
"popl %%ebx \n" |
106 |
-#ifdef __OPTIMIZE__ |
107 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
108 |
// Epilogue |
109 |
"movl %%ebp, %%esp \n" |
110 |
".cfi_def_cfa_register esp \n" |
111 |
@@ -1102,7 +1102,7 @@ endcopy: |
112 |
volatile asPWORD a[] = {asPWORD(args), asPWORD(paramSize), asPWORD(func)}; |
113 |
|
114 |
asm __volatile__ ( |
115 |
-#ifdef __OPTIMIZE__ |
116 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
117 |
// When compiled with optimizations the stack unwind doesn't work properly, |
118 |
// causing exceptions to crash the application. By adding this prologue |
119 |
// and the epilogue below, the stack unwind works as it should. |
120 |
@@ -1145,7 +1145,7 @@ endcopy: |
121 |
// Pop the alignment bytes |
122 |
"popl %%esp \n" |
123 |
"popl %%ebx \n" |
124 |
-#ifdef __OPTIMIZE__ |
125 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
126 |
// Epilogue |
127 |
"movl %%ebp, %%esp \n" |
128 |
".cfi_def_cfa_register esp \n" |
129 |
@@ -1233,7 +1233,7 @@ endcopy: |
130 |
volatile asPWORD a[] = {asPWORD(obj), asPWORD(args), asPWORD(paramSize), asPWORD(func)}; |
131 |
|
132 |
asm __volatile__ ( |
133 |
-#ifdef __OPTIMIZE__ |
134 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
135 |
// When compiled with optimizations the stack unwind doesn't work properly, |
136 |
// causing exceptions to crash the application. By adding this prologue |
137 |
// and the epilogue below, the stack unwind works as it should. |
138 |
@@ -1285,7 +1285,7 @@ endcopy: |
139 |
// Pop the alignment bytes |
140 |
"popl %%esp \n" |
141 |
"popl %%ebx \n" |
142 |
-#ifdef __OPTIMIZE__ |
143 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
144 |
// Epilogue |
145 |
"movl %%ebp, %%esp \n" |
146 |
".cfi_def_cfa_register esp \n" |
147 |
@@ -1380,7 +1380,7 @@ endcopy: |
148 |
volatile asPWORD a[] = {asPWORD(obj), asPWORD(args), asPWORD(paramSize), asPWORD(func), asPWORD(retPtr)}; |
149 |
|
150 |
asm __volatile__ ( |
151 |
-#ifdef __OPTIMIZE__ |
152 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
153 |
// When compiled with optimizations the stack unwind doesn't work properly, |
154 |
// causing exceptions to crash the application. By adding this prologue |
155 |
// and the epilogue below, the stack unwind works as it should. |
156 |
@@ -1445,7 +1445,7 @@ endcopy: |
157 |
// Pop the alignment bytes |
158 |
"popl %%esp \n" |
159 |
"popl %%ebx \n" |
160 |
-#ifdef __OPTIMIZE__ |
161 |
+#if defined(__OPTIMIZE__) && !defined(__clang__) |
162 |
// Epilogue |
163 |
"movl %%ebp, %%esp \n" |
164 |
".cfi_def_cfa_register esp \n" |