From patchwork Fri Mar 29 22:31:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 784088 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp3428993wrt; Fri, 29 Mar 2024 15:32:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX50Vv2VHR3zME58ao/e+69MAomnbd+ePAxBba1/TbbajGHFjfFY6MJnMd5a2NJzKLvjL9hGbFkbX6+IQu2WElV X-Google-Smtp-Source: AGHT+IFEsucwKQ/YXq+D12XrZsU9LMSokC1QVQnsq1fYreqe0uEk0r+lZY2MZJszvy2wTnlAUiok X-Received: by 2002:a05:620a:2a13:b0:78a:517d:a84a with SMTP id o19-20020a05620a2a1300b0078a517da84amr5257488qkp.44.1711751547572; Fri, 29 Mar 2024 15:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711751547; cv=none; d=google.com; s=arc-20160816; b=GSy12sN9ysUmS0vLzHIkRfTsOsOiD098fWfsmhCnF1B7zqQ0L+6FvHifWWMQjriwfr 4O7259IkclMk/sfkNMecdkpGRtJwpLuNS0XwT0Y4zmnWiXMlMQBtsnOd9jZfzLQ1gx2z ZaeYnVfE2ths3WMTJnOoYUhEEYLiteyhE2HeBZMiR70evCdIV0XrZ3wk9z837SQdEmGO WzaYfKFau0VEz4Gh5se5eU/A8qrBHiQcPYt+ZmJq3La3uUTPTJLe9jQgvLsmeZKD5icp f6zNVrtRcHIbJLfEpHjNp66/Rp5QQMdKlkx9fHH9MfuAukB4T+i6WwN5zJ0hq50cIxT6 giWQ== 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=gQ+m60fTouB/z1dl63SfVFQPMFAMSTWz5wWftzZofAQ=; fh=wDljmxUHXfz9MGj2//jPHYRc53BMWF157v8rVKELrf4=; b=jccwsTCBgNtyoU5TDls1kwL0cQfQcQ5juBYo6fVGXUV3X/3NUqxP/yt2o8Klj34K84 N2yO+h9IM0gPQ/VzZwOtvRM5VhMC+seQ3QKbkGYQk0iFq/9eHdyJQcHBwA568zrIG9u3 7Uf7E3l8xirBS/g4JSPeHve2/b0dlJxanGPRY+D7XB3UPiSospIREBBHHsc6mLY+5Oje JbAAGxjNt68rB3opDi2d43GEaJEs4wiHpNjMQkxTQ3t87gQ63mr+OBmqrnNL7d5vSEVM gf3CKwc0sQrnRwk0qnqPKoxBNdnoJDBQ9Wzg3ZM8WrG3p5fewXC17vNpUkm6SrhwVWrK gjmg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jA7plFwN; 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 h9-20020a05620a400900b0078a47c3a3bdsi5124223qko.620.2024.03.29.15.32.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Mar 2024 15:32:27 -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=jA7plFwN; 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 1rqKlK-0002cl-MU; Fri, 29 Mar 2024 18:31:51 -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 1rqKl5-0002Yh-Ta for qemu-devel@nongnu.org; Fri, 29 Mar 2024 18:31:36 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rqKl3-0003XG-T2 for qemu-devel@nongnu.org; Fri, 29 Mar 2024 18:31:35 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1e0fa980d55so20855055ad.3 for ; Fri, 29 Mar 2024 15:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711751492; x=1712356292; 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=gQ+m60fTouB/z1dl63SfVFQPMFAMSTWz5wWftzZofAQ=; b=jA7plFwNEpab3qwlR02+D9TLzBussiynHPlVK9xBHhTNcX2Ylfs6G6d3wQRM90jDQC jiTGarw09WOAeJvKBc4+WTG8ft8hh8eC/gs/1ifRyoCSJ/YT0Ss8TMwPSxuBHV8z3P0U 63p6FPz6MwkMlbMBe3PiVXyu1Ic+rzAyc6ARa6FrN/58YonjwenV1t69h4GhG/j1TAgS jWFzUQdEhWbMvEtzCWPeUjb1h/m8xqdo81e/Uooalw2RZf5qc+k3B6hZ8UO50u6rsFZ/ L+HBbLlN7PGEE1U7vQYsRU/RwiVwKJ+As5qTAlN8+puC40UroiAl6FTVmfltpnLe6Rnb iJTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711751492; x=1712356292; 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=gQ+m60fTouB/z1dl63SfVFQPMFAMSTWz5wWftzZofAQ=; b=n/lsxHFXzHpzMO1gjD8E6W7s+Ns+qQfe/Xpba3n3sYqzHfYBvjIPMPB9SLWfqf/o1T +q3ofsOhkSZLyJgYkSvTCrlnxIWvF90F0YQDJIIOGBQuFpmmGl9U6jd0S1N9I7Y2yfGU kBGWuDpYKJp7jccoXWnUz6krYuQkzE2GrycwL4Tzt+Pvc+yN3zXT68Wj7fWP2a77YlPV RtmZOzPiHrVH1yFxUNbI6Ub8HPJkHgrYyYEUBMQwcAWc2+m5MXu8hzVzprcYJnmu4o9H Z4cx5VGTX5y/0hG1n4D+rT3C9EudmoLujiKaI7pC+YsMoVDkDA8jG/LMSvpxPzZZeDD/ fXkw== X-Gm-Message-State: AOJu0YwqkRifa7FZ5geq4p6NGgeir7QG6uwhvU+ACZ7Nmgfl4MJwXV+J 2y4S73HKCsAruQd/jBhYIJq3rIUZK1YqyNWKXXxtuO5pbJb5lPWOr2rtXmXb+rid9Ju8Z1BJV01 H X-Received: by 2002:a17:902:e54d:b0:1dd:c288:899f with SMTP id n13-20020a170902e54d00b001ddc288899fmr4360935plf.18.1711751492617; Fri, 29 Mar 2024 15:31:32 -0700 (PDT) Received: from stoup.. (098-147-007-212.res.spectrum.com. [98.147.7.212]) by smtp.gmail.com with ESMTPSA id f8-20020a170902684800b001e09b636cafsm4000955pln.287.2024.03.29.15.31.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 15:31:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Helge Deller Subject: [PULL 13/18] target/hppa: Replace c with uv in do_cond Date: Fri, 29 Mar 2024 12:31:06 -1000 Message-Id: <20240329223111.1735826-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240329223111.1735826-1-richard.henderson@linaro.org> References: <20240329223111.1735826-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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 Prepare for proper indication of shladd unsigned overflow. The UV indicator will be zero/not-zero instead of a single bit. Tested-by: Helge Deller Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index a70d644c0b..9d31ef5764 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -707,7 +707,7 @@ static bool cond_need_cb(int c) */ static DisasCond do_cond(DisasContext *ctx, unsigned cf, bool d, - TCGv_i64 res, TCGv_i64 cb_msb, TCGv_i64 sv) + TCGv_i64 res, TCGv_i64 uv, TCGv_i64 sv) { DisasCond cond; TCGv_i64 tmp; @@ -754,14 +754,12 @@ static DisasCond do_cond(DisasContext *ctx, unsigned cf, bool d, } cond = cond_make_0_tmp(TCG_COND_EQ, tmp); break; - case 4: /* NUV / UV (!C / C) */ - /* Only bit 0 of cb_msb is ever set. */ - cond = cond_make_0(TCG_COND_EQ, cb_msb); + case 4: /* NUV / UV (!UV / UV) */ + cond = cond_make_0(TCG_COND_EQ, uv); break; - case 5: /* ZNV / VNZ (!C | Z / C & !Z) */ + case 5: /* ZNV / VNZ (!UV | Z / UV & !Z) */ tmp = tcg_temp_new_i64(); - tcg_gen_neg_i64(tmp, cb_msb); - tcg_gen_and_i64(tmp, tmp, res); + tcg_gen_movcond_i64(TCG_COND_EQ, tmp, uv, ctx->zero, ctx->zero, res); if (!d) { tcg_gen_ext32u_i64(tmp, tmp); }