diff mbox series

[v1,01/29] target-microblaze: dec_load: Use bool instead of unsigned int

Message ID 20180503091922.28733-2-edgar.iglesias@gmail.com
State New
Headers show
Series [v1,01/29] target-microblaze: dec_load: Use bool instead of unsigned int | expand

Commit Message

Edgar E. Iglesias May 3, 2018, 9:18 a.m. UTC
From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

Use bool instead of unsigned int to represent flags.
No functional change.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 target/microblaze/translate.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Richard Henderson May 3, 2018, 5:59 p.m. UTC | #1
On 05/03/2018 02:18 AM, Edgar E. Iglesias wrote:
> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
> 
> Use bool instead of unsigned int to represent flags.
> No functional change.
> 
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> ---
>  target/microblaze/translate.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
Alistair Francis May 3, 2018, 8:03 p.m. UTC | #2
On Thu, May 3, 2018 at 2:19 AM Edgar E. Iglesias <edgar.iglesias@gmail.com>
wrote:

> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

> Use bool instead of unsigned int to represent flags.
> No functional change.

> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

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 100883e2cc..33f21aa5b7 100644
> --- a/target/microblaze/translate.c
> +++ b/target/microblaze/translate.c
> @@ -897,14 +897,15 @@ static inline TCGv *compute_ldst_addr(DisasContext
*dc, TCGv *t)
>   static void dec_load(DisasContext *dc)
>   {
>       TCGv t, v, *addr;
> -    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
diff mbox series

Patch

diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c
index 100883e2cc..33f21aa5b7 100644
--- a/target/microblaze/translate.c
+++ b/target/microblaze/translate.c
@@ -897,14 +897,15 @@  static inline TCGv *compute_ldst_addr(DisasContext *dc, TCGv *t)
 static void dec_load(DisasContext *dc)
 {
     TCGv t, v, *addr;
-    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) {