about summary refs log tree commit diff stats
path: root/test/arch/x86/unit/access_xmm.py
blob: 950c8b56cb6f1e2eb88074a1f2eac5fad29f3936 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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