/src/capstonenext/arch/AArch64/AArch64DisassemblerExtension.c
Line  | Count  | Source  | 
1  |  | /* Capstone Disassembly Engine */  | 
2  |  | /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2019 */  | 
3  |  | /*    Rot127 <unisono@quyllur.org>, 2022-2023 */  | 
4  |  |  | 
5  |  | #include "AArch64DisassemblerExtension.h"  | 
6  |  | #include "AArch64BaseInfo.h"  | 
7  |  |  | 
8  |  | bool AArch64_getFeatureBits(unsigned int mode, unsigned int feature)  | 
9  | 398k  | { | 
10  | 398k  |   if (feature == AArch64_FeatureAMX || feature == AArch64_FeatureMUL53 ||  | 
11  | 398k  |       feature == AArch64_FeatureAppleSys) { | 
12  | 3  |     return mode & CS_MODE_APPLE_PROPRIETARY;  | 
13  | 3  |   }  | 
14  |  |   // we support everything  | 
15  | 398k  |   return true;  | 
16  | 398k  | }  | 
17  |  |  | 
18  |  | /// Tests a NULL terminated array of features if they are enabled.  | 
19  |  | bool AArch64_testFeatureList(unsigned int mode, const unsigned int *features)  | 
20  | 11.8k  | { | 
21  | 11.8k  |   int i = 0;  | 
22  | 18.8k  |   while (features[i]) { | 
23  | 7.02k  |     if (!AArch64_getFeatureBits(mode, features[i]))  | 
24  | 0  |       return false;  | 
25  | 7.02k  |     ++i;  | 
26  | 7.02k  |   }  | 
27  | 11.8k  |   return true;  | 
28  | 11.8k  | }  |