diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-12-23 20:58:36 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-12-24 18:38:19 +0100 |
| commit | d8dd590fddd67466b0f919f2cfc3702a221cbf1b (patch) | |
| tree | e78c639292fbebc0a1ae1125f6728236f3f5f392 | |
| parent | 9955709c355d5b822730a9cf7e8bfd47a3773c48 (diff) | |
| download | miasm-d8dd590fddd67466b0f919f2cfc3702a221cbf1b.tar.gz miasm-d8dd590fddd67466b0f919f2cfc3702a221cbf1b.zip | |
Test: add x86 reg test
Diffstat (limited to '')
| -rw-r--r-- | test/arch/x86/unit/mn_pmaxu.py | 25 | ||||
| -rw-r--r-- | test/test_all.py | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/arch/x86/unit/mn_pmaxu.py b/test/arch/x86/unit/mn_pmaxu.py new file mode 100644 index 00000000..08e54c03 --- /dev/null +++ b/test/arch/x86/unit/mn_pmaxu.py @@ -0,0 +1,25 @@ +#! /usr/bin/env python +from asm_test import Asm_Test +import sys + +class Test_PMAXU(Asm_Test): + TXT = ''' + main: + CALL next + .byte 0x88, 0x76, 0x66, 0x54, 0x44, 0x32, 0x00, 0x10 + .byte 0x87, 0x77, 0x66, 0x55, 0x40, 0x33, 0x22, 0x11 + next: + POP EBP + MOVQ MM0, QWORD PTR [EBP] + MOVQ MM1, MM0 + PMAXUB MM1, QWORD PTR [EBP+0x8] + RET + ''' + + def check(self): + assert self.myjit.cpu.MM0 == 0x1000324454667688 + assert self.myjit.cpu.MM1 == 0x1122334455667788 + + +if __name__ == "__main__": + [test()() for test in [Test_PMAXU]] diff --git a/test/test_all.py b/test/test_all.py index 1be8d7e2..66afc332 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -42,6 +42,7 @@ for script in ["x86/sem.py", "x86/unit/mn_int.py", "x86/unit/mn_pshufb.py", "x86/unit/mn_psrl_psll.py", + "x86/unit/mn_pmaxu.py", "arm/arch.py", "arm/sem.py", "aarch64/unit/mn_ubfm.py", |