On Jan 23 15:37, Richard Henderson wrote: > On 1/23/19 1:32 PM, Aaron Lindsay OS wrote: > > + uint64_t overflow_mask = env->cp15.c9_pmcr & PMCRLC ? \ > > + INT64_MIN : INT32_MIN; > > With type promotion, this is the same as writing > > ? 0x8000000000000000ull : 0xffffffff80000000ull > > which is probably not what you were intending. > > Perhaps just ? 1ull << 63 : 1ull << 31 is better?
You are correct. I think we changed this to INT32_MIN in an earlier respin in an attempt at simplification, but I didn't catch the type promotion issue. > Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Thanks, I'll send out a v12 momentarily. -Aaron