Skip to content

Commit 795d7cb

Browse files
committed
Fix testing
1 parent 0f6ec4c commit 795d7cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/unit/test_x86.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,11 @@ static void test_x86_inc_dec_pxor(void)
247247
uint64_t r_xmm0[2] = {0x08090a0b0c0d0e0f, 0x0001020304050607};
248248
uint64_t r_xmm1[2] = {0x8090a0b0c0d0e0f0, 0x0010203040506070};
249249

250-
uc_common_setup(&uc, UC_ARCH_X86, UC_MODE_32, code, sizeof(code) - 1);
250+
OK(uc_open(UC_ARCH_X86, UC_MODE_32, &uc));
251+
OK(uc_ctl_set_cpu_model(uc, UC_CPU_X86_HASWELL));
252+
OK(uc_mem_map(uc, code_start, code_len, UC_PROT_ALL));
253+
OK(uc_mem_write(uc, code_start, code, sizeof(code) - 1));
254+
251255
OK(uc_reg_write(uc, UC_X86_REG_ECX, &r_ecx));
252256
OK(uc_reg_write(uc, UC_X86_REG_EDX, &r_edx));
253257
OK(uc_reg_write(uc, UC_X86_REG_XMM0, &r_xmm0));

0 commit comments

Comments
 (0)