From patchwork Sat Dec 28 21:49:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 22767 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 28873218CC for ; Sat, 28 Dec 2013 21:49:20 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id gq1sf47805648obb.10 for ; Sat, 28 Dec 2013 13:49:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=KgSrPCoeMgZpkBM97YWrHmBTmneEW7gm/VnEq6Heg7E=; b=YKI7vzeNelQ/UGNncABphT8K188FaRedZiGCcxQs6KXsEjVnQASCK5kVIda5qOTER4 pvMj59hbT2QnD/janoy7g11O0YJxm4K3JJLELAYibPShW5w60+fd7hMhgvfrM00eNRDV ManQuUOTQetdavBTSDdGgrg4aASJd1uuyx49107BWoVslwP7HsnwkB5q+G/rjLlt8exb VvKzGnVzo1sKYjCg1J6ht1MarzfQXV/V4gS7g6/gkNGCXV9xJxQf+938Blvvbej5CvWm SM+kTrM2f90VUaS6QMWJerPyETwa3Wkdz3KrIJ3sjmYxUtejVxQEBOxvyz7NWA9KaLRT QTxg== X-Gm-Message-State: ALoCoQkH85jLAyIdjXYwpdx143JfdVSrntNS6x9otxEHltPaNZoH53WWqgh4Ex0sbeEqtrZCbLzv X-Received: by 10.42.85.148 with SMTP id q20mr19108337icl.22.1388267359968; Sat, 28 Dec 2013 13:49:19 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.131.162 with SMTP id on2ls3072490qeb.73.gmail; Sat, 28 Dec 2013 13:49:19 -0800 (PST) X-Received: by 10.58.232.228 with SMTP id tr4mr13242511vec.34.1388267359881; Sat, 28 Dec 2013 13:49:19 -0800 (PST) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id mj10si13839367vcb.12.2013.12.28.13.49.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 28 Dec 2013 13:49:19 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.54; Received: by mail-vb0-f54.google.com with SMTP id g10so5162131vbg.41 for ; Sat, 28 Dec 2013 13:49:19 -0800 (PST) X-Received: by 10.221.18.70 with SMTP id qf6mr11579726vcb.37.1388267359770; Sat, 28 Dec 2013 13:49:19 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp529331ved; Sat, 28 Dec 2013 13:49:19 -0800 (PST) X-Received: by 10.194.110.138 with SMTP id ia10mr38961868wjb.3.1388267357837; Sat, 28 Dec 2013 13:49:17 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id hm7si15544806wib.39.2013.12.28.13.49.14 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 28 Dec 2013 13:49:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Vx1kt-0008IB-IV; Sat, 28 Dec 2013 21:49:11 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf , Michael Matz , Claudio Fontana , Dirk Mueller , Laurent Desnogues , kvmarm@lists.cs.columbia.edu, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Christoffer Dall , Will Newton Subject: [PATCH 08/10] target-arm: A64: Add support for floating point conditional compare Date: Sat, 28 Dec 2013 21:49:09 +0000 Message-Id: <1388267351-31818-9-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1388267351-31818-1-git-send-email-peter.maydell@linaro.org> References: <1388267351-31818-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Claudio Fontana This adds decoding support for C3.6.23 FP Conditional Compare. Signed-off-by: Claudio Fontana Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index 4674bf5..e8ce846 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -3283,7 +3283,40 @@ static void disas_fp_compare(DisasContext *s, uint32_t insn) */ static void disas_fp_ccomp(DisasContext *s, uint32_t insn) { - unsupported_encoding(s, insn); + unsigned int mos, type, rm, cond, rn, op, nzcv; + TCGv_i64 tcg_flags; + int label_continue = -1; + + mos = extract32(insn, 29, 3); + type = extract32(insn, 22, 2); /* 0 = single, 1 = double */ + rm = extract32(insn, 16, 5); + cond = extract32(insn, 12, 4); + rn = extract32(insn, 5, 5); + op = extract32(insn, 4, 1); + nzcv = extract32(insn, 0, 4); + + if (mos || type > 1) { + unallocated_encoding(s); + return; + } + + if (cond < 0x0e) { /* not always */ + int label_match = gen_new_label(); + label_continue = gen_new_label(); + arm_gen_test_cc(cond, label_match); + /* nomatch: */ + tcg_flags = tcg_const_i64(nzcv << 28); + gen_set_nzcv(tcg_flags); + tcg_temp_free_i64(tcg_flags); + tcg_gen_br(label_continue); + gen_set_label(label_match); + } + + handle_fp_compare(s, type, rn, rm, false, op); + + if (cond < 0x0e) { + gen_set_label(label_continue); + } } /* C3.6.24 Floating point conditional select