From: Julian Seward Date: Wed, 23 May 2012 11:40:03 +0000 (+0000) Subject: Update. X-Git-Tag: svn/VALGRIND_3_8_0~291 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bdcee8722de6853a3f96933229233d9685544df;p=thirdparty%2Fvalgrind.git Update. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12577 --- diff --git a/none/tests/amd64/avx-1.c b/none/tests/amd64/avx-1.c index bb159c7756..f8e8fa9875 100644 --- a/none/tests/amd64/avx-1.c +++ b/none/tests/amd64/avx-1.c @@ -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();