Received: from [140.186.70.92] (port=50083 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHwAj-00040b-79 for qemu-devel@nongnu.org; Fri, 28 May 2010 05:48:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHwAi-000495-0y for qemu-devel@nongnu.org; Fri, 28 May 2010 05:48:09 -0400 Received: from mail-fx0-f45.google.com ([209.85.161.45]:54240) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHwAh-00048r-Qt for qemu-devel@nongnu.org; Fri, 28 May 2010 05:48:07 -0400 Received: by fxm17 with SMTP id 17so813234fxm.4 for ; Fri, 28 May 2010 02:48:06 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=[192.168.1.2]) by skyserv with esmtp (Exim 4.71) (envelope-from ) id 1OHwAe-0004YW-Ss for qemu-devel@nongnu.org; Fri, 28 May 2010 13:48:04 +0400 From: "Igor V. Kovalenko" Date: Fri, 28 May 2010 13:48:04 +0400 Message-ID: <20100528094804.17493.89979.stgit@skyserv> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] sparc64: fix 128-bit atomic load from nucleus context List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: Igor V. Kovalenko Signed-off-by: Igor V. Kovalenko --- sparc-dis.c | 2 ++ target-sparc/op_helper.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sparc-dis.c b/sparc-dis.c index c1b682d..dbd3b4f 100644 --- a/sparc-dis.c +++ b/sparc-dis.c @@ -2155,6 +2155,8 @@ static const arg asi_table_v9[] = /* These are UltraSPARC extensions. */ { 0x14, "#ASI_PHYS_USE_EC"}, { 0x15, "#ASI_PHYS_BYPASS_EC_WITH_EBIT"}, + { 0x24, "#ASI_NUCLEUS_QUAD_LDD" }, + { 0x2c, "#ASI_NUCLEUS_QUAD_LDD_LITTLE" }, { 0x45, "#ASI_LSU_CONTROL_REG"}, { 0x47, "#ASI_DCACHE_TAG"}, { 0x49, "#ASI_INTR_RECEIVE"}, diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index e946ec7..63fef8c 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -3088,19 +3088,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]);