From patchwork Fri Oct 13 21:27:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 733298 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp1679328wrv; Fri, 13 Oct 2023 14:34:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFrWLVJrUbt6JlV0GV2OY1NR2Rca6VmQoWeiUbwWr9G14IhRV35ZwdgUl+qH67kfMfOFZNo X-Received: by 2002:a67:c88e:0:b0:457:bc5f:b497 with SMTP id v14-20020a67c88e000000b00457bc5fb497mr4608390vsk.27.1697232890094; Fri, 13 Oct 2023 14:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697232890; cv=none; d=google.com; s=arc-20160816; b=bcMmxJBBUySvCuxJ8n4b/h+98IZDNChh8yVuikrBYzL5qcKmcb5m05e+1/PTXXPjDR WSIK+Sopjky2/hzJdGnd6+LaRouaRTP/odZQzAm5IT+VnhjbFUH3D7nUqq2/rleszs3J rm2VpmcdOBT4TJxfC0kdoG8w74ruM88gMijFyCYtx7IlTVgGb0v3IhSZzqbixFudqpCX THNNng3UXXCIswmyyGlDprrLUXR2S+ubtZ9cUkAhdPUG5p+bjabZ9OjdQbkiQA24mMoI e4zXOBYM8hDLNYc0JxG0fgSqKjTjUB6qtrOcgRaQl/T0JcJLNGsriZDhFaIdjo45Ae0X g6XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=z+GdCnSdgZMnPa1lP3cKEZTy8hU2+r8c83iJCBTZWNY=; fh=OY/jf0qYEhT53LcIJp8d/e39mN3vEzshkseI36O8N8s=; b=wCxj3l7BDGso+Zy6eKHe9wpeOLGO/XCV/3jd51BY+ReWKshsM9fU7+SM0bwXwPqxo0 2rBnWyEAF50uL6hA8d2Bn47bcEFCEN5L3QHh836owEUM/5W/QOdTMqO3iDlxK+03TlFX D2Hkr8VumuhfAqtUfdVsSvR726M8Lq+arLRPlLh1pF1t4S67lTTMjGQ541JMMLypFke6 1dsxJclUO3XgkUke0+LNA+q9PWTBL/3D8EYIDV14j8aRNmWMq4388IB/eFUrnMaYr+mT kreQ3R3vROvOX4OKs/HKZ69jhOHrw5290dWhShfPWUfIEExz1mlmuh9fp3CZSnx8jvZy Si5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=esv1g5NX; 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=pass (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 q12-20020a05622a030c00b0041817f7086dsi1795661qtw.556.2023.10.13.14.34.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Oct 2023 14:34:50 -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=pass header.i=@linaro.org header.s=google header.b=esv1g5NX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrPiR-0006ES-Gv; Fri, 13 Oct 2023 17:29:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrPiP-0006DX-HO for qemu-devel@nongnu.org; Fri, 13 Oct 2023 17:29:01 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrPiN-0000S9-Ua for qemu-devel@nongnu.org; Fri, 13 Oct 2023 17:29:01 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-6b5cac99cfdso647017b3a.2 for ; Fri, 13 Oct 2023 14:28:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697232538; x=1697837338; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z+GdCnSdgZMnPa1lP3cKEZTy8hU2+r8c83iJCBTZWNY=; b=esv1g5NXEbKuEYZe7PkEBEwVXfpobGdfsYDiHotWiirWm1fJ9SxiAovU86q0YB2MmP 9is59uZIX4m48plPdQnkLxCFteHf3ZQ+yK1cJziDbi4PMoN/FdaVkoIWbYm+e6p2V6gk MAZTxMgurW4j2qnCfdSUgRS2jCvcmtxl0ylhXRrxmP4QtVasQdFf26XZNNyryWReT0FS oGHUtePfJpL0JVgDyiwsXpPui6mDs6f00Pl/jQCEWGs7gKRstSk9smRZ7VVOqyigq5X4 CxCfskEPOf/3vuxZ1rsRE+Y7CVuxSZfena++twUN7nHNrXhKfbdOYIvUd75Rxqw0XJkO uRIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697232538; x=1697837338; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z+GdCnSdgZMnPa1lP3cKEZTy8hU2+r8c83iJCBTZWNY=; b=JM5OriBU19nF59Mu0yVIj81J55++IJkaV/I6xuzIrXDiReGjdorM+rut4NV1T9u8L5 1u1lW0VD0NOncAPYs8MxAZ0FQ0y49NYlwQ9L6LMIuR9Dm4KyUctX2yuEtLOsLAjS9PBf iG+gxKC6mozhicjZH0fNB9E0Hx7wKTGYgDHEhKuDMw+AoQOSdtnhlLmFPTs7kpmH8UIC xq4WzFHA21zlWDGUgG+F9z2JAmZwK7+pI81mBHJufWFGUzRHjlm3YuQmufpT9+BDl3gP 7IWZ8dYn542xcokmIsQkGy9CXG/bTN17sqBTTN5Sa+IE00lBc3LVfP5fmyrD7EieLJ+y k1YQ== X-Gm-Message-State: AOJu0Yz4aNUWEYG/H0/J14qBxjPzBmCSEtdY752V2UG3wb4ZczZp+ACQ v03EuCaiLsvMK79NMb0MrEOeDrHkWmMRbDOFPxE= X-Received: by 2002:a05:6300:8088:b0:172:83b8:67f7 with SMTP id ap8-20020a056300808800b0017283b867f7mr9778285pzc.44.1697232538321; Fri, 13 Oct 2023 14:28:58 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id b185-20020a6334c2000000b0058988954686sm70753pga.90.2023.10.13.14.28.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 14:28:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com Subject: [PATCH 11/85] target/sparc: Merge gen_fcond with only caller Date: Fri, 13 Oct 2023 14:27:32 -0700 Message-Id: <20231013212846.165724-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013212846.165724-1-richard.henderson@linaro.org> References: <20231013212846.165724-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.google.com 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/sparc/translate.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 1ac3bdd03f..ecb485c305 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -1265,19 +1265,6 @@ static void gen_fcompare(DisasCompare *cmp, unsigned int cc, unsigned int cond) } } -static void gen_fcond(TCGv r_dst, unsigned int cc, unsigned int cond) -{ - DisasCompare cmp; - gen_fcompare(&cmp, cc, cond); - - /* The interface is to return a boolean in r_dst. */ - if (cmp.is_bool) { - tcg_gen_mov_tl(r_dst, cmp.c1); - } else { - tcg_gen_setcond_tl(cmp.cond, r_dst, cmp.c1, cmp.c2); - } -} - // Inverted logic static const TCGCond gen_tcg_cond_reg[8] = { TCG_COND_NEVER, /* reserved */ @@ -2951,6 +2938,7 @@ TRANS(Bicc, ALL, do_bpcc, a) static bool do_fbpfcc(DisasContext *dc, arg_bcc *a) { target_long target = dc->pc + a->i * 4; + DisasCompare cmp; if (gen_trap_ifnofpu(dc)) { return true; @@ -2965,7 +2953,13 @@ static bool do_fbpfcc(DisasContext *dc, arg_bcc *a) return advance_jump_uncond_always(dc, a->a, target); default: flush_cond(dc); - gen_fcond(cpu_cond, a->cc, a->cond); + + gen_fcompare(&cmp, a->cc, a->cond); + if (cmp.is_bool) { + tcg_gen_mov_tl(cpu_cond, cmp.c1); + } else { + tcg_gen_setcond_tl(cmp.cond, cpu_cond, cmp.c1, cmp.c2); + } return advance_jump_cond(dc, a->a, target); } }