From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33139 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJXpT-0000ml-Jt for qemu-devel@nongnu.org; Tue, 01 Jun 2010 16:12:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJXpR-0006Ts-W0 for qemu-devel@nongnu.org; Tue, 01 Jun 2010 16:12:51 -0400 Received: from mail-fx0-f45.google.com ([209.85.161.45]:34677) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJXpR-0006Nu-Qr for qemu-devel@nongnu.org; Tue, 01 Jun 2010 16:12:49 -0400 Received: by mail-fx0-f45.google.com with SMTP id 17so4227877fxm.4 for ; Tue, 01 Jun 2010 13:12:49 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=[192.168.1.2]) by skyserv with esmtp (Exim 4.71) (envelope-from ) id 1OJXpQ-0001cT-1f for qemu-devel@nongnu.org; Wed, 02 Jun 2010 00:12:48 +0400 From: "Igor V. Kovalenko" Date: Wed, 02 Jun 2010 00:12:48 +0400 Message-ID: <20100601201247.5908.75284.stgit@skyserv> In-Reply-To: <20100601200434.5908.19495.stgit@skyserv> References: <20100601200434.5908.19495.stgit@skyserv> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 6/8] sparc64: improve ldf and stf insns 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 - implemented block load/store primary/secondary with user privilege Signed-off-by: Igor V. Kovalenko --- target-sparc/op_helper.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index b9af52b..83067ae 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -3161,6 +3161,20 @@ void helper_ldf_asi(target_ulong addr, int asi, int size, int rd) } return; + case 0x70: // Block load primary, user privilege + case 0x71: // Block load secondary, user privilege + if (rd & 7) { + raise_exception(TT_ILL_INSN); + return; + } + helper_check_align(addr, 0x3f); + for (i = 0; i < 16; i++) { + *(uint32_t *)&env->fpr[rd++] = helper_ld_asi(addr, asi & 0x1f, 4, + 0); + addr += 4; + } + + return; default: break; } @@ -3211,6 +3225,20 @@ void helper_stf_asi(target_ulong addr, int asi, int size, int rd) } return; + case 0x70: // Block store primary, user privilege + case 0x71: // Block store secondary, user privilege + if (rd & 7) { + raise_exception(TT_ILL_INSN); + return; + } + helper_check_align(addr, 0x3f); + for (i = 0; i < 16; i++) { + val = *(uint32_t *)&env->fpr[rd++]; + helper_st_asi(addr, val, asi & 0x1f, 4); + addr += 4; + } + + return; default: break; }