mirror of
https://github.com/keystone-engine/keystone.git
synced 2026-10-12 02:17:10 +00:00
* Support building with CMake 4 Adapted from https://github.com/NixOS/nixpkgs/pull/450265 * Support building with GCC 15 Adapted from https://github.com/NixOS/nixpkgs/pull/450265 * Fix building with MSVC * RISCV: Add RegSize/Alignment fields to RISCVGenRegisterInfo.inc initializers Keystone's MCRegisterClass retains the RegSize and Alignment fields from the LLVM 4.0 era, before they were moved to TargetRegisterInfo in LLVM 5.0 (D31783) and eventually removed from MCRegisterClass entirely in LLVM 7.0 (rL339350). The RISCV backend was ported from a newer LLVM snapshot where these fields no longer existed, so RISCVGenRegisterInfo.inc was generated without them, causing a member count mismatch against keystone's MCRegisterClass definition and a compile error on MSVC (C3852). Add the missing RegSize and Alignment values to each register class initializer to match the layout expected by MCRegisterClass. The values chosen reflect the natural register width of each class (4 bytes for FPR32, 8 bytes for all others). These fields are structurally required to satisfy the initializer but are never consulted by the assembler — spill slot calculations belong to the codegen layer which keystone does not include. All other architectures in keystone were ported from pre-LLVM-5.0 and have correct initializers. This change makes RISCV consistent with them.
This directory contains kstool of Keystone engine.