From patchwork Wed Jul 13 03:30:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsuneo Saito X-Patchwork-Id: 104472 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4F52AB6F74 for ; Wed, 13 Jul 2011 13:34:50 +1000 (EST) Received: from localhost ([::1]:60126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgqDm-00018i-Rq for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2011 23:34:47 -0400 Received: from eggs.gnu.org ([140.186.70.92]:38766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgqAe-00018H-LB for qemu-devel@nongnu.org; Tue, 12 Jul 2011 23:31:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgqAd-0004FE-6B for qemu-devel@nongnu.org; Tue, 12 Jul 2011 23:31:32 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:52793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgqAd-0004EG-0A for qemu-devel@nongnu.org; Tue, 12 Jul 2011 23:31:31 -0400 Received: by iwn3 with SMTP id 3so5877236iwn.4 for ; Tue, 12 Jul 2011 20:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=q16IGXBezxaFBLGrXVQLFd6wOYlsESIX+q1iUy08TBY=; b=URFnxgMEqunKbxx6GvfM9bd0sp/p7Y8phguxjIEVdFCNsPtSKaW3phzZqgwViSIHsq YXc+uBQUw2w5quGfE8pqogC0WI9thOFzPycVaqG4kl1+bBAmd8nBojhvhXn9wGu/Nk+Z J8xgNuJUUfREmXtrFv0HXgJSvwypo/aLpy7rM= Received: by 10.42.75.194 with SMTP id b2mr663735ick.286.1310527889921; Tue, 12 Jul 2011 20:31:29 -0700 (PDT) Received: from localhost.localdomain (tetkyo149119.tkyo.te.ftth2.ppp.infoweb.ne.jp [202.219.195.119]) by mx.google.com with ESMTPS id hp8sm15541550icc.11.2011.07.12.20.31.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Jul 2011 20:31:29 -0700 (PDT) From: Tsuneo Saito To: qemu-devel@nongnu.org Date: Wed, 13 Jul 2011 12:30:46 +0900 Message-Id: <1310527849-784-2-git-send-email-tsnsaito@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1310527849-784-1-git-send-email-tsnsaito@gmail.com> References: <1310527849-784-1-git-send-email-tsnsaito@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.173 Cc: Tsuneo Saito Subject: [Qemu-devel] [PATCH 1/4] SPARC64: Implement ldfa/lddfa/ldqfa instructions properly X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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; } }