Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
bd0d9a6
sys: bump capstone to 6.0.0-alpha4, fix arm64 and sysz rename
jiegec May 23, 2025
e794cd0
rs: rename arm64 -> aarch64 and sysz -> systemz to follow upstream
jiegec May 23, 2025
e8d28fa
rs: adapt to capstone v6 changes, mainly in aarch64
jiegec May 23, 2025
82776cf
rs: use aarch64_reg::Type for windows compat
jiegec May 23, 2025
b5ba6cd
rs: run cargo fmt to make ci happy
jiegec May 23, 2025
f819683
rs, sys: mention capstone 6.0.0-alpha4 and arch renaming in CHANGELOG
jiegec May 23, 2025
81b8f84
rs: avoid possible panics in library functions
jiegec May 23, 2025
c046d65
rs: add missing doc comments
jiegec May 23, 2025
cf181eb
rs, sys: generate arm_spsr_cspr_bits as bitfield enum
jiegec May 24, 2025
dbaa68d
rs: add previously failed testcase from issue 175
jiegec May 24, 2025
2434a33
ci: rename arch_arm64 to arch_aarch64 feature
jiegec May 24, 2025
fe0037b
sys: add Alpha arch support
jiegec May 24, 2025
30395c2
rs, sys: fix feature detection after renaming
jiegec May 24, 2025
4b82151
sys: add HPPA arch support
jiegec May 24, 2025
9262f5e
sys: add LoongArch arch support
jiegec May 24, 2025
0f406b2
sys: add Xtensa arch support
jiegec May 24, 2025
5de6e80
sys: add ARC arch support
jiegec May 24, 2025
4f00085
sys: move bpf bindings around to become in order
jiegec May 24, 2025
47ec2a7
rs: add Alpha arch support
jiegec May 24, 2025
2a17cf9
sys: fix build.rs lifetime for Rust 1.70.0
jiegec May 24, 2025
240bf5d
rs: add HPPA arch support
jiegec May 24, 2025
f16b5fd
rs: add LoongArch arch support
jiegec May 24, 2025
fd27c2c
rs: rename variable to reflect its type
jiegec May 24, 2025
82bf2e2
rs: disable failing hppa test due to upstream bug
jiegec May 24, 2025
bf6ed1f
rs: add Xtensa arch support
jiegec May 24, 2025
73c58d8
rs: fix tests on windows
jiegec May 24, 2025
65d5bdd
rs: add ARC arch support
jiegec May 24, 2025
f541a20
rs: fix type conversion on windows
jiegec May 24, 2025
265669b
rs: bump capstone to 6.0.0-Alpha4-8-gefc0ba44 to fix upstream bugs
jiegec May 26, 2025
b042b2a
rs: update tests after upstream bugs are fixed
jiegec May 26, 2025
804f160
rs: test CS_OPT_UNSIGNED using x86 code
jiegec May 26, 2025
9905c32
rs, sys: bump capstone to 6.0.0-Alpha4-13-gfe6bdc6e
jiegec Jun 15, 2025
202cf86
sys: bump capstone to 6.0.0-Alpha4-25-g717d8b05
jiegec Jul 9, 2025
f8f2520
rs: bump capstone to 6.0.0-Alpha4-25-g717d8b05
jiegec Jul 9, 2025
4b199bb
rs: add access mode to sparc operand
jiegec Jul 9, 2025
d878ee3
rs: document recent changes in CHANGELOG
jiegec Jul 9, 2025
05aea5d
rs: update tests for sparc, not a bug actually
jiegec Jul 9, 2025
6c99b35
rs: apply cargo clippy
jiegec Jul 9, 2025
0f57559
rs: fix tests on windows
jiegec Jul 9, 2025
36a2b30
rs, sys: bump capstone to 6.0.0-Alpha5
jiegec Aug 4, 2025
071ee66
rs: zero initialize cs_insn to make valgrind happy
jiegec Aug 4, 2025
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
Prev Previous commit
Next Next commit
sys: bump capstone to 6.0.0-Alpha4-25-g717d8b05
  • Loading branch information
