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 /test/arch/x86/unit | |
| 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 |
1 files changed, 21 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]] |