aboutsummaryrefslogtreecommitdiff
path: root/mp/src/mathlib
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-03 13:36:15 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-03 13:36:34 -0800
commit73f5dea98e8a036c27c4026cff260ce48d93e492 (patch)
tree5a62f287045e208fae87d3e933a1c4e6ec471576 /mp/src/mathlib
parentMake libSDL2.so/dylib into symlinks. (diff)
downloadsource-sdk-2013-73f5dea98e8a036c27c4026cff260ce48d93e492.tar.xz
source-sdk-2013-73f5dea98e8a036c27c4026cff260ce48d93e492.zip
GH-195: Copy SSE fix to MP branch.
Diffstat (limited to 'mp/src/mathlib')
-rw-r--r--mp/src/mathlib/sse.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/mp/src/mathlib/sse.cpp b/mp/src/mathlib/sse.cpp
index a2445c79..2260550b 100644
--- a/mp/src/mathlib/sse.cpp
+++ b/mp/src/mathlib/sse.cpp
@@ -259,6 +259,7 @@ float FASTCALL _SSE_VectorNormalize (Vector& vec)
"movaps %%xmm4, %1 \n\t"
: "=m" (radius), "=m" (result)
: "m" (*v)
+ : "xmm1", "xmm2", "xmm3", "xmm4"
);
#else
#error "Not Implemented"
@@ -322,8 +323,9 @@ float _SSE_InvRSquared(const float* v)
"maxss %%xmm5, %%xmm1 \n\t"
"rcpss %%xmm1, %%xmm0 \n\t"
"movss %%xmm0, %0 \n\t"
- : "=m" (inv_r2)
- : "m" (*v), "0" (inv_r2)
+ : "+m" (inv_r2)
+ : "m" (*v)
+ : "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"
);
#else
#error "Not Implemented"