Module: xenomai-2.6
Branch: master
Commit: a11e3b464ad55a68fd6f8f8bb994e0527f42c697
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=a11e3b464ad55a68fd6f8f8bb994e0527f42c697

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Tue Apr 16 09:20:08 2013 +0200

switchtest: Fix x86 SSE/AVX FPU check helpers

Input and output constraints were mixed up: the functions read the
registers.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 include/asm-x86/fptest.h |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/include/asm-x86/fptest.h b/include/asm-x86/fptest.h
index 054844c..ca7b9c3 100644
--- a/include/asm-x86/fptest.h
+++ b/include/asm-x86/fptest.h
@@ -120,11 +120,10 @@ static inline unsigned fp_regs_check(unsigned val)
                        "vmovupd %%ymm5,%5;"
                        "vmovupd %%ymm6,%6;"
                        "vmovupd %%ymm7,%7;"
-                       :
-                       : "m" (vec[0][0]), "m" (vec[1][0]),
-                         "m" (vec[2][0]), "m" (vec[3][0]),
-                         "m" (vec[4][0]), "m" (vec[5][0]),
-                         "m" (vec[6][0]), "m" (vec[7][0]));
+                       : "=m" (vec[0][0]), "=m" (vec[1][0]),
+                         "=m" (vec[2][0]), "=m" (vec[3][0]),
+                         "=m" (vec[4][0]), "=m" (vec[5][0]),
+                         "=m" (vec[6][0]), "=m" (vec[7][0]));
        } else if (fp_features & FP_FEATURE_SSE) {
                __asm__ __volatile__(
                        "movupd %%xmm0,%0;"
@@ -135,11 +134,10 @@ static inline unsigned fp_regs_check(unsigned val)
                        "movupd %%xmm5,%5;"
                        "movupd %%xmm6,%6;"
                        "movupd %%xmm7,%7;"
-                       :
-                       : "m" (vec[0][0]), "m" (vec[1][0]),
-                         "m" (vec[2][0]), "m" (vec[3][0]),
-                         "m" (vec[4][0]), "m" (vec[5][0]),
-                         "m" (vec[6][0]), "m" (vec[7][0]));
+                       : "=m" (vec[0][0]), "=m" (vec[1][0]),
+                         "=m" (vec[2][0]), "=m" (vec[3][0]),
+                         "=m" (vec[4][0]), "=m" (vec[5][0]),
+                         "=m" (vec[6][0]), "=m" (vec[7][0]));
        }
 
        for (i = 0; i < 8; i++)


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to