Commit 80e7d5210305d1acff06fd59de2982826cb880c7

Authored by bellard
1 parent 13846e70

added movdq2q and movq2dq


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2004 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 8 additions and 1 deletions
tests/test-i386.c
@@ -2199,9 +2199,12 @@ void test_sse_comi(double a1, double b1) @@ -2199,9 +2199,12 @@ void test_sse_comi(double a1, double b1)
2199 r.q[1], r.q[0]);\ 2199 r.q[1], r.q[0]);\
2200 } 2200 }
2201 2201
  2202 +/* Force %xmm0 usage to avoid the case where both register index are 0
  2203 + to test intruction decoding more extensively */
2202 #define CVT_OP_XMM2MMX(op)\ 2204 #define CVT_OP_XMM2MMX(op)\
2203 {\ 2205 {\
2204 - asm volatile (#op " %1, %0" : "=y" (r.q[0]) : "x" (a.dq));\ 2206 + asm volatile (#op " %1, %0" : "=y" (r.q[0]) : "x" (a.dq) \
  2207 + : "%xmm0");\
2205 printf("%-9s: a=" FMT64X "" FMT64X " r=" FMT64X "\n",\ 2208 printf("%-9s: a=" FMT64X "" FMT64X " r=" FMT64X "\n",\
2206 #op,\ 2209 #op,\
2207 a.q[1], a.q[0],\ 2210 a.q[1], a.q[0],\
@@ -2555,6 +2558,10 @@ void test_sse(void) @@ -2555,6 +2558,10 @@ void test_sse(void)
2555 CVT_OP_XMM(cvtpd2dq); 2558 CVT_OP_XMM(cvtpd2dq);
2556 CVT_OP_XMM(cvttpd2dq); 2559 CVT_OP_XMM(cvttpd2dq);
2557 2560
  2561 + /* sse/mmx moves */
  2562 + CVT_OP_XMM2MMX(movdq2q);
  2563 + CVT_OP_MMX2XMM(movq2dq);
  2564 +
2558 /* int to float */ 2565 /* int to float */
2559 a.l[0] = -6; 2566 a.l[0] = -6;
2560 a.l[1] = 2; 2567 a.l[1] = 2;