smallworld.state.cpus

class smallworld.state.cpus.CPU

A CPU state object.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.AArch64

Auto-generated CPU state for aarch64:v8a:little

Generated from Pcode language AARCH64:LE:64:v8A, and Unicorn package unicorn.arm64_const.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.AMD64

Generic AMD64 CPU state model.

Specific implementations support different vector extensions. Because of how smallworld works, an emulator can only support platforms if it supports all base registers. Since the AVX extensions keep adding registers under the old ones, we need new platforms.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.ARMv5T

CPU Model for ARMv5t little-endian.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.ARMv6M

CPU Model for ARMv6-M little-endian.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.ARMv6MThumb

CPU Model for ARMv6-M little-endian in thumb mode.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.ARMv7M

CPU Model for ARMv7-M little-endian.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.ARMv7R

CPU Model for ARMv7-R little-endian.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.ARMv7A

CPU Model for ARMv7-A little-endian.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.I386

i386 CPU state model.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.LoongArch64
add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.M68K

Motorola 68K CPU state model

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.MIPS64EL

Auto-generated CPU state for mips:mips32:little.

Generated from Pcode language MIPS:LE:32:default, and Unicorn package unicorn.mips_const.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.MIPS64BE

Auto-generated CPU state for mips:mips32:big.

Generated from Pcode language MIPS:BE:32:default, and Unicorn package unicorn.mips_const.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.MIPSEL

Auto-generated CPU state for mips:mips32:little.

Generated from Pcode language MIPS:LE:32:default, and Unicorn package unicorn.mips_const.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.MIPSBE

Auto-generated CPU state for mips:mips32:big.

Generated from Pcode language MIPS:BE:32:default, and Unicorn package unicorn.mips_const.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.MSP430
add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.MSP430X
add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.PowerPC32

CPU state for 32-bit PowerPC.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.PowerPC64

CPU state for 64-bit PowerPC.

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.RISCV64

CPU state for riscv64

add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.XTensaBE
add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

class smallworld.state.cpus.XTensaEL
add(item)

Add an element.

apply(emulator: Emulator) None

Apply state to an emulator.

Parameters:

emulator – The emulator to which state should applied.

clear()

This is slow (creates N new iterators!) but effective.

discard(item)

Remove an element. Do not raise an exception if absent.

extract(emulator: Emulator) None

Load state from an emulator.

Parameters:

emulator – The emulator from which to load

classmethod for_platform(platform: Platform)

Get a CPU object for a given platform specifier.

Parameters:

platform – The platform specificer for the desired CPU object.

Returns:

An instance of the desired CPU.

classmethod get_platform() Platform

Get the platform object for this CPU.

Returns:

The platform object for this CPU.

isdisjoint(other)

Return True if two sets have a null intersection.

pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.