diff options
Diffstat (limited to 'target-arm/kvm.c')
-rw-r--r-- | target-arm/kvm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/target-arm/kvm.c b/target-arm/kvm.c index b92e00dae0..6e5cd36fae 100644 --- a/target-arm/kvm.c +++ b/target-arm/kvm.c @@ -67,7 +67,13 @@ static bool reg_syncs_via_tuple_list(uint64_t regidx) static int compare_u64(const void *a, const void *b) { - return *(uint64_t *)a - *(uint64_t *)b; + if (*(uint64_t *)a > *(uint64_t *)b) { + return 1; + } + if (*(uint64_t *)a < *(uint64_t *)b) { + return -1; + } + return 0; } int kvm_arch_init_vcpu(CPUState *cs) |