diff options
| author | Ajax <commial@gmail.com> | 2017-02-02 17:06:41 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2017-02-02 17:06:41 +0100 |
| commit | 4231ba3c4783d1692227331abd24d806dfc0f805 (patch) | |
| tree | 562df9dc61f6855309cb807be7da7d6a3a0ebc99 | |
| parent | bb96e18db435760fca4ff80f012f69e656e0c699 (diff) | |
| download | miasm-4231ba3c4783d1692227331abd24d806dfc0f805.tar.gz miasm-4231ba3c4783d1692227331abd24d806dfc0f805.zip | |
Add regression test for CPUID support
Diffstat (limited to '')
| -rwxr-xr-x | test/arch/x86/unit/mn_cpuid.py | 21 | ||||
| -rwxr-xr-x | test/test_all.py | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/arch/x86/unit/mn_cpuid.py b/test/arch/x86/unit/mn_cpuid.py new file mode 100755 index 00000000..026de207 --- /dev/null +++ b/test/arch/x86/unit/mn_cpuid.py @@ -0,0 +1,21 @@ +#! /usr/bin/env python2 + +import sys + +from asm_test import Asm_Test_32 + +class Test_CPUID(Asm_Test_32): + """Check for cpuid support (and not for arbitrary returned values)""" + TXT = ''' + main: + XOR EAX, EAX + CPUID + RET + ''' + + def check(self): + assert self.myjit.cpu.EAX == 0xa + + +if __name__ == "__main__": + [test(*sys.argv[1:])() for test in [Test_CPUID]] diff --git a/test/test_all.py b/test/test_all.py index e49ce514..ab9e4b9b 100755 --- a/test/test_all.py +++ b/test/test_all.py @@ -77,6 +77,7 @@ for script in ["x86/sem.py", "x86/unit/mn_pmovmskb.py", "x86/unit/mn_pushpop.py", "x86/unit/mn_seh.py", + "x86/unit/mn_cpuid.py", "arm/arch.py", "arm/sem.py", "aarch64/unit/mn_ubfm.py", |