Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: ilammy/msvc-dev-cmd@v1

- uses: actions/setup-python@v4
with:
python-version: '3.10.4'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: ilammy/msvc-dev-cmd@v1

- uses: actions/setup-python@v4
with:
python-version: '3.10.4'
Expand Down
51 changes: 49 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,60 @@ powershell -ExecutionPolicy Bypass -File ".\env\Scripts\Activate.ps1"
Then, each time you open a terminal, enter the venv:
* Windows: `.\env\Scripts\Activate.ps1`
* Good OSes: `source ./env/bin/activate`

### Install dependencies

```shell
To prepare your venv with necessary tools for the build scripts, follow these next steps.

You'll need a C build toolchain (for Capstone) and various Python packages from the dependency file.

<details>
<summary>Debian</summary>

```
sudo apt install cmake build-essential
source ./env/bin/activate
pip install -r requirements.txt
```

</details>

<details>
<summary>macOS</summary>

```
brew install cmake
source ./env/bin/activate
pip install -r requirements.txt
```

</details>

<details>
<summary>Windows</summary>

Make sure you have Visual Studio 2019 with C toolchain and Windows 10 SDK.

Run in PowerShell Admin:

```pwsh
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=User'
choco install visualstudio2019buildtools
```

Exit your terminal or editor and relaunch (if the terminal is embedded in your editor, you still need to relaunch the entire editor).

Run in normal PowerShell (i fucking hate Windows):

```pwsh
$vs_install=(& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath)
cmd.exe /c ('"' + $vs_install + '\VC\Auxiliary\Build\vcvarsall.bat" amd64 && .\env\Scripts\activate.bat && pip install -r requirements.txt')
```

If this fails, create a new PowerShell session and do not enter venv until the installation succeeds.
Windows is truly the worst.

</details>

### Unit testing

We use [pytest](https://pytest.org).
Expand Down
32 changes: 32 additions & 0 deletions asm/macros.inc
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,35 @@
.set qr5, 5
.set qr6, 6
.set qr7, 7
.set cr0lt, 0
.set cr0gt, 1
.set cr0eq, 2
.set cr0un, 3
.set cr1lt, 4
.set cr1gt, 5
.set cr1eq, 6
.set cr1un, 7
.set cr2lt, 8
.set cr2gt, 9
.set cr2eq, 10
.set cr2un, 11
.set cr3lt, 12
.set cr3gt, 13
.set cr3eq, 14
.set cr3un, 15
.set cr4lt, 16
.set cr4gt, 17
.set cr4eq, 18
.set cr4un, 19
.set cr5lt, 20
.set cr5gt, 21
.set cr5eq, 22
.set cr5un, 23
.set cr6lt, 24
.set cr6gt, 25
.set cr6eq, 26
.set cr6un, 27
.set cr7lt, 28
.set cr7gt, 29
.set cr7eq, 30
.set cr7un, 31
Loading