From de5120ed0c472d945131d346d5c8283d143083f4 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 16 Jul 2024 19:20:10 +1000 Subject: [PATCH] Constify three ARM and AArch64 variables (#2399) * arm: Constify arm_flag_regs * aarch64: Constify aarch64_flag_regs and aarch64_flag_sys_regs --- arch/AArch64/AArch64Mapping.c | 4 ++-- arch/ARM/ARMMapping.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/AArch64/AArch64Mapping.c b/arch/AArch64/AArch64Mapping.c index 8ca2a6a4b8..ceaaff7d90 100644 --- a/arch/AArch64/AArch64Mapping.c +++ b/arch/AArch64/AArch64Mapping.c @@ -20,11 +20,11 @@ #include "AArch64Mapping.h" #ifndef CAPSTONE_DIET -static aarch64_reg aarch64_flag_regs[] = { +static const aarch64_reg aarch64_flag_regs[] = { AARCH64_REG_NZCV, }; -static aarch64_sysreg aarch64_flag_sys_regs[] = { +static const aarch64_sysreg aarch64_flag_sys_regs[] = { AARCH64_SYSREG_NZCV, AARCH64_SYSREG_PMOVSCLR_EL0, AARCH64_SYSREG_PMOVSSET_EL0, AARCH64_SYSREG_SPMOVSCLR_EL0, AARCH64_SYSREG_SPMOVSSET_EL0 diff --git a/arch/ARM/ARMMapping.c b/arch/ARM/ARMMapping.c index b11326aef3..22ba146d32 100644 --- a/arch/ARM/ARMMapping.c +++ b/arch/ARM/ARMMapping.c @@ -618,7 +618,7 @@ static const char *const insn_name_maps[] = { #endif #ifndef CAPSTONE_DIET -static arm_reg arm_flag_regs[] = { +static const arm_reg arm_flag_regs[] = { ARM_REG_APSR, ARM_REG_APSR_NZCV, ARM_REG_CPSR, ARM_REG_FPCXTNS, ARM_REG_FPCXTS, ARM_REG_FPEXC, ARM_REG_FPINST, ARM_REG_FPSCR, ARM_REG_FPSCR_NZCV,