Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

FloydZ/python_x86_information

Repository files navigation

Intel x86/64 instruction information python package. Let you easily pull all sorts of information for a instruction via python.

Features:

  • in memory compiler/assembler via pycca

Installation:

Run:

git clone https://github.com/FloydZ/python_x86_information
cd python_x86_information
./setup.sh

Note the setup.sh script at the end. its needed to download all necessary data.

Nix:

simply run:

nix-shell

to start the development

Usage:

To recieve general information about an instruction you can call:

i = information("adc")
print(i)

All function return a list of return values if it was not possible to detect precisly which instruction was meant.

To get the exact instruction infromation returned call one the following

information("adc", ["rax", "rbx"])
information("adc", "r64, rbx")

Note that you can either pass the arguments as a list of strings or as a single string. Also you can either pass the original register/memory 'names' or their types like r16,r32,r64,m64 and so on.

Furthermore each function has an additional parameter called arch, which let one to specify the architecture for which the information should be returned. Allowed values are 'CON', 'WOL', 'NHM', 'WSM', 'SNB', 'IVB', 'HSW', 'BDW', 'SKL', 'SKX', 'KBL', 'CFL', 'CNL', 'ICL', 'ZEN+', 'ZEN2'

Information Source:

Many thanks to the great work of zwegners x86-info-term and uops

TODO:

  • parser for the C type language in intel description

About

Simplified python interface to get the throughput and some other information from a x86 instruction

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published