]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Update.
authorJulian Seward <jseward@acm.org>
Wed, 23 May 2012 11:40:03 +0000 (11:40 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 23 May 2012 11:40:03 +0000 (11:40 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12577

none/tests/amd64/avx-1.c

index bb159c775621134544b7c8da3b2711c30976d3f3..f8e8fa987569e0e97617c110d2d1488e0f7ea2d0 100644 (file)
@@ -142,7 +142,7 @@ void randBlock ( Block* b )
 
 #define GEN_test_RandM(_name, _reg_form, _mem_form)   \
     \
-    static void test_##_name ( void ) \
+    __attribute__ ((noinline)) static void test_##_name ( void )   \
     { \
        Block* b = memalign(32, sizeof(Block)); \
        randBlock(b); \
@@ -188,6 +188,12 @@ void randBlock ( Block* b )
        free(b); \
     }
 
+#define GEN_test_Ronly(_name, _reg_form) \
+   GEN_test_RandM(_name, _reg_form, "")
+#define GEN_test_Monly(_name, _mem_form) \
+   GEN_test_RandM(_name, "", _mem_form)
+
+
 GEN_test_RandM(VPOR_128,
                "vpor %%xmm6,  %%xmm8, %%xmm7",
                "vpor (%%rax), %%xmm8, %%xmm7")
@@ -320,8 +326,54 @@ GEN_test_RandM(VCVTTSS2SI_32,
                "vcvttss2si %%xmm8,  %%r14d",
                "vcvttss2si (%%rax), %%r14d")
 
+GEN_test_RandM(VMOVQ_XMMorMEM64_to_XMM,
+               "vmovq %%xmm7,  %%xmm8",
+               "vmovq (%%rax), %%xmm8")
+
+/* NB tests the reg form only */
+GEN_test_Ronly(VMOVQ_XMM_to_IREG64,
+               "vmovq %%xmm7, %%r14")
+
+/* This insn only exists in the reg-reg-reg form. */
+GEN_test_Ronly(VMOVHLPS_128,
+               "vmovhlps %%xmm6, %%xmm8, %%xmm7")
+
+GEN_test_RandM(VPABSD_128,
+               "vpabsd %%xmm6,  %%xmm8",
+               "vpabsd (%%rax), %%xmm8")
+
+/* This insn only exists in the reg-reg-reg form. */
+GEN_test_Ronly(VMOVLHPS_128,
+               "vmovlhps %%xmm6, %%xmm8, %%xmm7")
+
+GEN_test_Monly(VMOVNTDQ_128,
+               "vmovntdq %%xmm8, (%%rax)")
+
+GEN_test_RandM(VMOVUPS_XMM_to_XMMorMEM,
+               "vmovups %%xmm8, %%xmm7",
+               "vmovups %%xmm9, (%%rax)")
+
+GEN_test_RandM(VMOVQ_IREGorMEM64_to_XMM,
+               "vmovq %%r14, %%xmm7",
+               "vmovq (%%rax), %%xmm9")
+
+/* Comment duplicated above, for convenient reference:
+   Allowed operands in test insns:
+     Reg form:  %ymm6,  %ymm7, %ymm8, %ymm9 and %r14.
+     Mem form:  (%rax), %ymm7, %ymm8, %ymm9 and %r14.
+   Imm8 etc fields are also allowed, where they make sense.
+*/
+
 int main ( void )
 {
+   test_VMOVQ_IREGorMEM64_to_XMM();
+   test_VMOVUPS_XMM_to_XMMorMEM();
+   test_VMOVNTDQ_128();
+   test_VMOVLHPS_128();
+   test_VPABSD_128();
+   test_VMOVHLPS_128();
+   test_VMOVQ_XMM_to_IREG64();
+   test_VMOVQ_XMMorMEM64_to_XMM();
    test_VCVTTSS2SI_32();
    test_VPUNPCKLBW_128();
    test_VPUNPCKHBW_128();