diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2018-05-17 12:31:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-17 12:31:35 +0200 |
| commit | f6a9db54b4f385d680abfe91b33c7c5f577118cb (patch) | |
| tree | 37ec6ee8f5c153aa34f7476d76053578eb50a69d /test | |
| parent | cb1e73d65b99b5e6f73bd7823b6142e99ef9994a (diff) | |
| parent | 23cee4aeb4d667b6ff93b279a8619acf56a70bc3 (diff) | |
| download | miasm-f6a9db54b4f385d680abfe91b33c7c5f577118cb.tar.gz miasm-f6a9db54b4f385d680abfe91b33c7c5f577118cb.zip | |
Merge pull request #746 from commial/feature/XMM-regs
Feature/xmm regs
Diffstat (limited to 'test')
| -rw-r--r-- | test/arch/x86/unit/access_xmm.py | 16 | ||||
| -rwxr-xr-x | test/test_all.py | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/arch/x86/unit/access_xmm.py b/test/arch/x86/unit/access_xmm.py new file mode 100644 index 00000000..950c8b56 --- /dev/null +++ b/test/arch/x86/unit/access_xmm.py @@ -0,0 +1,16 @@ +#! /usr/bin/env python2 +"""Test getter and setter for XMM registers (128 bits)""" + +from miasm2.analysis.machine import Machine + +# Jitter engine doesn't matter, use the always available 'python' one +myjit = Machine("x86_32").jitter("python") + +# Test basic access (get) +assert myjit.cpu.XMM0 == 0 + +# Test set +myjit.cpu.XMM1 = 0x00112233445566778899aabbccddeeffL + +# Ensure set has been correctly handled +assert myjit.cpu.XMM1 == 0x00112233445566778899aabbccddeeffL diff --git a/test/test_all.py b/test/test_all.py index 3572bda7..f9c90759 100755 --- a/test/test_all.py +++ b/test/test_all.py @@ -97,6 +97,8 @@ for script in ["x86/sem.py", tags = [TAGS[jitter]] if jitter in TAGS else [] testset += ArchUnitTest(script, jitter, base_dir="arch", tags=tags) +testset += ArchUnitTest("x86/unit/access_xmm.py", "python", base_dir="arch") + ### QEMU regression tests class QEMUTest(RegressionTest): """Test against QEMU regression tests |