https://github.com/floydz/python_x86_information
Simplified python interface to get the throughput and some other information from a x86 instruction
https://github.com/floydz/python_x86_information
assembly-x86 performance python throughput
Last synced: 10 months ago
JSON representation
Simplified python interface to get the throughput and some other information from a x86 instruction
- Host: GitHub
- URL: https://github.com/floydz/python_x86_information
- Owner: FloydZ
- License: gpl-2.0
- Archived: true
- Created: 2023-01-12T15:50:02.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-26T18:01:26.000Z (almost 2 years ago)
- Last Synced: 2025-02-13T00:43:01.557Z (11 months ago)
- Topics: assembly-x86, performance, python, throughput
- Language: Python
- Homepage:
- Size: 185 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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](https://github.com/campagnola/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:
```python
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
```python
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](https://github.com/zwegner/x86-info-term) and
[uops](https://uica.uops.info/)
- [Intel](https://www.intel.com/content/dam/develop/public/us/en/include/intrinsics-guide/data-latest.xml)
- [uops](https://www.uops.info/instructions.xml)
TODO:
======
- [ ] parser for the C type language in intel description