diff mbox

[v1,03/29] target-microblaze: compute_ldst_addr: Use bool instead of int

Message ID 20180503091922.28733-4-edgar.iglesias@gmail.com (mailing list archive)
State New, archived
Headers show

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 int to represent flags.
No functional change.

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

Comments

Richard Henderson May 3, 2018, 6:01 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 int to represent flags.
> No functional change.
> 
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> ---
>  target/microblaze/translate.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

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


r~
Alistair Francis May 3, 2018, 8:04 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 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 | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)

> diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c
> index 6fe679ca6d..9232b42a8a 100644
> --- a/target/microblaze/translate.c
> +++ b/target/microblaze/translate.c
> @@ -845,13 +845,13 @@ static void dec_imm(DisasContext *dc)

>   static inline TCGv *compute_ldst_addr(DisasContext *dc, TCGv *t)
>   {
> -    unsigned int extimm = dc->tb_flags & IMM_FLAG;
> -    /* Should be set to one if r1 is used by loadstores.  */
> -    int stackprot = 0;
> +    bool extimm = dc->tb_flags & IMM_FLAG;
> +    /* Should be set to true if r1 is used by loadstores.  */
> +    bool stackprot = false;

>       /* All load/stores use ra.  */
>       if (dc->ra == 1 && dc->cpu->cfg.stackprot) {
> -        stackprot = 1;
> +        stackprot = true;
>       }

>       /* Treat the common cases first.  */
> @@ -864,7 +864,7 @@ static inline TCGv *compute_ldst_addr(DisasContext
*dc, TCGv *t)
>           }

>           if (dc->rb == 1 && dc->cpu->cfg.stackprot) {
> -            stackprot = 1;
> +            stackprot = true;
>           }

>           *t = tcg_temp_new();
> --
> 2.14.1
diff mbox

Patch

diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c
index 6fe679ca6d..9232b42a8a 100644
--- a/target/microblaze/translate.c
+++ b/target/microblaze/translate.c
@@ -845,13 +845,13 @@  static void dec_imm(DisasContext *dc)
 
 static inline TCGv *compute_ldst_addr(DisasContext *dc, TCGv *t)
 {
-    unsigned int extimm = dc->tb_flags & IMM_FLAG;
-    /* Should be set to one if r1 is used by loadstores.  */
-    int stackprot = 0;
+    bool extimm = dc->tb_flags & IMM_FLAG;
+    /* Should be set to true if r1 is used by loadstores.  */
+    bool stackprot = false;
 
     /* All load/stores use ra.  */
     if (dc->ra == 1 && dc->cpu->cfg.stackprot) {
-        stackprot = 1;
+        stackprot = true;
     }
 
     /* Treat the common cases first.  */
@@ -864,7 +864,7 @@  static inline TCGv *compute_ldst_addr(DisasContext *dc, TCGv *t)
         }
 
         if (dc->rb == 1 && dc->cpu->cfg.stackprot) {
-            stackprot = 1;
+            stackprot = true;
         }
 
         *t = tcg_temp_new();