Patchwork sparc64: fix 128-bit atomic load from nucleus context v1

login
register
mail settings
Submitter Igor V. Kovalenko
Date May 28, 2010, 9:05 p.m.
Message ID <20100528210546.23726.83653.stgit@skyserv>
Download mbox | patch
Permalink /patch/53960/
State New
Headers show

Comments

Igor V. Kovalenko - May 28, 2010, 9:05 p.m.
From: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>

- change 128-bit atomic loads to reference nucleus context
v0->v1: dropped disassembler change
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
---
 target-sparc/op_helper.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Blue Swirl - May 29, 2010, 7:42 a.m.
Thanks, applied.

On Fri, May 28, 2010 at 9:05 PM, Igor V. Kovalenko
<igor.v.kovalenko@gmail.com> wrote:
> From: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
>
> - change 128-bit atomic loads to reference nucleus context
> v0->v1: dropped disassembler change
> Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
> ---
>  target-sparc/op_helper.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
> index edeeb44..f468e7b 100644
> --- a/target-sparc/op_helper.c
> +++ b/target-sparc/op_helper.c
> @@ -3060,19 +3060,19 @@ void helper_ldda_asi(target_ulong addr, int asi, int rd)
>     case 0x2c: // Nucleus quad LDD 128 bit atomic LE
>         helper_check_align(addr, 0xf);
>         if (rd == 0) {
> -            env->gregs[1] = ldq_kernel(addr + 8);
> +            env->gregs[1] = ldq_nucleus(addr + 8);
>             if (asi == 0x2c)
>                 bswap64s(&env->gregs[1]);
>         } else if (rd < 8) {
> -            env->gregs[rd] = ldq_kernel(addr);
> -            env->gregs[rd + 1] = ldq_kernel(addr + 8);
> +            env->gregs[rd] = ldq_nucleus(addr);
> +            env->gregs[rd + 1] = ldq_nucleus(addr + 8);
>             if (asi == 0x2c) {
>                 bswap64s(&env->gregs[rd]);
>                 bswap64s(&env->gregs[rd + 1]);
>             }
>         } else {
> -            env->regwptr[rd] = ldq_kernel(addr);
> -            env->regwptr[rd + 1] = ldq_kernel(addr + 8);
> +            env->regwptr[rd] = ldq_nucleus(addr);
> +            env->regwptr[rd + 1] = ldq_nucleus(addr + 8);
>             if (asi == 0x2c) {
>                 bswap64s(&env->regwptr[rd]);
>                 bswap64s(&env->regwptr[rd + 1]);
>
>
>

Patch

diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index edeeb44..f468e7b 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -3060,19 +3060,19 @@  void helper_ldda_asi(target_ulong addr, int asi, int rd)
     case 0x2c: // Nucleus quad LDD 128 bit atomic LE
         helper_check_align(addr, 0xf);
         if (rd == 0) {
-            env->gregs[1] = ldq_kernel(addr + 8);
+            env->gregs[1] = ldq_nucleus(addr + 8);
             if (asi == 0x2c)
                 bswap64s(&env->gregs[1]);
         } else if (rd < 8) {
-            env->gregs[rd] = ldq_kernel(addr);
-            env->gregs[rd + 1] = ldq_kernel(addr + 8);
+            env->gregs[rd] = ldq_nucleus(addr);
+            env->gregs[rd + 1] = ldq_nucleus(addr + 8);
             if (asi == 0x2c) {
                 bswap64s(&env->gregs[rd]);
                 bswap64s(&env->gregs[rd + 1]);
             }
         } else {
-            env->regwptr[rd] = ldq_kernel(addr);
-            env->regwptr[rd + 1] = ldq_kernel(addr + 8);
+            env->regwptr[rd] = ldq_nucleus(addr);
+            env->regwptr[rd + 1] = ldq_nucleus(addr + 8);
             if (asi == 0x2c) {
                 bswap64s(&env->regwptr[rd]);
                 bswap64s(&env->regwptr[rd + 1]);