arm64eb: add support for ARM64 big endian.
This commit is contained in:
11
uc.c
11
uc.c
@ -204,12 +204,15 @@ uc_err uc_open(uc_arch arch, uc_mode mode, uc_engine **result)
|
||||
#endif
|
||||
#ifdef UNICORN_HAS_ARM64
|
||||
case UC_ARCH_ARM64:
|
||||
if ((mode & ~UC_MODE_ARM_MASK) ||
|
||||
(mode & UC_MODE_BIG_ENDIAN)) {
|
||||
if (mode & ~UC_MODE_ARM_MASK) {
|
||||
free(uc);
|
||||
return UC_ERR_MODE;
|
||||
}
|
||||
uc->init_arch = arm64_uc_init;
|
||||
if (mode & UC_MODE_BIG_ENDIAN) {
|
||||
uc->init_arch = arm64eb_uc_init;
|
||||
} else {
|
||||
uc->init_arch = arm64_uc_init;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
@ -1172,7 +1175,7 @@ static size_t cpu_context_size(uc_arch arch, uc_mode mode)
|
||||
case UC_ARCH_ARM: return mode & UC_MODE_BIG_ENDIAN ? ARM_REGS_STORAGE_SIZE_armeb : ARM_REGS_STORAGE_SIZE_arm;
|
||||
#endif
|
||||
#ifdef UNICORN_HAS_ARM64
|
||||
case UC_ARCH_ARM64: return ARM64_REGS_STORAGE_SIZE;
|
||||
case UC_ARCH_ARM64: return mode & UC_MODE_BIG_ENDIAN ? ARM64_REGS_STORAGE_SIZE_aarch64eb : ARM64_REGS_STORAGE_SIZE_aarch64;
|
||||
#endif
|
||||
#ifdef UNICORN_HAS_MIPS
|
||||
case UC_ARCH_MIPS:
|
||||
|
Reference in New Issue
Block a user