cstool: support arm64be

This commit is contained in:
Nguyen Anh Quynh 2017-04-25 21:33:26 +08:00
parent 6beb6ad931
commit 6d609ebdb0

View File

@ -93,6 +93,7 @@ static void usage(char *prog)
if (cs_support(CS_ARCH_ARM64)) {
printf(" arm64: aarch64 mode\n");
printf(" arm64be: aarch64 + big endian\n");
}
if (cs_support(CS_ARCH_MIPS)) {
@ -224,6 +225,11 @@ int main(int argc, char **argv)
err = cs_open(CS_ARCH_ARM64, CS_MODE_LITTLE_ENDIAN, &handle);
}
if (!strcmp(mode, "arm64be")) {
arch = CS_ARCH_ARM64;
err = cs_open(CS_ARCH_ARM64, CS_MODE_BIG_ENDIAN, &handle);
}
if (!strcmp(mode, "mips")) {
arch = CS_ARCH_MIPS;
err = cs_open(CS_ARCH_MIPS, CS_MODE_MIPS32 | CS_MODE_LITTLE_ENDIAN, &handle);