From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhIQx-0001By-OJ for qemu-devel@nongnu.org; Thu, 14 Jul 2011 05:42:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QhIQw-0002tM-3E for qemu-devel@nongnu.org; Thu, 14 Jul 2011 05:42:15 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:61123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhIQv-0002tG-PM for qemu-devel@nongnu.org; Thu, 14 Jul 2011 05:42:13 -0400 Received: by iwn3 with SMTP id 3so42824iwn.4 for ; Thu, 14 Jul 2011 02:42:12 -0700 (PDT) From: Tsuneo Saito Date: Thu, 14 Jul 2011 18:41:36 +0900 Message-Id: <1310636503-8956-2-git-send-email-tsnsaito@gmail.com> In-Reply-To: <1310636503-8956-1-git-send-email-tsnsaito@gmail.com> References: <1310636503-8956-1-git-send-email-tsnsaito@gmail.com> Subject: [Qemu-devel] [PATCH v2 1/8] SPARC64: Implement ldfa/lddfa/ldqfa instructions properly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Tsuneo Saito This patch implements sparcv9 ldfa/lddfa/ldqfa instructions with non block-load ASIs. Signed-off-by: Tsuneo Saito --- target-sparc/op_helper.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index fd0cfbd..a75ac4f 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -3331,7 +3331,7 @@ void helper_ldda_asi(target_ulong addr, int asi, int rd) void helper_ldf_asi(target_ulong addr, int asi, int size, int rd) { unsigned int i; - target_ulong val; + CPU_DoubleU u; helper_check_align(addr, 3); addr = asi_address_mask(env, asi, addr); @@ -3371,17 +3371,23 @@ void helper_ldf_asi(target_ulong addr, int asi, int size, int rd) break; } - val = helper_ld_asi(addr, asi, size, 0); switch(size) { default: case 4: - *((uint32_t *)&env->fpr[rd]) = val; + *((uint32_t *)&env->fpr[rd]) = helper_ld_asi(addr, asi, size, 0); break; case 8: - *((int64_t *)&DT0) = val; + u.ll = helper_ld_asi(addr, asi, size, 0); + *((uint32_t *)&env->fpr[rd++]) = u.l.upper; + *((uint32_t *)&env->fpr[rd++]) = u.l.lower; break; case 16: - // XXX + u.ll = helper_ld_asi(addr, asi, 8, 0); + *((uint32_t *)&env->fpr[rd++]) = u.l.upper; + *((uint32_t *)&env->fpr[rd++]) = u.l.lower; + u.ll = helper_ld_asi(addr + 8, asi, 8, 0); + *((uint32_t *)&env->fpr[rd++]) = u.l.upper; + *((uint32_t *)&env->fpr[rd++]) = u.l.lower; break; } } -- 1.7.5.4