[PATCH] remove unnecessary ifdef TARGET_RISCV64

hiroyuki.obinata@gmail.com posted 1 patch 4 years, 5 months ago
Test asan passed
Test checkpatch passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191030002318.399-1-hiroyuki.obinata@gmail.com
Maintainers: Sagar Karandikar <sagark@eecs.berkeley.edu>, Palmer Dabbelt <palmer@sifive.com>, Alistair Francis <Alistair.Francis@wdc.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
target/riscv/translate.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
[PATCH] remove unnecessary ifdef TARGET_RISCV64
Posted by hiroyuki.obinata@gmail.com 4 years, 5 months ago
From: "hiroyuki.obinata" <hiroyuki.obinata@gmail.com>

Signed-off-by: Hiroyuki Obinata <hiroyuki.obinata@gmail.com>
---
 target/riscv/translate.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/target/riscv/translate.c b/target/riscv/translate.c
index adeddb85f6..5c4dd21a98 100644
--- a/target/riscv/translate.c
+++ b/target/riscv/translate.c
@@ -64,12 +64,10 @@ static const int tcg_memop_lookup[8] = {
     [0] = MO_SB,
     [1] = MO_TESW,
     [2] = MO_TESL,
+    [3] = MO_TEQ,
     [4] = MO_UB,
     [5] = MO_TEUW,
-#ifdef TARGET_RISCV64
-    [3] = MO_TEQ,
     [6] = MO_TEUL,
-#endif
 };
 #endif
 
-- 
2.17.1


Re: [PATCH] remove unnecessary ifdef TARGET_RISCV64
Posted by Palmer Dabbelt 4 years, 5 months ago
On Tue, 29 Oct 2019 17:23:18 PDT (-0700), hiroyuki.obinata@gmail.com wrote:
> From: "hiroyuki.obinata" <hiroyuki.obinata@gmail.com>
>
> Signed-off-by: Hiroyuki Obinata <hiroyuki.obinata@gmail.com>
> ---
>  target/riscv/translate.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/target/riscv/translate.c b/target/riscv/translate.c
> index adeddb85f6..5c4dd21a98 100644
> --- a/target/riscv/translate.c
> +++ b/target/riscv/translate.c
> @@ -64,12 +64,10 @@ static const int tcg_memop_lookup[8] = {
>      [0] = MO_SB,
>      [1] = MO_TESW,
>      [2] = MO_TESL,
> +    [3] = MO_TEQ,
>      [4] = MO_UB,
>      [5] = MO_TEUW,
> -#ifdef TARGET_RISCV64
> -    [3] = MO_TEQ,
>      [6] = MO_TEUL,
> -#endif
>  };
>  #endif

Reviewed-by: Palmer Dabbelt <palmer@dabbelt.com>

This is a non-functional change (the code in question was already wrapped in an 
"#ifdef TARGET_RISCV64", so this internal one was redundant), so I'm happy to 
include it during the soft freeze.

I've added this to the queue for my next PR.

Re: [PATCH] remove unnecessary ifdef TARGET_RISCV64
Posted by Obinata Hiroyuki 4 years, 5 months ago
Thanks!

2019年11月2日(土) 1:58 Palmer Dabbelt <palmer@dabbelt.com>:

> On Tue, 29 Oct 2019 17:23:18 PDT (-0700), hiroyuki.obinata@gmail.com
> wrote:
> > From: "hiroyuki.obinata" <hiroyuki.obinata@gmail.com>
> >
> > Signed-off-by: Hiroyuki Obinata <hiroyuki.obinata@gmail.com>
> > ---
> >  target/riscv/translate.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/target/riscv/translate.c b/target/riscv/translate.c
> > index adeddb85f6..5c4dd21a98 100644
> > --- a/target/riscv/translate.c
> > +++ b/target/riscv/translate.c
> > @@ -64,12 +64,10 @@ static const int tcg_memop_lookup[8] = {
> >      [0] = MO_SB,
> >      [1] = MO_TESW,
> >      [2] = MO_TESL,
> > +    [3] = MO_TEQ,
> >      [4] = MO_UB,
> >      [5] = MO_TEUW,
> > -#ifdef TARGET_RISCV64
> > -    [3] = MO_TEQ,
> >      [6] = MO_TEUL,
> > -#endif
> >  };
> >  #endif
>
> Reviewed-by: Palmer Dabbelt <palmer@dabbelt.com>
>
> This is a non-functional change (the code in question was already wrapped
> in an
> "#ifdef TARGET_RISCV64", so this internal one was redundant), so I'm happy
> to
> include it during the soft freeze.
>
> I've added this to the queue for my next PR.
>