diff mbox

[Risu,2/5] risu_reginfo_ppc64le: Remove unused code from PPC64 register comparison

Message ID 1488224492-20316-3-git-send-email-joserz@linux.vnet.ibm.com
State New
Headers show

Commit Message

Jose Ricardo Ziviani Feb. 27, 2017, 7:41 p.m. UTC
Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
---
 risu_reginfo_ppc64le.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Peter Maydell Feb. 28, 2017, 1:43 p.m. UTC | #1
On 27 February 2017 at 19:41, Jose Ricardo Ziviani
<joserz@linux.vnet.ibm.com> wrote:
> Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
> ---
>  risu_reginfo_ppc64le.c | 8 --------
>  1 file changed, 8 deletions(-)
>
> diff --git a/risu_reginfo_ppc64le.c b/risu_reginfo_ppc64le.c
> index e6bc0e0..a76f296 100644
> --- a/risu_reginfo_ppc64le.c
> +++ b/risu_reginfo_ppc64le.c
> @@ -86,14 +86,6 @@ int reginfo_is_eq(struct reginfo *m, struct reginfo *a, ucontext_t *uc)
>                  m->vrregs.vrregs[i][1] != a->vrregs.vrregs[i][1] ||
>                  m->vrregs.vrregs[i][2] != a->vrregs.vrregs[i][2] ||
>                  m->vrregs.vrregs[i][3] != a->vrregs.vrregs[i][3]) {
> -
> -            if (uc != NULL && (m->gregs[CCR] & 0x10)) {
> -                uc->uc_mcontext.v_regs->vrregs[i][0] = a->vrregs.vrregs[i][0];
> -                uc->uc_mcontext.v_regs->vrregs[i][1] = a->vrregs.vrregs[i][1];
> -                uc->uc_mcontext.v_regs->vrregs[i][2] = a->vrregs.vrregs[i][2];
> -                uc->uc_mcontext.v_regs->vrregs[i][3] = a->vrregs.vrregs[i][3];
> -                return 1;
> -            }
>              return 0;
>          }
>      }
> --

I have a variation on this patch already in my set of refactoring
patches that I posted last week:

https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg06152.html

thanks
-- PMM
Jose Ricardo Ziviani Feb. 28, 2017, 2:29 p.m. UTC | #2
On Tue, Feb 28, 2017 at 01:43:22PM +0000, Peter Maydell wrote:
> On 27 February 2017 at 19:41, Jose Ricardo Ziviani
> <joserz@linux.vnet.ibm.com> wrote:
> > Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
> > ---
> >  risu_reginfo_ppc64le.c | 8 --------
> >  1 file changed, 8 deletions(-)
> >
> > diff --git a/risu_reginfo_ppc64le.c b/risu_reginfo_ppc64le.c
> > index e6bc0e0..a76f296 100644
> > --- a/risu_reginfo_ppc64le.c
> > +++ b/risu_reginfo_ppc64le.c
> > @@ -86,14 +86,6 @@ int reginfo_is_eq(struct reginfo *m, struct reginfo *a, ucontext_t *uc)
> >                  m->vrregs.vrregs[i][1] != a->vrregs.vrregs[i][1] ||
> >                  m->vrregs.vrregs[i][2] != a->vrregs.vrregs[i][2] ||
> >                  m->vrregs.vrregs[i][3] != a->vrregs.vrregs[i][3]) {
> > -
> > -            if (uc != NULL && (m->gregs[CCR] & 0x10)) {
> > -                uc->uc_mcontext.v_regs->vrregs[i][0] = a->vrregs.vrregs[i][0];
> > -                uc->uc_mcontext.v_regs->vrregs[i][1] = a->vrregs.vrregs[i][1];
> > -                uc->uc_mcontext.v_regs->vrregs[i][2] = a->vrregs.vrregs[i][2];
> > -                uc->uc_mcontext.v_regs->vrregs[i][3] = a->vrregs.vrregs[i][3];
> > -                return 1;
> > -            }
> >              return 0;
> >          }
> >      }
> > --
> 
> I have a variation on this patch already in my set of refactoring
> patches that I posted last week:
> 
> https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg06152.html

Sorry, I missed that commit. I'll send a v2 with the fix suggested by
Nikunj and without this one.

Thanks Peter

> 
> thanks
> -- PMM
>
Peter Maydell Feb. 28, 2017, 6:01 p.m. UTC | #3
On 28 February 2017 at 14:29,  <joserz@linux.vnet.ibm.com> wrote:
> On Tue, Feb 28, 2017 at 01:43:22PM +0000, Peter Maydell wrote:
>> I have a variation on this patch already in my set of refactoring
>> patches that I posted last week:
>>
>> https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg06152.html
>
> Sorry, I missed that commit. I'll send a v2 with the fix suggested by
> Nikunj and without this one.

No problem. I've just pushed that refactoring series to risu master
so you probably want to rebase on that. I've also grabbed patch 5
of this series because it was an obvious change.

thanks
-- PMM
diff mbox

Patch

diff --git a/risu_reginfo_ppc64le.c b/risu_reginfo_ppc64le.c
index e6bc0e0..a76f296 100644
--- a/risu_reginfo_ppc64le.c
+++ b/risu_reginfo_ppc64le.c
@@ -86,14 +86,6 @@  int reginfo_is_eq(struct reginfo *m, struct reginfo *a, ucontext_t *uc)
                 m->vrregs.vrregs[i][1] != a->vrregs.vrregs[i][1] ||
                 m->vrregs.vrregs[i][2] != a->vrregs.vrregs[i][2] ||
                 m->vrregs.vrregs[i][3] != a->vrregs.vrregs[i][3]) {
-
-            if (uc != NULL && (m->gregs[CCR] & 0x10)) {
-                uc->uc_mcontext.v_regs->vrregs[i][0] = a->vrregs.vrregs[i][0];
-                uc->uc_mcontext.v_regs->vrregs[i][1] = a->vrregs.vrregs[i][1];
-                uc->uc_mcontext.v_regs->vrregs[i][2] = a->vrregs.vrregs[i][2];
-                uc->uc_mcontext.v_regs->vrregs[i][3] = a->vrregs.vrregs[i][3];
-                return 1;
-            }
             return 0;
         }
     }