qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] target/riscv: Disallow WFI instruction from U-mode


From: Jonathan Behrens
Subject: Re: [PATCH] target/riscv: Disallow WFI instruction from U-mode
Date: Thu, 23 Jan 2020 22:22:51 -0500

Haha, fair enough. I just copied that line from one of the other functions in that file, which all use the same style. The check is actually a bit worse than it looks because PRV_S is defined to be 1. Hence, the whole thing is equivalent to just writing `env->priv == PRV_U`. I can send out a new version with that changed.

Jonathan

On Thu, Jan 23, 2020 at 6:35 PM Richard Henderson <address@hidden> wrote:
On 1/23/20 9:52 AM, Jonathan Behrens wrote:
> +    if (!(env->priv >= PRV_S) ||

For integers, !(x >= y) is a poor way to write x < y.


r~


reply via email to

[Prev in Thread] Current Thread [Next in Thread]