Format code

This commit is contained in:
lazymio 2022-04-16 17:50:12 +02:00
parent b136f08f2d
commit c379d1bfe4
No known key found for this signature in database
GPG Key ID: DFF27E34A47CB873
3 changed files with 9 additions and 9 deletions

View File

@ -51,7 +51,7 @@ typedef enum uc_cpu_arm {
UC_CPU_ARM_PXA270C0,
UC_CPU_ARM_PXA270C5,
UC_CPU_ARM_MAX,
UC_CPU_ARM_ENDING
} uc_cpu_arm;

View File

@ -734,17 +734,18 @@ static void test_armeb_ldrb(void)
uint64_t data_address = 0x800000;
int r1 = 0x1234;
int r2 = data_address;
uc_common_setup(&uc, UC_ARCH_ARM, UC_MODE_ARM | UC_MODE_BIG_ENDIAN, test_code, sizeof(test_code) - 1, UC_CPU_ARM_1176);
uc_common_setup(&uc, UC_ARCH_ARM, UC_MODE_ARM | UC_MODE_BIG_ENDIAN,
test_code, sizeof(test_code) - 1, UC_CPU_ARM_1176);
OK(uc_mem_map(uc, data_address, 1024 * 1024, UC_PROT_ALL));
OK(uc_mem_write(uc, data_address, "\x66\x67\x68\x69", 4));
OK(uc_reg_write(uc, UC_ARM_REG_R2, &r2));
OK(uc_emu_start(uc, code_start, code_start + sizeof(test_code) - 1, 0, 0));
OK(uc_reg_read(uc, UC_ARM_REG_R1, &r1));
TEST_CHECK(r1 == 0x66);
OK(uc_close(uc));

5
uc.c
View File

@ -2182,7 +2182,6 @@ uc_err uc_ctl(uc_engine *uc, uc_control_type control, ...)
break;
}
if (uc->arch == UC_ARCH_X86) {
if (model >= UC_CPU_X86_ENDING) {
err = UC_ERR_ARG;
@ -2212,7 +2211,7 @@ uc_err uc_ctl(uc_engine *uc, uc_control_type control, ...)
err = UC_ERR_ARG;
break;
}
if (uc->mode & UC_MODE_64 && model >= UC_CPU_MIPS64_ENDING) {
err = UC_ERR_ARG;
break;
@ -2223,7 +2222,7 @@ uc_err uc_ctl(uc_engine *uc, uc_control_type control, ...)
err = UC_ERR_ARG;
break;
}
if (uc->mode & UC_MODE_64 && model >= UC_CPU_PPC64_ENDING) {
err = UC_ERR_ARG;
break;