Files
Samir Shetty 0d9567f08c Fix build compatibility with CMake 4, GCC 15, and MSVC (#600)
* 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.
2026-07-18 17:28:10 -04:00
..
2020-06-13 14:22:49 +08:00
2020-06-13 14:22:49 +08:00
2016-04-28 21:06:49 +08:00
2016-05-06 21:33:45 +08:00

This directory contains kstool of Keystone engine.