jit/decoder: Add generated arm32 tests

Introduces the first unit tests for the ARM32 JIT decoder. A new script
automatically generates a test case for every instruction in arm32.inc,
providing 100% of the isa.

This also includes a critical rework of the decoder's lookup table
generation logic. The previous hashing method was flawed, causing
build-time overflows and incorrect instruction matching (shadowing) for
patterns with wildcards. The new algorithm correctly populates the
lookup table.

Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
Ronald Caesar 2025-11-30 04:47:52 -04:00
parent c235e57071
commit d1e3919a8c
No known key found for this signature in database
GPG key ID: 04307C401999C596
13 changed files with 37513 additions and 502 deletions

View file

@ -114,15 +114,16 @@ jobs:
- name: Install Dependencies
run: |
brew install llvm
brew install llvm@20
echo "CMAKE_PREFIX_PATH=/usr/local/opt/llvm@20" >> $GITHUB_ENV
- name: Configure CMake (x86_64)
run: >
cmake -G Ninja -B "${{env.BUILD_DIR}}"
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_OSX_ARCHITECTURES=x86_64
-DCMAKE_C_COMPILER=$(brew --prefix llvm)/bin/clang
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++
-DCMAKE_C_COMPILER=/usr/local/opt/llvm@20/bin/clang
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@20/bin/clang++
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
- name: Build (x86_64)
@ -156,14 +157,15 @@ jobs:
- name: Install Dependencies
run: |
brew install llvm
brew install llvm@20
echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/llvm@20" >> $GITHUB_ENV
- name: Configure CMake (ARM64)
run: >
cmake -G Ninja -B "${{env.BUILD_DIR}}"
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_C_COMPILER=$(brew --prefix llvm)/bin/clang
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++
-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm@20/bin/clang
-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm@20/bin/clang++
-DCMAKE_OSX_ARCHITECTURES=arm64
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15