qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH Risu 2/2] risu_ppc64: Compare FPSCR flags


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH Risu 2/2] risu_ppc64: Compare FPSCR flags
Date: Fri, 3 Feb 2017 11:47:55 +0000

On 30 January 2017 at 02:47, Jose Ricardo Ziviani
<address@hidden> wrote:
> When running FP operations, FPSCR flag must be compared to make sure
> that any exception will behave consistently.
>
> Signed-off-by: Jose Ricardo Ziviani <address@hidden>
> ---
>  risu_reginfo_ppc64le.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/risu_reginfo_ppc64le.c b/risu_reginfo_ppc64le.c
> index 4dc509c..ee0e55e 100644
> --- a/risu_reginfo_ppc64le.c
> +++ b/risu_reginfo_ppc64le.c
> @@ -21,6 +21,7 @@
>
>  #define XER 37
>  #define CCR 38
> +#define FPREG 32
>
>  /* reginfo_init: initialize with a ucontext */
>  void reginfo_init(struct reginfo *ri, ucontext_t *uc)
> @@ -82,6 +83,10 @@ int reginfo_is_eq(struct reginfo *m, struct reginfo *a, 
> ucontext_t *uc)
>          }
>      }
>
> +    if (m->fpregs[FPREG] != a->fpregs[FPREG]) {
> +        return 0;
> +    }
> +
>      for (i = 0; i < 32; i++) {
>          if (m->vrregs.vrregs[i][0] != a->vrregs.vrregs[i][0] ||
>                  m->vrregs.vrregs[i][1] != a->vrregs.vrregs[i][1] ||
> --

Do we also need to add something to reginfo_dump_mismatch()
to print the mismatching FPSCR values ?

thanks
-- PMM



reply via email to

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