From patchwork Tue Nov 13 23:50:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 10681667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4AD013B5 for ; Tue, 13 Nov 2018 23:55:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B378B2A65E for ; Tue, 13 Nov 2018 23:55:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3F5E2A93F; Tue, 13 Nov 2018 23:55:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 50BC92A65E for ; Tue, 13 Nov 2018 23:55:05 +0000 (UTC) Received: from localhost ([::1]:56549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMiWO-0006Et-NR for patchwork-qemu-devel@patchwork.kernel.org; Tue, 13 Nov 2018 18:55:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMiT4-0003ay-Kq for qemu-devel@nongnu.org; Tue, 13 Nov 2018 18:51:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMiSx-0006do-J2 for qemu-devel@nongnu.org; Tue, 13 Nov 2018 18:51:36 -0500 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:45334) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMiSv-0006YW-16 for qemu-devel@nongnu.org; Tue, 13 Nov 2018 18:51:29 -0500 Received: by mail-pl1-x632.google.com with SMTP id a14so2209061plm.12 for ; Tue, 13 Nov 2018 15:51:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=subject:date:message-id:in-reply-to:references:cc:from:to; bh=LrSNAK5VmQ6c5x3kGvqXMw47hLHndptPmbk4QMAiCLc=; b=VQmxS9mUaXnBt5okfj5aiQ5eNoB6vEicU2WVVT5hiTbMosDgZjc6dWKjTXbXxOvSlb bdvxvn5xSe0Q6cNdZKjJuQ5HRHcn3zH/AKbibnkkJjnqwTw/W2ZGNvQSz1cqFhT/zGPt c9uMLujT4gqCvB2YRcnRkLGPENkwmMUOBp+HXZDbC2g4RDn8JP0NJSCBgWrkfcLqKyCb 8XdRYC48glbfDGUMDQMVTyel8Rv2buFc0dg3xeeJyKK7AJTvKQzOpCM+BdALX8rhORJw 7qr0ni7xj6xaIsS3u4xHS0VupMsYrUpP7+fUt9YUWXncgB3mAeHAU48+kSfv2NvrQms1 sNsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :cc:from:to; bh=LrSNAK5VmQ6c5x3kGvqXMw47hLHndptPmbk4QMAiCLc=; b=TCkhOQ0Lq0D7g5560JtWu0HEJZk0dtzP4Zzvy0PYjjLmteMSopqTpaWm+N1rcT530F zV06pmdubH5Nh9iz5p5Dv3fNvwKL4iDKfWfY92cQloo32jmLJAe8t8EKFIShV7edxIdc iDopDi5KXo5Ky7B8wvg1+hFXhVbtJlMyvYDBzpCNtIGrKLOmF+uWqgwVWe4vSy1TpRDQ TGbGPpZEK5itigUm6jzmp0vhLVa7QPbka8J0QMd1ZmtYeWZI4ztDqDXSztMV3PQdU3Iq 0h8IxJEHO6VrAP+kHLv7nEV8UUDXePgicLZ96md0EqjV9OZ4q9zvjnzdjsJ5TrM2bM1e V1VQ== X-Gm-Message-State: AGRZ1gI6EM3AAKpwt1Uje0nodZAVyJ7VEHh+ZtZ0CpgJDOaafdFkXAZ3 zXosHIwYuJN8jVQznhF1UkhVWgMN7cQ5PA== X-Google-Smtp-Source: AJdET5fAs7vwWEMIN7Kzqlp//nj+SDeCyjMZf6x3HpJZAGFrRLFcjf1Iee2yMoF/TRWjWf4xE3GBFw== X-Received: by 2002:a17:902:3103:: with SMTP id w3-v6mr7308825plb.18.1542153080578; Tue, 13 Nov 2018 15:51:20 -0800 (PST) Received: from localhost ([64.114.255.114]) by smtp.gmail.com with ESMTPSA id g7-v6sm22813127pfo.139.2018.11.13.15.51.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 15:51:19 -0800 (PST) Date: Tue, 13 Nov 2018 15:50:43 -0800 Message-Id: <20181113235045.14155-3-palmer@sifive.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181113235045.14155-1-palmer@sifive.com> References: <20181113235045.14155-1-palmer@sifive.com> From: Palmer Dabbelt To: qemu-riscv@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::632 Subject: [Qemu-devel] [PULL 2/4] target/riscv: Fix FCLASS_D being treated as RV64 only X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , Palmer Dabbelt , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson Signed-off-by: Palmer Dabbelt --- target/riscv/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 18d7b6d1471d..5359088e24bc 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -1237,13 +1237,14 @@ static void gen_fp_arith(DisasContext *ctx, uint32_t opc, int rd, tcg_temp_free(t0); break; -#if defined(TARGET_RISCV64) case OPC_RISC_FMV_X_D: /* also OPC_RISC_FCLASS_D */ switch (rm) { +#if defined(TARGET_RISCV64) case 0: /* FMV */ gen_set_gpr(rd, cpu_fpr[rs1]); break; +#endif case 1: t0 = tcg_temp_new(); gen_helper_fclass_d(t0, cpu_fpr[rs1]); @@ -1255,6 +1256,7 @@ static void gen_fp_arith(DisasContext *ctx, uint32_t opc, int rd, } break; +#if defined(TARGET_RISCV64) case OPC_RISC_FMV_D_X: t0 = tcg_temp_new(); gen_get_gpr(t0, rs1);