aboutsummaryrefslogtreecommitdiffstats
path: root/capstone/suite/synctools/arm64_gen_vreg.c
diff options
context:
space:
mode:
Diffstat (limited to 'capstone/suite/synctools/arm64_gen_vreg.c')
-rw-r--r--capstone/suite/synctools/arm64_gen_vreg.c38
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;
+}