qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v1 02/29] target-microblaze: dec_store: Use bool


From: Alistair Francis
Subject: Re: [Qemu-devel] [PATCH v1 02/29] target-microblaze: dec_store: Use bool instead of unsigned int
Date: Thu, 03 May 2018 20:03:43 +0000

On Thu, May 3, 2018 at 2:22 AM Edgar E. Iglesias <address@hidden>
wrote:

> From: "Edgar E. Iglesias" <address@hidden>

> Use bool instead of unsigned int to represent flags.
> Also, use extract32 instead of open coding the bit extract.

> No functional change.

> Signed-off-by: Edgar E. Iglesias <address@hidden>

Reviewed-by: Alistair Francis <address@hidden>

Alistair

> ---
>   target/microblaze/translate.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)

> diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c
> index 33f21aa5b7..6fe679ca6d 100644
> --- a/target/microblaze/translate.c
> +++ b/target/microblaze/translate.c
> @@ -1027,14 +1027,15 @@ static void dec_store(DisasContext *dc)
>   {
>       TCGv t, *addr, swx_addr;
>       TCGLabel *swx_skip = NULL;
> -    unsigned int size, rev = 0, ex = 0;
> +    unsigned int size;
> +    bool rev = false, ex = false;
>       TCGMemOp mop;

>       mop = dc->opcode & 3;
>       size = 1 << mop;
>       if (!dc->type_b) {
> -        rev = (dc->ir >> 9) & 1;
> -        ex = (dc->ir >> 10) & 1;
> +        rev = extract32(dc->ir, 9, 1);
> +        ex = extract32(dc->ir, 10, 1);
>       }
>       mop |= MO_TE;
>       if (rev) {
> --
> 2.14.1



reply via email to

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