Skip to content

Commit 12682ea

Browse files
Merge pull request #34 from WorksButNotTested/unstable
Fixes to compilation errors on x86
2 parents d499b27 + dd97ce0 commit 12682ea

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

accel/tcg/translate-all.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ void HELPER(afl_maybe_log)(target_ulong cur_loc) {
9696
}
9797

9898
void HELPER(afl_maybe_log_trace)(target_ulong cur_loc) {
99-
INC_AFL_AREA(cur_loc);
99+
register uintptr_t afl_idx = cur_loc;
100+
INC_AFL_AREA(afl_idx);
100101
}
101102

102103
static target_ulong pc_hash(target_ulong x) {
@@ -2101,10 +2102,11 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
21012102
actual binary */
21022103
int track_fd = afl_track_unstable_log_fd();
21032104
if (unlikely(track_fd >= 0)) {
2104-
uintptr_t block_id = (uintptr_t)(afl_hash_ip((uint64_t)pc));
2105+
uint64_t ip = (uint64_t)pc;
2106+
uintptr_t block_id = (uintptr_t)(afl_hash_ip(ip));
21052107
block_id &= (MAP_SIZE - 1);
21062108
dprintf(track_fd, "BLOCK ID: 0x%016" PRIx64 ", PC: 0x%016zx-0x%016zx\n",
2107-
block_id, pc, pc + tb->size);
2109+
block_id, ip, ip + tb->size);
21082110
}
21092111

21102112
/* generate machine code */

0 commit comments

Comments
 (0)