[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 20/36] target/riscv: Add support for virtual interrupt set
Re: [PATCH v1 20/36] target/riscv: Add support for virtual interrupt setting
Thu, 9 Jan 2020 13:33:40 +1100
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2
On 1/9/20 11:49 AM, Palmer Dabbelt wrote:
>> + irqs = (pending & ~env->mideleg & -mie) | (pending & env->mideleg &
> Isn't "-unsigned" implementation defined? I can't get GCC to throw a warning
> and it was already there, so maybe I'm just wrong?
(1) You're confusing implementation defined with undefined, and unsigned
arithmetic is the former not the latter.
(2) There is no such thing as ones-compliment or sign-magnitude integer
hardware anymore, so for this case "implementation defined" is in fact
(3) We build with -fwrapv, so we're explicitly asking for sane behaviour from
our signed types as well.