diff options
| -rw-r--r-- | test/arch/x86/arch.py | 5 | ||||
| -rw-r--r-- | test/arch/x86/unit/mn_pmovmskb.py | 26 | ||||
| -rw-r--r-- | test/test_all.py | 1 |
3 files changed, 32 insertions, 0 deletions
diff --git a/test/arch/x86/arch.py b/test/arch/x86/arch.py index 9fe718cc..dfe4ef91 100644 --- a/test/arch/x86/arch.py +++ b/test/arch/x86/arch.py @@ -2853,6 +2853,11 @@ reg_tests = [ (m32, "00000000 SQRTSS XMM2, DWORD PTR [EDX]", "F30f5112"), + (m32, "00000000 PMOVMSKB EAX, MM7", + "0FD7C7"), + (m32, "00000000 PMOVMSKB EAX, XMM7", + "660FD7C7"), + ] diff --git a/test/arch/x86/unit/mn_pmovmskb.py b/test/arch/x86/unit/mn_pmovmskb.py new file mode 100644 index 00000000..97435794 --- /dev/null +++ b/test/arch/x86/unit/mn_pmovmskb.py @@ -0,0 +1,26 @@ +#! /usr/bin/env python +from asm_test import Asm_Test +import sys + +class Test_PMOVMSKB(Asm_Test): + TXT = ''' + main: + CALL next + .byte 0x88, 0x77, 0xE6, 0x55, 0xC4, 0x33, 0x22, 0x11 + .byte 0x01, 0x02, 0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA + next: + POP EBP + MOV EAX, 0xFFFFFFFF + MOVQ MM0, QWORD PTR [EBP] + MOVQ MM1, MM0 + PMOVMSKB EAX, MM1 + RET + ''' + + def check(self): + assert self.myjit.cpu.MM0 == 0x112233C455E67788 + assert self.myjit.cpu.MM1 == 0x112233C455E67788 + assert self.myjit.cpu.EAX == 0x00000015 + +if __name__ == "__main__": + [test()() for test in [Test_PMOVMSKB,]] diff --git a/test/test_all.py b/test/test_all.py index 70187171..e52123ea 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -48,6 +48,7 @@ for script in ["x86/sem.py", "x86/unit/mn_punpck.py", "x86/unit/mn_pinsr.py", "x86/unit/mn_pextr.py", + "x86/unit/mn_pmovmskb.py", "arm/arch.py", "arm/sem.py", "aarch64/unit/mn_ubfm.py", |