diff options
author | Søren Sandmann <ssp@redhat.com> | 2013-12-26 12:33:18 -0500 |
---|---|---|
committer | Søren Sandmann <ssp@redhat.com> | 2013-12-26 12:33:18 -0500 |
commit | dfcef308a3dc4581bcd3868c412d8a85e2bf8590 (patch) | |
tree | 140425b075bb70ab64220e004c6120b38d2dde00 | |
parent | 3db5ef2307e32d54a9d294449bcce340182704aa (diff) |
Bug fix for movd
-rw-r--r-- | simplex86.c | 2 | ||||
-rw-r--r-- | testsuite.c | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/simplex86.c b/simplex86.c index 32e78c4..ea06efe 100644 --- a/simplex86.c +++ b/simplex86.c @@ -394,7 +394,7 @@ static const variant_t variants[] = { I_movd, { A_MMX, A_RM32 }, F_MMX, E_RM, 0x0f6e }, { I_movd, { A_RM32, A_MMX }, F_MMX, E_MR, 0x0f7e }, { I_movd, { A_SSE, A_RM32 }, F_SSE2, E_RM, 0x0f6e, PRE_66 }, - { I_movd, { A_RM32, A_SSE }, F_SSE2, E_MR, 0x0f6e, PRE_66 }, + { I_movd, { A_RM32, A_SSE }, F_SSE2, E_MR, 0x0f7e, PRE_66 }, { I_vmovd, { A_SSE, A_RM32 }, F_AVX, E_RM, 0x6e, VEX(128,0x66,0x0f,W0) }, { I_vmovd, { A_RM32, A_SSE }, F_AVX, E_MR, 0x7e, VEX(128,0x66,0x0f,W0) }, diff --git a/testsuite.c b/testsuite.c index 7eba0f8..6e41e0d 100644 --- a/testsuite.c +++ b/testsuite.c @@ -214,6 +214,18 @@ test_pshuflw (assembler_t *as) } static uint8_t * +test_movd (assembler_t *as) +{ + fragment_t *frag = fragment_new (as); + + BEGIN_ASM (frag) + I_movd, DWORD_PTR + PTR (rdx), xmm0, + END_ASM (); + + return assembler_link (as, frag, NULL); +} + +static uint8_t * test_riprel (assembler_t *as) { fragment_t *frag = fragment_new (as); @@ -475,8 +487,9 @@ main () success &= run_test (as, "test_convert", test_convert, 0x9d52c83b); success &= run_test (as, "test_misc", test_misc, 0x483565c1); success &= run_test (as, "test_riprel", test_riprel, 0xf5497642); - success &= run_test (as, "test_movdq", test_movdq, 0xf6f727a6); + success &= run_test (as, "test_movdq", test_movdq, 0xedd4f79d); success &= run_test (as, "test_pshuflw", test_pshuflw, 0x7a8c7f59); + success &= run_test (as, "test_movd", test_movd, 0xc33d08fb); if (success) printf ("Test suite PASSED\n"); |