jiegec committed Aug 4, 2025
commit 202cf86b5faae6afd149bb2af71054e9990e8e2d
39 changes: 32 additions & 7 deletions capstone-sys/capstone/.github/workflows/CITest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,37 @@ jobs:
arch: x64,
build-system: 'cmake',
diet-build: 'OFF',
enable-asan: 'OFF'
enable-asan: 'OFF',
build_type: 'Debug'
}
- {
name: 'ubuntu-22.04 x64 release - assert warn',
os: ubuntu-22.04,
arch: x64,
build-system: 'cmake',
diet-build: 'OFF',
enable-asan: 'OFF',
build_type: 'Release',
build_options: '-DCAPSTONE_ASSERTION_WARNINGS=ON'
}
- {
name: 'ubuntu-22.04 x64 release - no asserts',
os: ubuntu-22.04,
arch: x64,
build-system: 'cmake',
diet-build: 'OFF',
enable-asan: 'OFF',
build_type: 'Release',
build_options: '-DCAPSTONE_ASSERTION_WARNINGS=OFF'
}
- {
name: 'ubuntu-24.04 x64 ASAN',
os: ubuntu-24.04,
arch: x64,
build-system: 'cmake',
diet-build: 'OFF',
enable-asan: 'ON'
enable-asan: 'ON',
build_type: 'Debug'
}

steps:
Expand All @@ -85,14 +107,16 @@ jobs:
if: startsWith(matrix.config.build-system, 'cmake')
env:
asan: ${{ matrix.config.enable-asan }}
build_option: ${{ matrix.config.build_option }}
build_type: ${{ matrix.config.build_type }}
run: |
mkdir build && cd build
# build static library
cmake -DCAPSTONE_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_ASAN=${asan} -DCAPSTONE_BUILD_DIET=${diet_build} ..
cmake --build . --config Debug
cmake -DCAPSTONE_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_ASAN=${asan} -DCAPSTONE_BUILD_DIET=${diet_build} ${build_option} ..
cmake --build . --config ${build_type}
# build shared library
cmake -DCAPSTONE_INSTALL=1 -DCAPSTONE_BUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX=/usr -DCAPSTONE_BUILD_CSTEST=ON -DENABLE_ASAN=${asan} ..
sudo cmake --build . --config Debug --target install
cmake -DCAPSTONE_INSTALL=1 -DCAPSTONE_BUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX=/usr -DCAPSTONE_BUILD_CSTEST=ON -DENABLE_ASAN=${asan} ${build_option} ..
sudo cmake --build . --config ${build_type} --target install

- name: Lower number of KASL randomized address bits
run: |
Expand Down Expand Up @@ -141,7 +165,8 @@ jobs:
- name: Valgrind cstest
if: startsWith(matrix.config.build-system, 'cmake') && startsWith(matrix.config.enable-asan, 'OFF')
run: |
sudo apt-get install valgrind
sudo apt-get -y update
sudo apt-get -y install valgrind
valgrind cstest tests

- name: Comaptibility header generation
Expand Down
139 changes: 14 additions & 125 deletions capstone-sys/capstone/.github/workflows/build-wheels-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ env:
CAPSTONE_DEBUG: ${{ inputs.debugMode != '' && inputs.debugMode || startsWith(github.ref, 'refs/tags') && '0' || '1' }}

