Added ppc 32bit mode and added sparc mode checks to bring it in line with other archs

This commit is contained in:
xorstream
2016-01-24 22:27:33 +11:00
parent 6f3d48077e
commit 26d3b1e7d6
4 changed files with 6 additions and 3 deletions

4
uc.c
View File

@ -245,7 +245,9 @@ uc_err uc_open(uc_arch arch, uc_mode mode, uc_engine **result)
#ifdef UNICORN_HAS_SPARC
case UC_ARCH_SPARC:
if (mode & ~UC_MODE_SPARC_MASK) {
if ((mode & ~UC_MODE_SPARC_MASK) ||
!(mode & UC_MODE_BIG_ENDIAN) ||
!(mode & (UC_MODE_SPARC32|UC_MODE_SPARC64))) {
free(uc);
return UC_ERR_MODE;
}