From patchwork Fri Jul 24 00:28:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 247103 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp1978884ilg; Thu, 23 Jul 2020 17:32:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCjNToWLGj0s8lyiTAiCrK6sKBqt1nasd/g4XeZ7t1/dyxAUx8kRlYMt04k++9jZRhqKPy X-Received: by 2002:a05:6902:6c8:: with SMTP id m8mr10463990ybt.85.1595550778041; Thu, 23 Jul 2020 17:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595550778; cv=none; d=google.com; s=arc-20160816; b=N3fEz37dsEcbim2DOd+xNo8J2ajH8xHaVq8Un1/CKiCUA1ymi82dRlOElWZOmW71Ya DhIvPZGu0+cL+UTRpP6Ab63BHgYNi6ccl4J0oz5DY45d/z5tUhv0/7Kfvp6YIHCsfJLV wCMsdfL6FYoyYS3sB4hMkKJ4KS8kb2P//6d/ORdvfwXxsYZATToS8zwXcJYPry2urQyS cVc8FCXg4I+4M6iaUdLPHt0CeFIAg4Ys8Le0pBqbe+cm3E3jWU7H6sZbKqe8pnYmXaps SIicejZquIChhEUJaWp1fNyn8ug5dbwiU3aEebvP669QBEsWvOq6CpRHH3RBRTzLbQ2A zPZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=9BL1gLZ55ebPF1CU6VCPP/FzwVosXUicPzzehG55MPU=; b=BjceGOY78JQkJRQ5YvVOQhaE8psELJ116IZULZYgeh9KkSM8D/e9m/pxilOmH1+GGB b4d8Fd9OaM8mHYLNF0Orv0vOYUtTS/fo24xW4aD4n545IDSnA4pgScnSWbO7ZtM5WWCe HU3kaWo4Kl+WDdjNabdNsJbN3SK+ZUpt5BuZceizetxyyvIueI/HBdeUSjNaVoJirYP8 L8UKrIRm785nntq+9evr9acA7R1lNqlNXwcfffvacQ0pxR7I3fO6h+TU3CgSKzould38 Qvo2ATYqNGaxhRAzC7Ha1zhLP4TpNjqouCtGyJGh5Jkm75/9LorJJWBksU/NcxKLBXlc H0/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=qaRmjisP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d7si3526306ybf.277.2020.07.23.17.32.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Jul 2020 17:32:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=qaRmjisP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyldx-0005A7-IA for patch@linaro.org; Thu, 23 Jul 2020 20:32:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jylZQ-0000Cy-S5 for qemu-devel@nongnu.org; Thu, 23 Jul 2020 20:28:16 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:45279) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jylZO-0008En-LU for qemu-devel@nongnu.org; Thu, 23 Jul 2020 20:28:16 -0400 Received: by mail-pf1-x444.google.com with SMTP id z3so4050144pfn.12 for ; Thu, 23 Jul 2020 17:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9BL1gLZ55ebPF1CU6VCPP/FzwVosXUicPzzehG55MPU=; b=qaRmjisPRMx6Bj6xIKHQ+UdKBYDsba74xVnhAR/AseeiXethgPO4Ue8+YgGEfrVr2S NX2L6e6SXP4LBkkNUEUt6Cz3f30tlg80W3cNgAwUs+q7QawJj52t1s+cBp10VvFJ0qZI zVOKxeduGUSxDzzRHWZDf9H4grMztliHSmGyLf6OMzmyYJADYwdVk8uXtzdk0oI8sWUr VFemrrl8l/PDHOa8zC5rsMKk5+My0bCXP66BogF923FxdpeySyUCTqLYFUEOeRdm+wqc xS57ZQuSY1nKS/x42WEj4qKW9kXtMIYvaxDJz3OBQuXDcSep7Na7izjkvH4rirQKw9XE peyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9BL1gLZ55ebPF1CU6VCPP/FzwVosXUicPzzehG55MPU=; b=CWq3wOxzTpvTCe3EY2+wWs9tPmQKlZsDgggFeoW2TqNUSr5cSkP43Ud5L2Yj/Qt4JP DI+G/jdEr+kBNrAFrY2oOCiivo5ouPkTovpYdGBPRW1KkAgkqSjPoEZvWcmCLM+SZpHS MclKBkgd3pFsB0uDaM53C6ZN5Nk8//J1vqe2oYWaCcWJXALJF9ueGmMDob6CJzXLol3p obEE0l97mK654puR3rMZw6vCun5oNJBO+eNgfyB0efQY6o8gFPP+TZqcKLFLu6ZcPSQn 2nZOWhfcg/3RbSasdeme00rtZspNPJo/2pHj4DVkXIq73sqLBzFJPZsw92r8H6AWqVy5 HrRg== X-Gm-Message-State: AOAM533pHDYBHZL+sNoPX25t2GP5xq/pewfB/skRx/KvnUlGIzxF/YCx hMdfReTAWPxJ2EMZw18Zs+cdWS/8sJ0= X-Received: by 2002:a62:8688:: with SMTP id x130mr6546500pfd.280.1595550493032; Thu, 23 Jul 2020 17:28:13 -0700 (PDT) Received: from localhost.localdomain (216-160-65-90.tukw.qwest.net. [216.160.65.90]) by smtp.gmail.com with ESMTPSA id q20sm4224635pfn.111.2020.07.23.17.28.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2020 17:28:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 3/7] target/riscv: Generate nanboxed results from trans_rvf.inc.c Date: Thu, 23 Jul 2020 17:28:03 -0700 Message-Id: <20200724002807.441147-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200724002807.441147-1-richard.henderson@linaro.org> References: <20200724002807.441147-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::444; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: frank.chang@sifive.com, alistair23@gmail.com, qemu-riscv@nongnu.org, zhiwei_liu@c-sky.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Make sure that all results from inline single-precision scalar operations are properly nan-boxed to 64-bits. Signed-off-by: Richard Henderson --- target/riscv/insn_trans/trans_rvf.inc.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.25.1 Reviewed-by: LIU Zhiwei Reviewed-by: Chih-Min Chao Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
diff --git a/target/riscv/insn_trans/trans_rvf.inc.c b/target/riscv/insn_trans/trans_rvf.inc.c index c7057482e8..264d3139f1 100644 --- a/target/riscv/insn_trans/trans_rvf.inc.c +++ b/target/riscv/insn_trans/trans_rvf.inc.c @@ -167,6 +167,7 @@ static bool trans_fsgnj_s(DisasContext *ctx, arg_fsgnj_s *a) tcg_gen_deposit_i64(cpu_fpr[a->rd], cpu_fpr[a->rs2], cpu_fpr[a->rs1], 0, 31); } + gen_nanbox_s(cpu_fpr[a->rd], cpu_fpr[a->rd]); mark_fs_dirty(ctx); return true; } @@ -183,6 +184,7 @@ static bool trans_fsgnjn_s(DisasContext *ctx, arg_fsgnjn_s *a) tcg_gen_deposit_i64(cpu_fpr[a->rd], t0, cpu_fpr[a->rs1], 0, 31); tcg_temp_free_i64(t0); } + gen_nanbox_s(cpu_fpr[a->rd], cpu_fpr[a->rd]); mark_fs_dirty(ctx); return true; } @@ -199,6 +201,7 @@ static bool trans_fsgnjx_s(DisasContext *ctx, arg_fsgnjx_s *a) tcg_gen_xor_i64(cpu_fpr[a->rd], cpu_fpr[a->rs1], t0); tcg_temp_free_i64(t0); } + gen_nanbox_s(cpu_fpr[a->rd], cpu_fpr[a->rd]); mark_fs_dirty(ctx); return true; } @@ -369,6 +372,7 @@ static bool trans_fmv_w_x(DisasContext *ctx, arg_fmv_w_x *a) #else tcg_gen_extu_i32_i64(cpu_fpr[a->rd], t0); #endif + gen_nanbox_s(cpu_fpr[a->rd], cpu_fpr[a->rd]); mark_fs_dirty(ctx); tcg_temp_free(t0);