17 #ifdef CAPSTONE_HAS_ARM64
19 #if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)
20 #pragma warning(disable:4996)
21 #pragma warning(disable:28719)
24 #include "../../utils.h"
34 for (
i = 0;
i <
N->NumPairs; ++
i) {
35 if (
N->Pairs[
i].Value == Value) {
37 return N->Pairs[
i].Name;
47 static bool compare_lower_str(
const char *
s1,
const char *
s2)
51 for (
c = lower; *
c;
c++)
54 res = (strcmp(
s1, lower) == 0);
63 for (
i = 0;
i <
N->NumPairs; ++
i) {
64 if (compare_lower_str(
N->Pairs[
i].Name, Name)) {
66 return N->Pairs[
i].Value;
76 return Value <
N->TooBigImm;
81 static char *utostr(
uint64_t X,
bool isNeg)
84 char *BufPtr = Buffer+21;
88 if (
X == 0) *--BufPtr =
'0';
91 *--BufPtr =
X % 10 +
'0';
95 if (isNeg) *--BufPtr =
'-';
634 char *Op0S, *Op1S, *CRnS, *CRmS, *Op2S;
639 if (SysRegPairs[
i].Value == Bits) {
640 strcpy(result, SysRegPairs[
i].Name);
648 for (
i = 0;
i <
ARR_SIZE(CycloneSysRegPairs); ++
i) {
649 if (CycloneSysRegPairs[
i].Value == Bits) {
650 strcpy(result, CycloneSysRegPairs[
i].Name);
658 for (
i = 0;
i <
S->NumInstPairs; ++
i) {
659 if (
S->InstPairs[
i].Value == Bits) {
660 strcpy(result,
S->InstPairs[
i].Name);
665 Op0 = (Bits >> 14) & 0x3;
666 Op1 = (Bits >> 11) & 0x7;
667 CRn = (Bits >> 7) & 0xf;
668 CRm = (Bits >> 3) & 0xf;
671 Op0S = utostr(Op0,
false);
672 Op1S = utostr(Op1,
false);
673 CRnS = utostr(CRn,
false);
674 CRmS = utostr(CRm,
false);
675 Op2S = utostr(Op2,
false);
678 dummy =
cs_snprintf(result, 128,
"s3_%s_c%s_c%s_%s", Op1S, CRnS, CRmS, Op2S);
@ A64SysReg_CPM_IOACC_CTL_EL3
bool A64NamedImmMapper_validImm(const A64NamedImmMapper *N, uint32_t Value)
@ A64SysReg_ICC_ASGI1R_EL1
@ A64SysReg_ICC_SGI0R_EL1
@ A64SysReg_ICC_EOIR1_EL1
@ A64SysReg_ICC_SGI1R_EL1
@ A64SysReg_ICC_EOIR0_EL1
const A64NamedImmMapper A64PState_PStateMapper
const A64NamedImmMapper A64ISB_ISBMapper
const A64NamedImmMapper A64TLBI_TLBIMapper
const A64SysRegMapper AArch64_MRSMapper
@ A64SysReg_PMEVTYPER29_EL0
@ A64SysReg_CNTV_CVAL_EL02
@ A64SysReg_ICC_SEIEN_EL1
@ A64SysReg_TRCEVENTCTL0R
@ A64SysReg_PMEVCNTR27_EL0
@ A64SysReg_PMEVTYPER4_EL0
@ A64SysReg_CNTPS_TVAL_EL1
@ A64SysReg_ICH_AP0R3_EL2
@ A64SysReg_PMEVCNTR17_EL0
@ A64SysReg_ICH_AP0R2_EL2
@ A64SysReg_PMEVCNTR4_EL0
@ A64SysReg_PMEVTYPER6_EL0
@ A64SysReg_PMEVCNTR3_EL0
@ A64SysReg_PMCNTENSET_EL0
@ A64SysReg_ICC_AP0R0_EL1
@ A64SysReg_ICH_VSEIR_EL2
@ A64SysReg_CNTHP_TVAL_EL2
@ A64SysReg_CNTPS_CTL_EL1
@ A64SysReg_PMEVTYPER2_EL0
@ A64SysReg_CONTEXTIDR_EL1
@ A64SysReg_DBGCLAIMCLR_EL1
@ A64SysReg_PMEVCNTR19_EL0
@ A64SysReg_PMEVTYPER3_EL0
@ A64SysReg_PMINTENSET_EL1
@ A64SysReg_PMEVTYPER19_EL0
@ A64SysReg_PMEVCNTR23_EL0
@ A64SysReg_PMEVCNTR7_EL0
@ A64SysReg_ICH_AP1R2_EL2
@ A64SysReg_ICC_AP0R2_EL1
@ A64SysReg_CNTHP_CVAL_EL2
@ A64SysReg_CNTHP_CTL_EL2
@ A64SysReg_PMEVCNTR6_EL0
@ A64SysReg_PMEVCNTR18_EL0
@ A64SysReg_PMEVTYPER0_EL0
@ A64SysReg_PMEVTYPER20_EL0
@ A64SysReg_PMEVCNTR12_EL0
@ A64SysReg_PMEVTYPER17_EL0
@ A64SysReg_CNTP_TVAL_EL0
@ A64SysReg_PMEVCNTR10_EL0
@ A64SysReg_CNTHV_TVAL_EL2
@ A64SysReg_CONTEXTIDR_EL12
@ A64SysReg_PMEVTYPER13_EL0
@ A64SysReg_PMEVCNTR25_EL0
@ A64SysReg_CNTV_CTL_EL02
@ A64SysReg_CNTHV_CVAL_EL2
@ A64SysReg_PMBLIMITR_EL1
@ A64SysReg_PMEVTYPER11_EL0
@ A64SysReg_TRCEVENTCTL1R
@ A64SysReg_PMEVTYPER30_EL0
@ A64SysReg_TRCVIPCSSCTLR
@ A64SysReg_PMEVCNTR22_EL0
@ A64SysReg_ICC_IGRPEN1_EL1
@ A64SysReg_ICH_AP0R1_EL2
@ A64SysReg_PMEVCNTR16_EL0
@ A64SysReg_PMUSERENR_EL0
@ A64SysReg_PMEVCNTR14_EL0
@ A64SysReg_ICH_AP1R0_EL2
@ A64SysReg_PMEVCNTR15_EL0
@ A64SysReg_ICC_IGRPEN0_EL1
@ A64SysReg_PMINTENCLR_EL1
@ A64SysReg_PMEVCNTR5_EL0
@ A64SysReg_CNTV_TVAL_EL0
@ A64SysReg_PMEVTYPER10_EL0
@ A64SysReg_PMEVCNTR8_EL0
@ A64SysReg_ICC_IGRPEN1_EL3
@ A64SysReg_PMXEVTYPER_EL0
@ A64SysReg_PMEVCNTR20_EL0
@ A64SysReg_PMCCFILTR_EL0
@ A64SysReg_CNTPS_CVAL_EL1
@ A64SysReg_PMEVCNTR0_EL0
@ A64SysReg_PMEVTYPER27_EL0
@ A64SysReg_PMEVTYPER26_EL0
@ A64SysReg_PMEVTYPER23_EL0
@ A64SysReg_CNTP_CVAL_EL02
@ A64SysReg_PMEVTYPER8_EL0
@ A64SysReg_ICH_AP1R1_EL2
@ A64SysReg_TRCVMIDCCTLR1
@ A64SysReg_PMEVCNTR1_EL0
@ A64SysReg_CNTV_CVAL_EL0
@ A64SysReg_PMEVCNTR13_EL0
@ A64SysReg_PMEVTYPER5_EL0
@ A64SysReg_PMEVTYPER21_EL0
@ A64SysReg_PMEVCNTR2_EL0
@ A64SysReg_CNTP_CVAL_EL0
@ A64SysReg_PMEVTYPER12_EL0
@ A64SysReg_ICC_AP1R3_EL1
@ A64SysReg_PMEVCNTR29_EL0
@ A64SysReg_CONTEXTIDR_EL2
@ A64SysReg_PMEVCNTR26_EL0
@ A64SysReg_ICH_AP1R3_EL2
@ A64SysReg_PMEVCNTR30_EL0
@ A64SysReg_PMEVTYPER9_EL0
@ A64SysReg_PMEVTYPER1_EL0
@ A64SysReg_ICC_AP0R1_EL1
@ A64SysReg_ICC_AP1R2_EL1
@ A64SysReg_PMEVTYPER18_EL0
@ A64SysReg_ICC_AP1R1_EL1
@ A64SysReg_CNTV_TVAL_EL02
@ A64SysReg_PMEVTYPER28_EL0
@ A64SysReg_PMEVCNTR28_EL0
@ A64SysReg_PMEVCNTR24_EL0
@ A64SysReg_PMEVTYPER14_EL0
@ A64SysReg_PMEVTYPER7_EL0
@ A64SysReg_PMEVTYPER16_EL0
@ A64SysReg_PMXEVCNTR_EL0
@ A64SysReg_PMEVTYPER24_EL0
@ A64SysReg_PMEVTYPER22_EL0
@ A64SysReg_PMEVTYPER15_EL0
@ A64SysReg_PMCNTENCLR_EL0
@ A64SysReg_PMEVTYPER25_EL0
@ A64SysReg_TRCVMIDCCTLR0
@ A64SysReg_CNTP_TVAL_EL02
@ A64SysReg_PMEVCNTR9_EL0
@ A64SysReg_ICC_AP1R0_EL1
@ A64SysReg_DBGCLAIMSET_EL1
@ A64SysReg_PMEVCNTR11_EL0
@ A64SysReg_PMEVCNTR21_EL0
@ A64SysReg_ICH_AP0R0_EL2
@ A64SysReg_ICC_AP0R3_EL1
void A64SysRegMapper_toString(const A64SysRegMapper *S, uint32_t Bits, char *result)
const A64NamedImmMapper A64DB_DBarrierMapper
const A64SysRegMapper AArch64_MSRMapper
const A64NamedImmMapper A64PRFM_PRFMMapper
@ A64SysReg_DBGAUTHSTATUS_EL1
@ A64SysReg_ICC_HPPIR0_EL1
@ A64SysReg_ID_A64MMFR2_EL1
@ A64SysReg_ID_A64DFR1_EL1
@ A64SysReg_ICC_HPPIR1_EL1
@ A64SysReg_ID_A64ISAR1_EL1
@ A64SysReg_ID_A64PFR0_EL1
@ A64SysReg_ID_A64ISAR0_EL1
@ A64SysReg_ID_A64MMFR1_EL1
@ A64SysReg_ID_A64PFR1_EL1
@ A64SysReg_ID_A64AFR0_EL1
@ A64SysReg_TRCAUTHSTATUS
@ A64SysReg_ID_A64AFR1_EL1
@ A64SysReg_ID_A64DFR0_EL1
@ A64SysReg_ID_A64MMFR0_EL1
const char * A64NamedImmMapper_toString(const A64NamedImmMapper *N, uint32_t Value, bool *Valid)
const A64NamedImmMapper A64AT_ATMapper
const A64NamedImmMapper A64IC_ICMapper
uint32_t A64NamedImmMapper_fromString(const A64NamedImmMapper *N, char *Name, bool *Valid)
const A64NamedImmMapper A64DC_DCMapper
int cs_snprintf(char *buffer, size_t size, const char *fmt,...)
char * cs_strdup(const char *str)