Skip to content

Commit

Permalink
add tests for umov aarch64
Browse files Browse the repository at this point in the history
remove capstone 4.0.1 from CI
  • Loading branch information
psi-func committed May 29, 2024
1 parent 3af75ac commit faa006f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
matrix:
python-version: ['3.8', '3.9', '3.10']
boost-interface: ['ON', 'OFF']
capstone-version: ['5.0.1', '4.0.2']
capstone-version: ['5.0.1']
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ jobs:

- name: Download Capstone
run: |
wget -UseBasicParsing https://github.com/capstone-engine/capstone/releases/download/4.0.2/capstone-4.0.2-win64.zip -O capstone-4.0.2-win64.zip
tar -xf capstone-4.0.2-win64.zip
wget -UseBasicParsing https://github.com/capstone-engine/capstone/archive/refs/tags/5.0.1.zip -O capstone-5.0.1.zip
tar -xf capstone-5.0.1.zip
mkdir -p capstone-5.0.1/build && cd capstone-5.0.1/build && ../nmake.bat
shell: powershell

- name: Build Triton Python package
Expand All @@ -121,8 +122,8 @@ jobs:
PYTHON_LIBRARY: ${{ env.pythonLocation }}\libs\${{ matrix.pylib }}
Z3_INCLUDE_DIRS: ${{ github.workspace }}\z3-4.12.2-x64-win\include
Z3_LIBRARIES: ${{ github.workspace }}\z3-4.12.2-x64-win\bin\libz3.lib
CAPSTONE_INCLUDE_DIRS: ${{ github.workspace }}\capstone-4.0.2-win64\include
CAPSTONE_LIBRARIES: ${{ github.workspace }}\capstone-4.0.2-win64\capstone.lib
CAPSTONE_INCLUDE_DIRS: ${{ github.workspace }}\capstone-5.0.1\include
CAPSTONE_LIBRARIES: ${{ github.workspace }}\capstone-5.0.1\build\capstone.lib

- name: Repair wheel package
run: |
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ endif()

# Find Capstone
message(STATUS "Compiling with Capstone")
find_package(CAPSTONE REQUIRED)
find_package(CAPSTONE 5 REQUIRED)
message(STATUS "CAPSTONE version: ${CAPSTONE_VERSION}")
if(TARGET capstone::capstone)
link_libraries(capstone::capstone)
Expand Down
11 changes: 11 additions & 0 deletions src/testers/aarch64/unicorn_test_aarch64.py
Original file line number Diff line number Diff line change
Expand Up @@ -2141,6 +2141,17 @@
(b"\x20\x1c\xa2\x0e", "orr v0.8b, v1.8b, v2.8b"),
(b"\x20\x1c\x22\x4e", "and v0.16b, v1.16b, v2.16b"),
(b"\x20\x1c\x22\x0e", "and v0.8b, v1.8b, v2.8b"),

#(b"\x61\x3d\x01\x0e", "umov w1, v11.b[0]"), # working on capstone 5.x but not on 4.x
#(b"\x61\x3d\x03\x0e", "umov w1, v11.b[1]"), # working on capstone 5.x but not on 4.x
#(b"\x68\x3c\x16\x0e", "umov w8, v3.H[5]"), # working on capstone 5.x but not on 4.x
#(b"\x49\x3c\x06\x0e", "umov w9, v2.H[1]"), # working on capstone 5.x but not on 4.x

#(b"\x43\x3c\x1c\x0e", "umov w3, v2.S[3]"), # working on capstone next branch but not on 4.x or 5.x
#(b"\x29\x3c\x0c\x0e", "umov w9, v1.S[1]"), # working on capstone next branch but not on 4.x or 5.x
#(b"\x22\x3c\x18\x4e", "umov x4, v1.D[1]"), # working on capstone next branch but not on 4.x or 5.x
#(b"\x21\x3c\x08\x4e", "umov x5, v1.D[0]"), # working on capstone next branch but not on 4.x or 5.x

]

def emu_with_unicorn(opcode, istate):
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"z3"
],
"overrides": [
{ "name":"capstone", "version-semver":"5.0.0-rc2" }
{ "name":"capstone", "version-semver":"5.0.1" }
]
}

0 comments on commit faa006f

Please sign in to comment.