From patchwork Thu Oct 26 00:14:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 738194 Delivered-To: patch@linaro.org Received: by 2002:adf:f842:0:b0:32d:baff:b0ca with SMTP id d2csp552634wrq; Wed, 25 Oct 2023 17:18:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEvyxmAZF5OJ9nGAsyu747D0h2JclzcT0/v1rzebEdI3kITMJ8rarHxUGwOeeE+aNEbtzlx X-Received: by 2002:a05:6000:79d:b0:32d:a688:8813 with SMTP id bu29-20020a056000079d00b0032da6888813mr17198050wrb.32.1698279528788; Wed, 25 Oct 2023 17:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698279528; cv=none; d=google.com; s=arc-20160816; b=O9zZ2h5w0yrqZ0EvJm4JW5K/EpwxyvJoCmjUY27gdGDltqkm+hD5gGjsuQl+SEYNgY pmHq+svUcKsFjz/IK1ml/3CU9tFIwEOnWm+kPwqx8ID8ojM/33a70Y6iojTLpoeTKFeK wJFp5YWR+bCxULwEDczQUEGZrNhe9TxW85582FyueLYYE0M2mjXmk81Jd7fM1FxgaLAN cUduQ4EY7T9cY/6/gfTVEtO6732qXfi6l57SFzzshY9COVQJ3VIkK217TNO2Pydpksbi x8z9OIyFm+Ie5ur5j+BAjpUfP7zRDt8OcAN6l86s6591VW2/k4axbA0iYzlK6ECepkGk fhsg== 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=aIOAJWBVtCMbS0c4KC6cXcYTMMaXIG2tg2FWJOn2ue8=; fh=J4M4Z4TZxvAT8lkmK1LtxqMjpO7Qiod4IMBL2bk0hxA=; b=fcul6CftLOy1FkBRJkSsYdJlAmB9LRxEM0NNgAVUC61bnJM3wAQRx6SJAZMwEYTTxD WqJKTnT8lp26jFXTmLAwL7j3NHCdV/ujO4fQ0S/6JB0utHSj6bbv9agHdJ+QcQ0/XO8S xUzaS8uwahKmQ83TYVpM9agYKhTm3r+ZAKBVRVHW/2Lugo5xOnCaRYJTVXBh1+8MQLwd wCuZy9s06YmNB3JlaDBlgZ2u2Ieg95nydAxMXspXpgydxP6Kq9J34y5xG9uSSWVQEYG0 KeYTb0nB4HiumMW7WVJL0GzXsm0gc4cy2AtE4blH51URGNPRU/xrJKcqhbif3SIo1QLq 72HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pDmdxugL; 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 x12-20020a5d60cc000000b0032487266814si8239224wrt.290.2023.10.25.17.18.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2023 17:18:48 -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=pDmdxugL; 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 1qvo3B-0007Pl-Bm; Wed, 25 Oct 2023 20:16:37 -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 1qvo2r-00076i-Hk for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:16:17 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvo2m-0004tl-Fr for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:16:17 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1c77449a6daso2337045ad.0 for ; Wed, 25 Oct 2023 17:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698279371; x=1698884171; 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=aIOAJWBVtCMbS0c4KC6cXcYTMMaXIG2tg2FWJOn2ue8=; b=pDmdxugLk2t8vZtSZ1t7551RxFxwfyDfhcxkGhsDokxhqbldzYp2nJcIVgeQ7xrTfH +ws5q0IiFVHsgX9OLJ8IFaKUxARrROwngf9nN8htr2qNldicXYpFkts04nak6kqJBfKy Tndp4ITroNWcrsCITpsKCmQkT50hTQ5at3UO8q6KazAc8qoB8HHDy4zmAlW0CbYepMlO S1JHuiS4QJaE3jGjLRPo9AnoELFS2HKroAESx6KK7yEyfYKYHi1QYCdCWzGhg5AchGTv yD3LqUhyRzhEZG6jhZwldmo9091S0+OtktzXp8Mm9jwTG2UwLxZFL+JD11izlROtwtv0 XAGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698279371; x=1698884171; 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=aIOAJWBVtCMbS0c4KC6cXcYTMMaXIG2tg2FWJOn2ue8=; b=QClyZ5FOCUA9aSS/8H1xaJezTqvFcSkYZVK2CpnleBNICKdhAl5JEmDH+Uot7YbXI5 luC2awymdztKGceE5SUlwJhaRh9fn1YyalQ3aHsYnrTIbkvkZerl/hXvhcTxKIkwqRjn 0VdRX2tSHXF99NzuKrdqgrpO4dNlVBsk246s9OGDXvjXHRKrJ8Io1TriySwLqefKT0w3 ZON/+uGaIvjsaQwgT3U45bdc2KC26bWYSCsL/JyV72OZYc02FHOIfwiXQyNbbmyWagzi YbCgTWPA2m9334z/dwINHN4ZxABcsbebWDw9BDfZ7ZHNs74PTBE4gOx3mccHXpcBgdA5 SirA== X-Gm-Message-State: AOJu0YxP7AqVoVxHlzdZjOwwlM+yBr8hU0uqRdmeNAMa4iMZVgUYxqlb Sdk5wIwul70csAwZr9//hecLVb5gjnT8o3QcG2o= X-Received: by 2002:a17:902:db12:b0:1c2:218c:3754 with SMTP id m18-20020a170902db1200b001c2218c3754mr20237530plx.53.1698279370892; Wed, 25 Oct 2023 17:16:10 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id ij23-20020a170902ab5700b001c582de968dsm10038433plb.72.2023.10.25.17.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 17:16:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PULL 17/94] target/sparc: Merge gen_fcond with only caller Date: Wed, 25 Oct 2023 17:14:12 -0700 Message-Id: <20231026001542.1141412-34-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231026001542.1141412-1-richard.henderson@linaro.org> References: <20231026001542.1141412-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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 Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 2664db302d..b8d51d6d64 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -1309,19 +1309,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 */ @@ -2992,6 +2979,7 @@ TRANS(BPcc, 64, do_bpcc, a) static bool do_fbpfcc(DisasContext *dc, arg_bcc *a) { target_long target = address_mask_i(dc, dc->pc + a->i * 4); + DisasCompare cmp; if (gen_trap_ifnofpu(dc)) { return true; @@ -3003,7 +2991,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); } }