| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#include <stdio.h> |
| 5 |
#include <stdint.h> |
| 6 |
#include <string.h> |
| 7 |
#include <ctype.h> |
| 8 |
|
| 9 |
#undef CAPSTONE_DIET |
| 10 |
#define GET_REGINFO_ENUM |
| 11 |
|
| 12 |
#include "AArch64GenRegisterInfo.inc" |
| 13 |
#include "AArch64GenRegisterName.inc" |
| 14 |
|
| 15 |
int main() |
| 16 |
{ |
| 17 |
unsigned int i; |
| 18 |
size_t size = (size_t)getRegisterName(i, 100); |
| 19 |
|
| 20 |
printf("// size = %zu\n", size); |
| 21 |
|
| 22 |
for(i = 1; i < size; i++) { |
| 23 |
unsigned int j; |
| 24 |
const char *name = getRegisterName(i, AArch64_vreg); |
| 25 |
|
| 26 |
if (strlen(name) == 0) { |
| 27 |
printf("0,\n"); |
| 28 |
} else { |
| 29 |
printf("ARM64_REG_"); |
| 30 |
for(j = 0; j < strlen(name); j++) { |
| 31 |
printf("%c", toupper(name[j])); |
| 32 |
} |
| 33 |
printf(",\n"); |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
return 0; |
| 38 |
} |