From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHIH7-0006h0-QN for qemu-devel@nongnu.org; Tue, 12 Aug 2014 16:02:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHIH1-0003sS-Q2 for qemu-devel@nongnu.org; Tue, 12 Aug 2014 16:02:29 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:44047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHIH1-0003s5-JX for qemu-devel@nongnu.org; Tue, 12 Aug 2014 16:02:23 -0400 Received: by mail-wi0-f172.google.com with SMTP id n3so6407730wiv.17 for ; Tue, 12 Aug 2014 13:02:22 -0700 (PDT) From: Artyom Tarasenko Date: Tue, 12 Aug 2014 22:02:13 +0200 Message-Id: Subject: [Qemu-devel] [PATCH v2] target-sparc64: implement Short Floating-Point Store Instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: blauwirbel@gmail.com, mark.cave-ayland@ilande.co.uk, Artyom Tarasenko , rth@twiddle.net Implement Short Floating-Point Store Instructions as described in the chapter 13.5.2 of UltraSPARC-IIi User's Manual. Particularly this instructions are used by NetBSD 4.0.1+ /sparc64 Signed-off-by: Artyom Tarasenko Tested-by: Mark Cave-Ayland --- With this patch applied on top of cmd646 patches it's possible to install and boot NetBSD 6.1.4 /sparc64. Changes from v0: corrected the comment messages, it's store, not load. target-sparc/ldst_helper.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index 03bd9f9..736d953 100644 --- a/target-sparc/ldst_helper.c +++ b/target-sparc/ldst_helper.c @@ -2154,7 +2154,6 @@ void helper_stf_asi(CPUSPARCState *env, target_ulong addr, int asi, int size, unsigned int i; target_ulong val; - helper_check_align(env, addr, 3); addr = asi_address_mask(env, asi, addr); switch (asi) { @@ -2192,7 +2191,21 @@ void helper_stf_asi(CPUSPARCState *env, target_ulong addr, int asi, int size, } return; + case 0xd2: /* 16-bit floating point store primary */ + case 0xd3: /* 16-bit floating point store secondary */ + case 0xda: /* 16-bit floating point store primary, LE */ + case 0xdb: /* 16-bit floating point store secondary, LE */ + helper_check_align(env, addr, 1); + /* Fall through */ + case 0xd0: /* 8-bit floating point store primary */ + case 0xd1: /* 8-bit floating point store secondary */ + case 0xd8: /* 8-bit floating point store primary, LE */ + case 0xd9: /* 8-bit floating point store secondary, LE */ + val = env->fpr[rd/2].l.lower; + helper_st_asi(env, addr, val, asi & 0x8d, ((asi & 2) >> 1) + 1); + return; default: + helper_check_align(env, addr, 3); break; } -- 1.8.3.1