jobs:
# job to be executed for every push - testing purpose
build_wheels_always:
build_and_test_wheels:
name: Building on ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.cibw_build }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -44,28 +43,27 @@ jobs:
include:
# NOTE: Making this to parallelize and speed up workflow
# i686 - manylinux
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp38-manylinux* cp313-manylinux*', cibw_skip: '' }
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp*-manylinux*', cibw_skip: '*36* *37*' }
# i686 - musllinux
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp38-musllinux* cp313-musllinux*', cibw_skip: '' }
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp*-musllinux*', cibw_skip: '*36* *37*' }
# x86_64 - manylinux
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp38-manylinux* cp313-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp*-manylinux*', cibw_skip: '*36* *37*' }
# x86_64 - musllinux
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp38-musllinux* cp313-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp*-musllinux*', cibw_skip: '*36* *37*' }
# aarch64 - manylinux
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp38-manylinux* cp313-manylinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp*-manylinux*', cibw_skip: '*36* *37*' }
# aarch64 - musllinux
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp38-musllinux* cp313-musllinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp*-musllinux*', cibw_skip: '*36* *37*' }
# macos - x86_64
- { os: macos-13, arch: x86_64, cibw_build: 'cp38* cp313*', cibw_skip: '' }
- { os: macos-13, arch: x86_64, cibw_build: 'cp*', cibw_skip: '*36* *37*' }
# macos - arm64
- { os: macos-latest, arch: arm64, cibw_build: 'cp38* cp313*', cibw_skip: '' }
- { os: macos-latest, arch: universal2, cibw_build: 'cp38* cp313*', cibw_skip: '' }
- { os: macos-latest, arch: arm64, cibw_build: 'cp*', cibw_skip: '*36* *37*' }
# windows - amd64
- { os: windows-latest, arch: AMD64, cibw_build: 'cp38* cp313*', cibw_skip: '' }
- { os: windows-latest, arch: AMD64, cibw_build: 'cp*', cibw_skip: '*36* *37*' }
# windows - x86
# - { os: windows-latest, arch: x86, cibw_build: 'cp38* cp313*', cibw_skip: '' }
# - { os: windows-latest, arch: x86, cibw_build: 'cp*', cibw_skip: '*36* *37*' }
# windows - arm64
- { os: windows-latest, arch: ARM64, cibw_build: 'cp39* cp313*', cibw_skip: '' }
- { os: windows-latest, arch: ARM64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38*' }

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -108,7 +106,7 @@ jobs:
uses: docker/setup-qemu-action@v3

- name: '🚧 cibuildwheel run'
uses: pypa/cibuildwheel@v2.22.0
uses: pypa/cibuildwheel@v2.23.3
env:
CIBW_BUILD_FRONTEND: build
CIBW_BUILD: ${{ matrix.cibw_build }}
Expand All @@ -131,115 +129,6 @@ jobs:
name: ${{ env.ARTIFACT_NAME }}
path: ./wheelhouse/*.whl

# To be executed only in case of a tag release
build_wheels_all:
name: Building on ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.cibw_build }}
runs-on: ${{ matrix.os }}
if: startsWith(github.ref, 'refs/tags')
strategy:
fail-fast: false
matrix:
include:
# NOTE: Making this to parallelize and speed up workflow
# i686 - manylinux
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
# i686 - musllinux
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
# - { os: ubuntu-latest, arch: i686, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
# x86_64 - manylinux
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
# x86_64 - musllinux
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
# aarch64 - manylinux
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
# aarch64 - musllinux
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
# macos - x86_64
- { os: macos-13, arch: x86_64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38* *313*' }
# macos - arm64
- { os: macos-latest, arch: arm64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38* *313*' }
- { os: macos-latest, arch: universal2, cibw_build: 'cp*', cibw_skip: '*36* *37* *38* *39* *313*' }
# windows - amd64
- { os: windows-latest, arch: AMD64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38* *313*' }
# windows - x86
# - { os: windows-latest, arch: x86, cibw_build: 'cp*', cibw_skip: '*36* *37* *38* *313*' }
# windows - arm64
- { os: windows-latest, arch: ARM64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38* *39* *313*' }

steps:
- uses: actions/checkout@v4

# https://github.com/actions/upload-artifact/issues/22
- name: Prepare a unique name for Artifacts
shell: bash
run: |
# replace not-allowed chars with dash
name="cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cibw_build }}"
name=$(echo -n "$name" | sed -e 's/[ \t:\/\\"<>|*?]/-/g' -e 's/--*/-/g' | sed -e 's/\-$//')
echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV

- name: '🛠️ Win MSVC 32 dev cmd setup'
if: runner.os == 'Windows' && matrix.arch == 'x86'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86

- name: '🛠️ Win MSVC 64 dev cmd setup'
if: runner.os == 'Windows' && matrix.arch == 'AMD64'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: '🛠️ Win MSVC ARM64 dev cmd setup'
if: runner.os == 'Windows' && matrix.arch == 'ARM64'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_arm64

- name: '🛠️ Set up QEMU'
if: runner.os == 'Linux' && matrix.arch == 'i686'
uses: docker/setup-qemu-action@v3

- name: '🚧 cibuildwheel run'
uses: pypa/[email protected]
env:
CIBW_BUILD_FRONTEND: build
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_SKIP: ${{ matrix.cibw_skip }}
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_ENVIRONMENT: DEBUG=${{ env.CAPSTONE_DEBUG }}
CIBW_ENVIRONMENT_PASS_LINUX: DEBUG
# https://cibuildwheel.pypa.io/en/stable/faq/#windows-arm64
CIBW_TEST_SKIP: "*-win_arm64"
CIBW_TEST_COMMAND: >
python -m pip install {package}/cstest_py &&
python {project}/suite/run_tests.py
with:
package-dir: bindings/python
output-dir: wheelhouse

- uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ./wheelhouse/*.whl

make_sdist:
name: Make SDist
runs-on: ubuntu-latest
Expand All @@ -262,7 +151,7 @@ jobs:
path: bindings/python/dist/*.tar.gz

publish:
needs: [ build_wheels_always, build_wheels_all, make_sdist ]
needs: [ build_and_test_wheels, make_sdist ]
environment: pypi
permissions:
id-token: write
Expand Down
20 changes: 15 additions & 5 deletions capstone-sys/capstone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ option(CAPSTONE_USE_DEFAULT_ALLOC "Use default memory allocation functions" ON)
option(CAPSTONE_USE_ARCH_REGISTRATION "Use explicit architecture registration" OFF)
option(CAPSTONE_ARCHITECTURE_DEFAULT "Whether architectures are enabled by default" ON)
option(CAPSTONE_DEBUG "Whether to enable extra debug assertions (enabled with CMAKE_BUILD_TYPE=Debug)" OFF)
option(CAPSTONE_ASSERTION_WARNINGS "Warns about hit assertions in release builds." OFF)
option(CAPSTONE_INSTALL "Generate install target" ${PROJECT_IS_TOP_LEVEL})
option(ENABLE_ASAN "Enable address sanitizer" OFF)
option(ENABLE_COVERAGE "Enable test coverage" OFF)
Expand Down Expand Up @@ -411,21 +412,30 @@ if(CAPSTONE_SPARC_SUPPORT)
add_definitions(-DCAPSTONE_HAS_SPARC)
set(SOURCES_SPARC
arch/Sparc/SparcDisassembler.c
arch/Sparc/SparcDisassemblerExtension.c
arch/Sparc/SparcInstPrinter.c
arch/Sparc/SparcMapping.c
arch/Sparc/SparcModule.c
)
set(HEADERS_SPARC
arch/Sparc/Sparc.h
arch/Sparc/SparcDisassembler.h
arch/Sparc/SparcDisassemblerExtension.h
arch/Sparc/SparcInstPrinter.h
arch/Sparc/SparcLinkage.h
arch/Sparc/SparcMCTargetDesc.h
arch/Sparc/SparcMapping.h
arch/Sparc/SparcModule.h
arch/Sparc/SparcGenAsmWriter.inc
arch/Sparc/SparcGenCSAliasMnemMap.inc
arch/Sparc/SparcGenCSFeatureName.inc
arch/Sparc/SparcGenCSMappingInsn.inc
arch/Sparc/SparcGenCSMappingInsnName.inc
arch/Sparc/SparcGenCSMappingInsnOp.inc
arch/Sparc/SparcGenCSOpGroup.inc
arch/Sparc/SparcGenDisassemblerTables.inc
arch/Sparc/SparcGenInstrInfo.inc
arch/Sparc/SparcGenRegisterInfo.inc
arch/Sparc/SparcGenSubtargetInfo.inc
arch/Sparc/SparcInstPrinter.h
arch/Sparc/SparcMapping.h
arch/Sparc/SparcMappingInsn.inc
arch/Sparc/SparcGenSystemOperands.inc
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion capstone-sys/capstone/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ Adding an Architecture

If your architecture is supported in LLVM or one of its forks, you can use `Auto-Sync` to
add the new module.
Checkout [suite/auto-sync/README.md](suite/auto-sync/README.md).
Checkout [suite/auto-sync/RefactorGuide.md](suite/auto-sync/RefactorGuide.md).

Otherwise, you need to implement the disassembler on your own and make it work with the Capstone API.
5 changes: 5 additions & 0 deletions capstone-sys/capstone/MCInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ extern bool PPC_getFeatureBits(unsigned int mode, unsigned int feature);
extern bool Mips_getFeatureBits(unsigned int mode, unsigned int feature);
extern bool AArch64_getFeatureBits(unsigned int mode, unsigned int feature);
extern bool TriCore_getFeatureBits(unsigned int mode, unsigned int feature);
extern bool Sparc_getFeatureBits(unsigned int mode, unsigned int feature);

static bool testFeatureBits(const MCInst *MI, uint32_t Value)
{
Expand Down Expand Up @@ -37,6 +38,10 @@ static bool testFeatureBits(const MCInst *MI, uint32_t Value)
#ifdef CAPSTONE_HAS_TRICORE
case CS_ARCH_TRICORE:
return TriCore_getFeatureBits(MI->csh->mode, Value);
#endif
#ifdef CAPSTONE_HAS_SPARC
case CS_ARCH_SPARC:
return Sparc_getFeatureBits(MI->csh->mode, Value);
#endif
}
}
Expand Down
3 changes: 3 additions & 0 deletions capstone-sys/capstone/Mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ DEFINE_get_detail_op(systemz, SystemZ);
DEFINE_get_detail_op(xtensa, Xtensa);
DEFINE_get_detail_op(bpf, BPF);
DEFINE_get_detail_op(arc, ARC);
DEFINE_get_detail_op(sparc, Sparc);

/// Returns true if for this architecture the
/// alias operands should be filled.
Expand Down Expand Up @@ -391,6 +392,8 @@ static inline bool char_ends_mnem(const char c, cs_arch arch) {
return (!c || c == ' ' || c == '\t' || c == '.');
case CS_ARCH_PPC:
return (!c || c == ' ' || c == '\t');
case CS_ARCH_SPARC:
return (!c || c == ' ' || c == '\t' || c == ',');
}
}

Expand Down
6 changes: 6 additions & 0 deletions capstone-sys/capstone/Mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ typedef struct insn_map {
systemz_suppl_info systemz;
arm_suppl_info arm;
xtensa_suppl_info xtensa;
sparc_suppl_info sparc;
} suppl_info; // Supplementary information for each instruction.
#endif
} insn_map;
Expand Down Expand Up @@ -147,6 +148,7 @@ DECL_get_detail_op(systemz, SystemZ);
DECL_get_detail_op(xtensa, Xtensa);
DECL_get_detail_op(bpf, BPF);
DECL_get_detail_op(arc, ARC);
DECL_get_detail_op(sparc, Sparc);

/// Increments the detail->arch.op_count by one.
#define DEFINE_inc_detail_op_count(arch, ARCH) \
Expand Down Expand Up @@ -188,6 +190,8 @@ DEFINE_inc_detail_op_count(bpf, BPF);
DEFINE_dec_detail_op_count(bpf, BPF);
DEFINE_inc_detail_op_count(arc, ARC);
DEFINE_dec_detail_op_count(arc, ARC);
DEFINE_inc_detail_op_count(sparc, Sparc);
DEFINE_dec_detail_op_count(sparc, Sparc);

/// Returns true if a memory operand is currently edited.
static inline bool doing_mem(const MCInst *MI)
Expand Down Expand Up @@ -222,6 +226,7 @@ DEFINE_get_arch_detail(arc, ARC);
DEFINE_get_arch_detail(systemz, SystemZ);
DEFINE_get_arch_detail(xtensa, Xtensa);
DEFINE_get_arch_detail(bpf, BPF);
DEFINE_get_arch_detail(sparc, Sparc);

#define DEFINE_check_safe_inc(Arch, ARCH) \
static inline void Arch##_check_safe_inc(const MCInst *MI) { \
Expand All @@ -240,6 +245,7 @@ DEFINE_check_safe_inc(SystemZ, SYSTEMZ);
DEFINE_check_safe_inc(Mips, MIPS);
DEFINE_check_safe_inc(BPF, BPF);
DEFINE_check_safe_inc(ARC, ARC);
DEFINE_check_safe_inc(Sparc, SPARC);

static inline bool detail_is_set(const MCInst *MI)
{
Expand Down
Loading