blob: c7ecfb1e1527ebbd7eabb00d4f7be0792073a652 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#! /usr/bin/env python2
"""Test getter and setter for XMM registers (128 bits)"""
from miasm.analysis.machine import Machine
from miasm.core.locationdb import LocationDB
# Jitter engine doesn't matter, use the always available 'python' one
loc_db = LocationDB()
myjit = Machine("x86_32").jitter(loc_db, "python")
# Test basic access (get)
assert myjit.cpu.XMM0 == 0
# Test set
myjit.cpu.XMM1 = 0x00112233445566778899aabbccddeeff
# Ensure set has been correctly handled
assert myjit.cpu.XMM1 == 0x00112233445566778899aabbccddeeff
|