diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /capstone/suite/synctools/arm64_gen_vreg.c | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'capstone/suite/synctools/arm64_gen_vreg.c')
-rw-r--r-- | capstone/suite/synctools/arm64_gen_vreg.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/capstone/suite/synctools/arm64_gen_vreg.c b/capstone/suite/synctools/arm64_gen_vreg.c new file mode 100644 index 000000000..9b7a93835 --- /dev/null +++ b/capstone/suite/synctools/arm64_gen_vreg.c @@ -0,0 +1,38 @@ +// $ make arm64_gen_vreg +// $ ./arm64_gen_vreg > AArch64GenRegisterV.inc + +#include <stdio.h> +#include <stdint.h> +#include <string.h> +#include <ctype.h> + +#undef CAPSTONE_DIET +#define GET_REGINFO_ENUM + +#include "AArch64GenRegisterInfo.inc" +#include "AArch64GenRegisterName.inc" + +int main() +{ + unsigned int i; + size_t size = (size_t)getRegisterName(i, 100); + + printf("// size = %zu\n", size); + + for(i = 1; i < size; i++) { + unsigned int j; + const char *name = getRegisterName(i, AArch64_vreg); + //printf("%u: ARM64_REG_%s, ", i, getRegisterName(i, AArch64_vreg)); + if (strlen(name) == 0) { + printf("0,\n"); + } else { + printf("ARM64_REG_"); + for(j = 0; j < strlen(name); j++) { + printf("%c", toupper(name[j])); + } + printf(",\n"); + } + } + + return 0; +} |