Fix the undefined lshift negative numbers
This commit is contained in:
parent
a2f18bbfaf
commit
d0de673208
|
@ -1035,7 +1035,7 @@ static uc_err uc_gen_tb(struct uc_struct *uc, uint64_t addr, uc_tb *out_tb)
|
||||||
tb = cpu->tb_jmp_cache[hash];
|
tb = cpu->tb_jmp_cache[hash];
|
||||||
|
|
||||||
cflags &= ~CF_CLUSTER_MASK;
|
cflags &= ~CF_CLUSTER_MASK;
|
||||||
cflags |= cpu->cluster_index << CF_CLUSTER_SHIFT;
|
cflags |= ((uint32_t)cpu->cluster_index) << CF_CLUSTER_SHIFT;
|
||||||
|
|
||||||
if (unlikely(!(tb &&
|
if (unlikely(!(tb &&
|
||||||
tb->pc == pc &&
|
tb->pc == pc &&
|
||||||
|
@ -1581,7 +1581,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
|
||||||
}
|
}
|
||||||
|
|
||||||
cflags &= ~CF_CLUSTER_MASK;
|
cflags &= ~CF_CLUSTER_MASK;
|
||||||
cflags |= cpu->cluster_index << CF_CLUSTER_SHIFT;
|
cflags |= ((uint32_t)cpu->cluster_index) << CF_CLUSTER_SHIFT;
|
||||||
|
|
||||||
max_insns = cflags & CF_COUNT_MASK;
|
max_insns = cflags & CF_COUNT_MASK;
|
||||||
if (max_insns == 0) {
|
if (max_insns == 0) {
|
||||||
|
|
|
@ -30,7 +30,7 @@ tb_lookup__cpu_state(CPUState *cpu, target_ulong *pc, target_ulong *cs_base,
|
||||||
tb = cpu->tb_jmp_cache[hash];
|
tb = cpu->tb_jmp_cache[hash];
|
||||||
|
|
||||||
cf_mask &= ~CF_CLUSTER_MASK;
|
cf_mask &= ~CF_CLUSTER_MASK;
|
||||||
cf_mask |= cpu->cluster_index << CF_CLUSTER_SHIFT;
|
cf_mask |= ((uint32_t)cpu->cluster_index) << CF_CLUSTER_SHIFT;
|
||||||
|
|
||||||
if (likely(tb &&
|
if (likely(tb &&
|
||||||
tb->pc == *pc &&
|
tb->pc == *pc &&
|
||||||
|
|
Loading…
Reference in New Issue