From patchwork Sat Mar 23 17:29:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 782041 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp457338wrt; Sat, 23 Mar 2024 10:31:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUIIrYygQhXzay7Ej8mrxOFzDG01/bQIPwWXqAI8Cw5IQcRLVglMG5JhmPXd85daIkT6HeYVd3D01BMVDQTVvEy X-Google-Smtp-Source: AGHT+IEuh+zSVxmh4QTbf/Rn9pecCEtp1gJuZD/uoimJ/kCQPZapMddvZvFS4FdeDoiwcqKwN+9D X-Received: by 2002:ac8:7d49:0:b0:431:48c1:9cfb with SMTP id h9-20020ac87d49000000b0043148c19cfbmr1112433qtb.12.1711215062012; Sat, 23 Mar 2024 10:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711215062; cv=none; d=google.com; s=arc-20160816; b=ehZrBH8PyXGTAqbGNGpTIyKXLW6o5/00CMnzKTD9BofX7kmtf1P4i54ZibydGhKukt sQkP/AnYujwgwskQ23ti4iPuZAx/LSrQam6FVIU4RqbkMhJPOIm5+3NpHseKzIT3eWA+ SNYtprQmGtt4WWLwvk16vV7nmBETw0kHhVdTPofxFxwkUU9JfzDCtS/UlWrZmZrrN5Lv QPlIRingwuOXjWCNYGzhhSI5nA/H40KulYry3VuwOTsm40PQ/K2xWVnlrs9/946B/LKa rRQRkIWwWnXEdZjVvxyscJGpQ5rB1CYgIG9cLcLAxaAXI9XA6pOW8EDHKl08nZNGKj9t jjxQ== 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=kQVqrnpEFNAMTGSDkWy/XEPY0f16YIjRf/pXZgn4ChY=; fh=odZjvFrgMDmfTa4Yn/jVKLPsclS8EzRuPmYcS/SNwLw=; b=hBcLQZMd4LpHcjE/AtTayGYjfS/KdzSMwDwAmPYSMI7HcTjxyIQJ6zHME93lIYEKf5 lSWwphZbFNCMR9knp9I3tF4pO5cGspnVWyPviTQhEfYcLd/dw1mi20D0zdAJJ/o1N+iG 0iKMAZxCII2+gNpVQaTvIjNY0x7orgjG/TgwHXOltZEgJS0+APbdhKEgmpMGiYwr4eCi irFU4RgPEXE7/EnZ9iFC/zoaNcY6o8bjzPL94b1QviTvePI5Nwy4tG0XcTaIN1Rbtr59 jihLUL5nm7dv8U+xsf15MgmH7DrMH63xjaVWPYmOQQvjWQM3cQoGldaPsv2Sfp4CF4XY lneA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I2+ldY4E; 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 t21-20020a05622a149500b004313f42fcc8si1696453qtx.491.2024.03.23.10.31.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Mar 2024 10:31:01 -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=I2+ldY4E; 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 1ro5C0-0002jF-4M; Sat, 23 Mar 2024 13:30:04 -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 1ro5By-0002iq-Mu for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:02 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ro5Bx-0005sp-4B for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:02 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1dca3951ad9so20794315ad.3 for ; Sat, 23 Mar 2024 10:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711215000; x=1711819800; 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=kQVqrnpEFNAMTGSDkWy/XEPY0f16YIjRf/pXZgn4ChY=; b=I2+ldY4Eje/9tSyLa30imHZtyycUsA5MqKMLjm3KPcmAf8uLSbvaLGAY/rORvQu7lY +0CkmvJsZW3W596vKkwWGFtS0o9ozI5HKw+BrNt5xG4k8Jem1mc94EZMJJ93PqLUWo6w 6a+aopXovOjjiVcUVn2ltd6VDWSUHPlfQIYBVdySY1jfavcMii1AkAXiqRTuDjh8SnXX JqTBciJHiI1tX+rlWTpFmLIPga43g9Epolg7e90lZmN2wi2Us3Fv4AgQIu19I8uRWR7o JwakUK2nJu1s40BKdCFGNHua1BP9ist6oSCbGCIDcI26jh0fKocn0f/b6GKLcgX9y9dh fldQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711215000; x=1711819800; 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=kQVqrnpEFNAMTGSDkWy/XEPY0f16YIjRf/pXZgn4ChY=; b=vkuwFw35prCAcBD88DxuybU/hVroXnZVACcYZMc8qJAuWKdBlr1EZ472CZiU5OJcK5 wpXoeqTAvdObqgDU+sFvR47hjJ3UdzcS7WHPtSl1ebopKLldicojYrAHthKupZMtby1e 6trwzjINPm2mM1lgiNTGTBTl8iw4nfCku0qheyt3HPwTatBVI1o00Ep9znFpmqj27V9X QsSDgEzFHLG94u/d5y9rjc603vdPYEbSrtJzqoigzpGbOn84G/u/GKWbfFodvTuHSWBw sZG08KjtXd4fQmvQDWnYNNOf0uVJ/Hb7sFINReu+++Dm12ch6/jDVgrpS1bP8PolRpN7 VrlQ== X-Gm-Message-State: AOJu0YyZbB5mJppGY6LuS373Qnus7PLagJGCqAs2Ql7ApnYVHItocup1 DuR5r0y3w/0TijaTOoG6cABoKANNR7NhnrNWe0dEc/fAIwm+T82scXIigTVaPcmRb4dV6iZIPLF Y X-Received: by 2002:a17:903:247:b0:1dc:9118:515a with SMTP id j7-20020a170903024700b001dc9118515amr3897128plh.37.1711214999773; Sat, 23 Mar 2024 10:29:59 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id n15-20020a170902d2cf00b001dcfaab3457sm1811758plc.104.2024.03.23.10.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 10:29:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: svens@stackframe.org, deller@gmx.de Subject: [PATCH v2 1/7] target/hppa: Fix BE,L set of sr0 Date: Sat, 23 Mar 2024 07:29:48 -1000 Message-Id: <20240323172954.1041480-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240323172954.1041480-1-richard.henderson@linaro.org> References: <20240323172954.1041480-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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 The return address comes from IA*Q_Next, and IASQ_Next is always equal to IASQ_Back, not IASQ_Front. Signed-off-by: Richard Henderson Tested-by: Helge Deller --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 19594f917e..1766a63001 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3817,7 +3817,7 @@ static bool trans_be(DisasContext *ctx, arg_be *a) load_spr(ctx, new_spc, a->sp); if (a->l) { copy_iaoq_entry(ctx, cpu_gr[31], ctx->iaoq_n, ctx->iaoq_n_var); - tcg_gen_mov_i64(cpu_sr[0], cpu_iasq_f); + tcg_gen_mov_i64(cpu_sr[0], cpu_iasq_b); } if (a->n && use_nullify_skip(ctx)) { copy_iaoq_entry(ctx, cpu_iaoq_f, -1, tmp); From patchwork Sat Mar 23 17:29:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 782043 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp457367wrt; Sat, 23 Mar 2024 10:31:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVGEzRaVwuUX2ScZ94mFtjEizQU4BM7Q4yenrbAHXCdzlgJCiCoaBbJztxKl9lHWzTcei86aESTRgJgbbOYxJVA X-Google-Smtp-Source: AGHT+IEny4nPkJ4q7WRYPjVMObIeHxfrOGl2fsigLzsJ+rs6CeY0M0hiS9syNFsPcXHgtZRxDAgX X-Received: by 2002:a05:6214:21ab:b0:696:4212:67b6 with SMTP id t11-20020a05621421ab00b00696421267b6mr2826966qvc.1.1711215068074; Sat, 23 Mar 2024 10:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711215068; cv=none; d=google.com; s=arc-20160816; b=vhTFmLrXOdYpFjqsFOk8m1yv1YSzdwvh+pVryQt0w4a93zmW90xNpvhtEPGisQCKlG asK0R/+FDCG2SJX2xmttnJpPbuZFXKy42zqmHu56ixrK6ZEH9KY0+umCq4sE7U2sNlTT 6nT7kg6xnlJ8LrYlSRvggOYM20+D7WFRDsOdkAgypQPKkersoZXQYh2kS0rJJYQeTIx/ d4rI0UzCqelcjYU/dy70cyIzDcUZU4VsAhB5eb54HvsDalK0ss5gJIncy7sJHtaCBrUJ Wz6iZq3QpvudlANQK3qcYswEq4ik8c54KCqPx16tnKGK97mnjdLELGxJ28cLhieiBPIT GH9w== 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=zUaBJKSO6H1bbGryp1PQTqH1TE2lEnHyVoVrY4Z6LJ4=; fh=7Gs45hc9XAfzefVGoYmY8YrnIG3SFDSvxBiws3MNFxo=; b=OCe82yXGwqHnAiUohS8VHe25OyecMaRyV2VkOujvHdYw+ipDQc25Amxn8sork96QXB basr6Zovvl/wUgZrJJn8eLA5XRMCFcGPi7uYVHW6A7LTquOMqvvcS1QKQVvtgpKT6JeK 3wgYEdJiP1B2hrhP20gTAPaAfaOFNlKf2HnISYjOelCtUPI5wgLkpC7pSS+aQ4O2376w 7G+dZSMwPypRfr8QH22120N+eUkMyYAgxUz4TLUQl5dYg2iV8IttQR66hbziXqo3hCr7 9iMnfKnOAUn91Z7DpPFV1uzNDNsVGKV/g1XrYKmnUTaGvXUTcSyQmkLEjr8l6Agy0dNr +tCQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="EKUQBHz/"; 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 e1-20020a0562140d8100b0069641c4c2desi4499518qve.602.2024.03.23.10.31.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Mar 2024 10:31:08 -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="EKUQBHz/"; 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 1ro5C1-0002jd-U0; Sat, 23 Mar 2024 13:30:05 -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 1ro5C0-0002jU-D1 for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:04 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ro5By-0005tg-O5 for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:04 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1e036b76725so23062375ad.1 for ; Sat, 23 Mar 2024 10:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711215001; x=1711819801; 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=zUaBJKSO6H1bbGryp1PQTqH1TE2lEnHyVoVrY4Z6LJ4=; b=EKUQBHz/gWiXootyOgWrvCZyndOG6d6PZhWUr9CRXifHOo4swQlQZJCynMp3US5bAi QQY137/SB4CISSeVML3f/KaqadQaguc0o4MoXmcderDA6GSp0RpKj5GV3EoQ/oksyHzY CoWurv8teL8wg683+8LX2ChcONRB8Jcq6/TqB+FkqjMIRN1UY9D/NwQKMt2KKbQU/BuQ 8qofkMktOPLbm18UL+DYHZiOu9cczjpz3JpxQiz7W28HIndk/NJn6qEG2BSsECcojcee znX2rGAduqgpnE/ncJq0g1Aixo3sE88CYZklDlwLHj8oeFrGlqDj22AdZu+2dhL0DmxY aI/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711215001; x=1711819801; 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=zUaBJKSO6H1bbGryp1PQTqH1TE2lEnHyVoVrY4Z6LJ4=; b=pgAp4sf6JC1aK5rdiCJNzNJAMZdezGBm+R+DCxx+rYj7zEdjlo2mIAn+42MucLkybZ OA9Q8lqgLUVeN+817kAhCPeBOC/lWeTXyTIWF+4TezckLyaqluo6TFPVteKdaTPbEc6g K5Gw7avEpHCv5Qv0NGz+SOxo6majCkMDgIStrrrKBIFqVooUVbsCxQ8Azg/i26H5drZR L4PSUGBQcTOYwYM4iJR0qQNjoUw2eh98/vRmWMYcDUWBA6ZUG1HBlo0vWEW653S6WgPN 9vD2DQK+MTjOhRpbb6xFwT6ytFgfZ/BPOFHARdZoXG9ezPdHGtPj/KDJ0Grv/VT9gF0d Rqyw== X-Gm-Message-State: AOJu0YyV9TIrFd8pWjgVU9CJK9DBL8XLRqpQZgk7Gw6z5MLXaLKjNnb5 Cr8xIVsapMgLO6RynbrQZoWPIB5FHMAkrzCJxzSaFMjW0TPZAE8RwgdT2ayTiW8aElRm7N3L5vr X X-Received: by 2002:a17:902:c412:b0:1e0:a7c0:1806 with SMTP id k18-20020a170902c41200b001e0a7c01806mr1948749plk.25.1711215001297; Sat, 23 Mar 2024 10:30:01 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id n15-20020a170902d2cf00b001dcfaab3457sm1811758plc.104.2024.03.23.10.29.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 10:30:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: svens@stackframe.org, deller@gmx.de, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH v2 2/7] target/hppa: Fix B,GATE for wide mode Date: Sat, 23 Mar 2024 07:29:49 -1000 Message-Id: <20240323172954.1041480-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240323172954.1041480-1-richard.henderson@linaro.org> References: <20240323172954.1041480-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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 Do not clobber the high bits of the address by using a 32-bit deposit. Reviewed-by: Helge Deller Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 1766a63001..f875d76a23 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3880,7 +3880,7 @@ static bool trans_b_gate(DisasContext *ctx, arg_b_gate *a) } /* No change for non-gateway pages or for priv decrease. */ if (type >= 4 && type - 4 < ctx->privilege) { - dest = deposit32(dest, 0, 2, type - 4); + dest = deposit64(dest, 0, 2, type - 4); } } else { dest &= -4; /* priv = 0 */ From patchwork Sat Mar 23 17:29:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 782044 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp457525wrt; Sat, 23 Mar 2024 10:31:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX1bnb61maE/GaReujQ5ATRXfeuPtEsEK7VCPGmEfVwoTY4XOuYTVThFuVj07ap06/0tIdktF6xpqndlz/wtcVu X-Google-Smtp-Source: AGHT+IFTPzapUTaqe2X8NyO+kSVGXi7sZFnMkox8tIXP6Dxl7V2TxXZ9qC1epbU15M5taQkLm6uM X-Received: by 2002:a05:6808:13cf:b0:3c3:9fbf:545e with SMTP id d15-20020a05680813cf00b003c39fbf545emr3525346oiw.34.1711215093955; Sat, 23 Mar 2024 10:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711215093; cv=none; d=google.com; s=arc-20160816; b=mc49xR7qRFvuM/T7KLGpLwujl8NevKHHzXnTthLboRoDPxCGK5XiulNBrAa4vRpK5o CO/1JkKe2sVfVbK3+qcx2LM6UpG2yCJ1yFEb0xfXEO4DpImoGq7dWXTn6F+rF6r9f45/ SqqGcOTINC2cjZgGqpoziiArF/rwFwix37lF3YRZ4IA8rvDrfganS0h3ilobWSF37ChY mJCKMLbL1mtnlQy5kngvte64vOZ7GU5VnxvmInoWkPRzWmm/ONLxZYJz836TpM6mINB+ 5cEfkYoAq+ufXJFQgoWRhSVarktNgJoJn5tyq0bN0PaYfb18KomAV6ejalOQ5OgrEzoZ QYpw== 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=S0QfsALuaN0+wWbot0bFHlDdwooZi0EKVcDM5oK6qSA=; fh=odZjvFrgMDmfTa4Yn/jVKLPsclS8EzRuPmYcS/SNwLw=; b=c8nDr5GSrxl7BmdsRW4OQsFJ0u4t+O34jo1nuVEcj55HbaBn2Mvm+xADKJ7nP99uRv Jz5Po4GctTfzNahLg5etHdkr6tlKAvaE5xCfwLU6G0wk8x62kjhDOvLuqrZ2UwMdz8vV f3YMzr47MaCV5xWoWAlUlpoXvOHT0rJjGANgfwTw4TS6jh8sn3GPhGtDJI9GUZuuR7WC xBA0gEVVI2BzOSwqII81TWoJ1nCdmYjxZpqA9miE6VqSv26Ls6/alWW/lpuEePQnQAkx 9kMFTMBmW74SJ9SPD1dy0D9Cn+C72ygUrChBIqi0IsN0eefE+oWPnX+4urOE0hEUWXCA AeQw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ya7exnbK; 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 oq40-20020a05620a612800b0078a41572862si1979563qkn.8.2024.03.23.10.31.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Mar 2024 10:31:33 -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=ya7exnbK; 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 1ro5C3-0002k6-FY; Sat, 23 Mar 2024 13:30:07 -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 1ro5C2-0002jj-9m for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:06 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ro5C0-0005wl-4e for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:05 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1e0000cdf99so23295295ad.0 for ; Sat, 23 Mar 2024 10:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711215003; x=1711819803; 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=S0QfsALuaN0+wWbot0bFHlDdwooZi0EKVcDM5oK6qSA=; b=ya7exnbKQSbmOU2Up43gR7iH6jvNIB6sMR/OlwQHuaMpj0vGdDOO3ROeg4VYflclTG zGpK7ihdCEVCUm5PCHYa4tyDxNPcE5CaCeXoO3Fy7xD+3yHb9Kgm4EWj/TGAuUtWg/7M CA6EooZR3d6LAZnowT4jxQDEfjzLju6zbTe33skMXa/tOgXX3YklBjCn7jPejTAoP6Yd 7T/Zr0nF7k8Rr8uu7d/obk2K5Tl+CHvNFMrEi6OeCv/yPHjZjYgma6Y1E7VdHQQwABw9 tn5ACtVP+gBT8eWuJgZsjE9+QOGFTil7No/ZbdjkDUiW1CJDvogpdb8/a5jG2huzDsHv bXNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711215003; x=1711819803; 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=S0QfsALuaN0+wWbot0bFHlDdwooZi0EKVcDM5oK6qSA=; b=WRZ/PE3i7a11YUqJSkz+CPO/WUbZEsEKEpK+fftt8uU2Uxk09nCLSu2BxDdV59uKWy GuJ/Kh6QEZjPEIKO//G6tqZSKeMiKYKEyPGyCzsJniuHvYrPEdpvZro0+EbtLBiQy4gm 5DWmP0oWiOWSui7iOiesA3GB7VvYFt+o2Fqyfa+08zYctDgv0AAKBOfvGcyxnRFHSS+A UvrOtE45bSjmH6AS26hhvl5RKTNYxdeliePCz0JRKNVo4f2jSZNa8P+2mcYT+NzIeF6l lEDmtl8KQi/OohyS6QSLm2XwHTCMGiGHmhmbWPafCa94opqITzOiEY4oc2htshGA6qxR Fk5w== X-Gm-Message-State: AOJu0YyinrSTgz91fj2bqutwNFE6euzBLkMuT331PpvXCjwICZKm4dW6 6l1RFIjeE6hXLBhoorsiudYMq3vuWKJQu4CPico3NtL3gT2tK0Dm/UV7s6unKe+EU9Nxw/HRqJL u X-Received: by 2002:a17:902:e887:b0:1e0:aa4d:747f with SMTP id w7-20020a170902e88700b001e0aa4d747fmr1583147plg.6.1711215002766; Sat, 23 Mar 2024 10:30:02 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id n15-20020a170902d2cf00b001dcfaab3457sm1811758plc.104.2024.03.23.10.30.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 10:30:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: svens@stackframe.org, deller@gmx.de Subject: [PATCH v2 3/7] target/hppa: Handle unit conditions for wide mode Date: Sat, 23 Mar 2024 07:29:50 -1000 Message-Id: <20240323172954.1041480-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240323172954.1041480-1-richard.henderson@linaro.org> References: <20240323172954.1041480-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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 From: Sven Schnelle Wide mode provides two more conditions, add them. Fixes: 59963d8fdf42 ("target/hppa: Pass d to do_unit_cond") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Message-Id: <20240321184228.611897-1-svens@stackframe.org> Signed-off-by: Richard Henderson --- target/hppa/translate.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index f875d76a23..2cb91956da 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -967,11 +967,22 @@ static DisasCond do_unit_cond(unsigned cf, bool d, TCGv_i64 res, switch (cf >> 1) { case 0: /* never / TR */ - case 1: /* undefined */ - case 5: /* undefined */ cond = cond_make_f(); break; + case 1: /* SBW / NBW */ + if (d) { + tmp = tcg_temp_new_i64(); + tcg_gen_subi_i64(tmp, res, d_repl * 0x00000001u); + tcg_gen_andc_i64(tmp, tmp, res); + tcg_gen_andi_i64(tmp, tmp, d_repl * 0x80000000u); + cond = cond_make_0(TCG_COND_NE, tmp); + } else { + /* undefined */ + cond = cond_make_f(); + } + break; + case 2: /* SBZ / NBZ */ /* See hasless(v,1) from * https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord @@ -996,6 +1007,16 @@ static DisasCond do_unit_cond(unsigned cf, bool d, TCGv_i64 res, cond = cond_make_0(TCG_COND_NE, cb); break; + case 5: /* SWC / NWC */ + if (d) { + tcg_gen_andi_i64(cb, cb, d_repl * 0x80000000u); + cond = cond_make_0(TCG_COND_NE, cb); + } else { + /* undefined */ + cond = cond_make_f(); + } + break; + case 6: /* SBC / NBC */ tcg_gen_andi_i64(cb, cb, d_repl * 0x80808080u); cond = cond_make_0(TCG_COND_NE, cb); From patchwork Sat Mar 23 17:29:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 782047 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp457700wrt; Sat, 23 Mar 2024 10:32:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX+B49JA+QvF3yU0Ultbcai1cEEr5yifQzCG/Qo9oTHv2UJmSgytZP/6rkeYouZUMxUCQU6Bd0IwCOYUpP8MndZ X-Google-Smtp-Source: AGHT+IHfm309b9N79b0YMfDH6vtz8ZnKlfaxDYwk2r+Tm4ryW9L9VW/7R2/+AU3uwLA6pRkReR4l X-Received: by 2002:a05:6808:2742:b0:3c3:b64d:c0d with SMTP id eh2-20020a056808274200b003c3b64d0c0dmr2803219oib.48.1711215124175; Sat, 23 Mar 2024 10:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711215124; cv=none; d=google.com; s=arc-20160816; b=L99IgJmv79GvHTVzETJOXuYtAVhwCoOXy34HtJ3oiH8zv4Ow676MIWyBUVCrulO+np wVNOUjgYbWR0yZBPgJzKG4BAE3TWIeD6+rm7ZNMYHXb92mUzNAsFy/9ZcSKBhdWVBD+b UD5LTIz/HCyzF33TjrFsFcFWmm520Mm1iKmRWR4HZMUhCxpHk4AwhxRQbop7kzHpKVyq FjkYy7I5nzbz7YaHVDM771Zw2dSIpsImdON83Ba+RifMljnIzef/9XxHydueypaxEyAt VH0dW6kyIK6WVywS4xbblVNtGnfHlB9rJsUnAq92qpIQz5TC/IrULlSyI000pGbHwekq J4qg== 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=iCXMa8NXK4SslxAJzO8oJ4YsLhlZ/FlXinB3WAZag7c=; fh=odZjvFrgMDmfTa4Yn/jVKLPsclS8EzRuPmYcS/SNwLw=; b=Y/GOyQxmRBEVdNOWbCQuDT6xWnoHWnyaZy8236h9+BDX89iJPqthsGOU7mrX1KRqKW 5ZW4lgpsQw4DowlYuEx0Rs1q0fHIGgyHD65YOJtwPRAAHqq01eVfp/q1WXbtZjD9Gw2h w/9idTeoePIcGKR6Mtr1swpedAT0r2Cxm0BE01tlYxbow9nxlkbwq+7QazdHJDkxx6zV 1AdSH7V8xd46+jsYkU35jcTBr8q490TBVv+Eryl/GGzq1NGnt1aTx1QMafj5DCn5cGpC XCHk/UR4BhE8wLlh5N9q29GzuSyt07m43klFbZsKOnNKdo4VJJvqoMyMvoLiZAx8BGT9 uiJA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UnDychnU; 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 bz27-20020a05622a1e9b00b004313bd83c6csi2120514qtb.480.2024.03.23.10.32.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Mar 2024 10:32:04 -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=UnDychnU; 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 1ro5C6-0002kr-3G; Sat, 23 Mar 2024 13:30:10 -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 1ro5C3-0002k7-Fd for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:07 -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 1ro5C1-00065S-OI for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:07 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1dffa5e3f2dso19830045ad.2 for ; Sat, 23 Mar 2024 10:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711215004; x=1711819804; 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=iCXMa8NXK4SslxAJzO8oJ4YsLhlZ/FlXinB3WAZag7c=; b=UnDychnUrUw8jo2e7a5xYAVECR2PLxrLWY4Oi3XRjrnAqrI9OoL8iU+G1XcUz6fzAD uJg/2WcxZOvWoj96oLcLwyY4f5PBQjUKfAMZp5q/ne5FmZwlHPoOHi0lRwt75X9xdshi pf+he90x5t2elKn/8we1HQXE4ukPu6aPOU7VsLQHmBJBSWxRFZ5BWqAmMW+kTF2OYHaY YvHyIxovU1p5JsXjxwt/uedB3Voc84gMdZEvds2C0I2BFzAqe9hTDX5F8C2mw6SzTDcx NsyS1ksBkjjAZRKemXbLhom7oc071bePz87MNw/wLjBvEyzB5XtXxqFbUr+XX4gK8Mhg Dqxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711215004; x=1711819804; 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=iCXMa8NXK4SslxAJzO8oJ4YsLhlZ/FlXinB3WAZag7c=; b=GnI4gxf4VLCiXqdZdjBlKZ7skFVlMhTR0ckV+cnRhSzrpQPbULelKyNkO8BnjjJ8i1 rMJsK8t0ZGbEx/aaU5ubRSJPrKKTpiurzM+lpRHRQ7gMsjnJ2Ux040ZIo7Ox6WwNrxBJ 7QYTySh0XlKxqhMPmnpE8+TJQgxcU7/r2EPGB262a5xD8qzenf8EQY7O3mI2tIIpwgv/ hVzGut4c3FDQISfEKZAhgnpJKPWshM6U0advCQH4SyOJ1QKossVhh3kQ+iAcxwANOHI0 ppLquP3yu3Vz9D5TN8hzA4j6xay8WEOckAHP9qLwI0xNfZBwz7ptRcf3BXx8WyPKShij yWog== X-Gm-Message-State: AOJu0Yxe8vQgDljjEKdKLxqhrHQRlCIGcnwuyZE9tYsDxzIfcDfiIVO6 hwXo2axWraBPd0Tz8/du89/4mZjRnn4DFa14r+raJLB3UKH17vGhEvkpAyBgw8pmsq4giwDtQTH V X-Received: by 2002:a17:902:bb8b:b0:1de:ebb7:d1ed with SMTP id m11-20020a170902bb8b00b001deebb7d1edmr2529598pls.45.1711215004144; Sat, 23 Mar 2024 10:30:04 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id n15-20020a170902d2cf00b001dcfaab3457sm1811758plc.104.2024.03.23.10.30.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 10:30:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: svens@stackframe.org, deller@gmx.de Subject: [PATCH v2 4/7] target/hppa: Fix ADD/SUB trap on overflow for narrow mode Date: Sat, 23 Mar 2024 07:29:51 -1000 Message-Id: <20240323172954.1041480-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240323172954.1041480-1-richard.henderson@linaro.org> References: <20240323172954.1041480-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 From: Sven Schnelle Fixes: c53e401ed9ff ("target/hppa: Remove TARGET_REGISTER_BITS") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Message-Id: <20240321184228.611897-2-svens@stackframe.org> Signed-off-by: Richard Henderson --- target/hppa/translate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 2cb91956da..ceb739c54a 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -1126,6 +1126,9 @@ static void do_add(DisasContext *ctx, unsigned rt, TCGv_i64 in1, if (is_tsv || cond_need_sv(c)) { sv = do_add_sv(ctx, dest, in1, in2); if (is_tsv) { + if (!d) { + tcg_gen_ext32s_i64(sv, sv); + } /* ??? Need to include overflow from shift. */ gen_helper_tsv(tcg_env, sv); } @@ -1217,6 +1220,9 @@ static void do_sub(DisasContext *ctx, unsigned rt, TCGv_i64 in1, if (is_tsv || cond_need_sv(c)) { sv = do_sub_sv(ctx, dest, in1, in2); if (is_tsv) { + if (!d) { + tcg_gen_ext32s_i64(sv, sv); + } gen_helper_tsv(tcg_env, sv); } } From patchwork Sat Mar 23 17:29:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 782048 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp457711wrt; Sat, 23 Mar 2024 10:32:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX+bb4PqXpJvc5a85lOonVVFMSIHAWwypym6xHAGGTPxtxXsHoCx2HKtGgE2tZDcbwgfK44T4cokcYKrr+80JAE X-Google-Smtp-Source: AGHT+IEpz9C/zTCp16espJOQN3PzOuWfq1fjOze0YLxxerkKK3cjSJla/oWEYvWW6bCDeA3eHIEu X-Received: by 2002:a05:6214:2249:b0:690:f1e3:ca7c with SMTP id c9-20020a056214224900b00690f1e3ca7cmr3077867qvc.16.1711215126367; Sat, 23 Mar 2024 10:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711215126; cv=none; d=google.com; s=arc-20160816; b=sPG/TY7amjAJ9yef7cP+rQfWsDBUehN7EYyx/qhautEggd5SngapZeSRRMszhCAUkK aJKRFkPTDQzcs+46Flx2zZlTOU62GbUGQ94+7CrdkPRUEeGJR2qloDywWPKOHN9+lzib wpg9l+IxsfQ/WOhibMJdq10ShXSoYFxJ3DngJErWR7czQLl/1tn2/uc4gWDM15t+iN1A H7GXNtfZihMv7sjzVPi/s9aC8L/dm7I46cWxBi1MvI4koH8+OIkoJWJH//NQ9e8Tra17 hv1hHrqfQbV9QRNwN1LNbihEiR8I+zPdEWN+lx/sImdLhu9eoSk5jIuHWUD/4MiNN1yo 3XVw== 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=RF8MIQWUQ8ggE/MlTolxsgSJT5vy8jgQgVDGU2A+dUw=; fh=odZjvFrgMDmfTa4Yn/jVKLPsclS8EzRuPmYcS/SNwLw=; b=CZDMipBtUXNYpbfxxVzCHR/VlRfrf5vqvIT+R6dFJ5N4oY1mye0HZGR5UWPbLXmdp1 MguUrBgE0/lURcTrUAeGhyH9giXiFKolxl4H7vPwtVRGx4Z57RICAYZg5o1sMMojmd/Z C/ugB9mfMRXu7iSoU4CU20l8ruZSYQu32L1SEXZmmfOMGJaubwQusLyN+dstPflb2+at 6dVUMzBdUtw2+xT00/5uuIet/peqn3oxA8jxjXm+9lfV27ojXSzD1M3zU3cB4nUZTwEn 7Z+H5r3x8QP+vf7Q7wkB5CIGDkNThxevIzKNqu/iqyxthcC7kOAdNurqbJ0KLxTkSMEi xQzQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qO0SLNpj; 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 r5-20020a0562140c4500b00696820f2a2csi681996qvj.76.2024.03.23.10.32.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Mar 2024 10:32:06 -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=qO0SLNpj; 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 1ro5C7-0002l9-3a; Sat, 23 Mar 2024 13:30:11 -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 1ro5C4-0002kU-IR for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:08 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ro5C2-00065f-RX for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:08 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1e0b213efa3so628515ad.0 for ; Sat, 23 Mar 2024 10:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711215005; x=1711819805; 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=RF8MIQWUQ8ggE/MlTolxsgSJT5vy8jgQgVDGU2A+dUw=; b=qO0SLNpjo2ernSZmuk9kzJeQwnm9pqZde5znaOZpLHKzGXeK8z6ffCKtRl8y8wUb5z JNSc6e3ivhcvrcSMOup+/2trKi03n7MZMUSsPkGgnqTQ0NTew8GoMxWRna0568HTVcJ/ 6HY1czKEuCjPqgqoZLSui6gCEtFyqX72qOCKYXuaQt/rbNf9UGjS/Br4vfjCF3hbK305 IT7GQYRASh50OtuD+sVZTUMmzYSuFG4DeL1BvhsBUAq15L2CRSJ6/RjmN/sgqHr7+n0s 9opb5dxZ/CuvYmGZOlZK4wEPjPGRsYwP4P+OqliG6z818eP07d6mlUSrUyqdBdOf1lCe ngNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711215005; x=1711819805; 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=RF8MIQWUQ8ggE/MlTolxsgSJT5vy8jgQgVDGU2A+dUw=; b=ml4DMcic0Xr2NV8xCyWvTR9KXLEPQILXka1t1hG6sONC1GMjIOdVcXwLaniLbdAT/0 kbT1FC87il9o4/QJD6+5fElqi1Zcj7lJpdNalrRPGVhlQ0zaAAC/wAsFyfKvUXghyH0Q EsfmStSPQKd/QpGiFHsxyHJRLPfZXS0V9HlLLGk2ZoqCWBvlf6GSuubdr25hwCfT7z7c Gh+jB++Old8fj0hWOMEiC7yglJjFywwfM4KaVR5NqdnjmUVtU875xTSz6ll+srD4bg++ 6g2oQ+EzPU8A/GlrzDu7klvzfkGcTyZqE79GBkMm+iF3WxpkUsCie6pXR7I/iz8rcY/I UaRQ== X-Gm-Message-State: AOJu0YxijKo3qignh++dk20hlC42FkC+c9mBQfxqxf5WtQcBR7WB8R7M LCliYF9kNYnbt8HzXO+LkEkfMDZSYK9q/eG5dd+RJSOIc4zOarCxs5R0dKh+YBMIu3DmTIx8YTg l X-Received: by 2002:a17:903:442:b0:1e0:319a:2677 with SMTP id iw2-20020a170903044200b001e0319a2677mr2720704plb.8.1711215005543; Sat, 23 Mar 2024 10:30:05 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id n15-20020a170902d2cf00b001dcfaab3457sm1811758plc.104.2024.03.23.10.30.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 10:30:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: svens@stackframe.org, deller@gmx.de Subject: [PATCH v2 5/7] target/hppa: Mark interval timer write as io Date: Sat, 23 Mar 2024 07:29:52 -1000 Message-Id: <20240323172954.1041480-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240323172954.1041480-1-richard.henderson@linaro.org> References: <20240323172954.1041480-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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: Helge Deller Tested-by: Helge Deller --- target/hppa/translate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index ceb739c54a..8c1a564c5d 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2162,6 +2162,9 @@ static bool trans_mtctl(DisasContext *ctx, arg_mtctl *a) switch (ctl) { case CR_IT: + if (translator_io_start(&ctx->base)) { + ctx->base.is_jmp = DISAS_IAQ_N_STALE; + } gen_helper_write_interval_timer(tcg_env, reg); break; case CR_EIRR: From patchwork Sat Mar 23 17:29:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 782045 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp457556wrt; Sat, 23 Mar 2024 10:31:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW8s38oRTTWrmzpqyr87QoklGkri3/S5d4mpLjUbawGgK90CjFlUOw5y5syQoyZWkWjORom0dzu91a29lA+zx2c X-Google-Smtp-Source: AGHT+IHbK/kNEdlGYf0ZezOk1ACQ7lxvcIlT8KpOigS6ARrfWvvFqp1+Ro9pBcQEf1ktrMkdv4rn X-Received: by 2002:a05:6214:5183:b0:696:4ac7:59f1 with SMTP id kl3-20020a056214518300b006964ac759f1mr3124484qvb.1.1711215099892; Sat, 23 Mar 2024 10:31:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711215099; cv=none; d=google.com; s=arc-20160816; b=tNI4Kjekd1tNY/GswPHLwtVaLiOF/PR1p5h8oq6CCnlNgmF65e0U93MRje6IZcgFTL Hcs3SzMkLflfHNoUvyXCEqSGf+nGe41KxNfcpwBsSkBjEEsoHlryfEU4++iPnzH1QC0C c9G1yeGgqmXX0bru5kK5pKN+O+ZXFTRrrjS01G4AsgFbMRYdbcc/WoNr25+KeowzdyVd Tx/05zAypJikxrEcAJ1OUlXqgXMSxKNxFbKNwi+L9FKZDT00lIeeMaYChOhC4Q1DcomV 5zKAouUoOLiJp2JuhARp7oSYK2oKA0yq3RDRlKr1qPNsIXXp+h6ZIECI5hMvl8P6v4ZD J4lA== 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=tqxxoJyz/Tp0Fx2Av8AP+03UJeuM8REKvV5gu6VjKFY=; fh=odZjvFrgMDmfTa4Yn/jVKLPsclS8EzRuPmYcS/SNwLw=; b=xt1f6lxoMmNyuUdg1CKamI8Wl81NkvEiN8J4LXtwBbhYTdnOXQvXjPvaTa3j53X9r3 lqmHmD+lumGfn2hWDQ3EEF/adTtjYLUNj2a0BcfzCcStzQQ5XA92fMnENf48SmeU2aUb 7oGMprJLK49rDKN9TBuX2LoU1fNMihnX61cxqQwYVusbBtx2vfeGf0yH/zzDwYok8Kjf dt6OaOmzjDB4sS41p5EsdWGjOFPDwv6MrYDMUz8wfBcXANiizvMKgNDw1GUb8GDN0jRF IHH+e93UkZ6+aESyvKY6unveIQN9PapZd1loepLwig6qkjvtk6f9F/J1VlDqbIFyxlok O3sg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=spRDOE1i; 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 gg2-20020a056214252200b006915bf18122si1985810qvb.367.2024.03.23.10.31.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Mar 2024 10:31:39 -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=spRDOE1i; 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 1ro5CA-0002lQ-Rz; Sat, 23 Mar 2024 13:30:14 -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 1ro5C9-0002lH-80 for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:13 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ro5C4-000663-CQ for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:12 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1e07cd7b798so19707435ad.2 for ; Sat, 23 Mar 2024 10:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711215007; x=1711819807; 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=tqxxoJyz/Tp0Fx2Av8AP+03UJeuM8REKvV5gu6VjKFY=; b=spRDOE1iUdXA0sup6cNevxjuWFZWjRIfO0lgMHtk4IiJ0sTEJ1kB2y/vlzgrYYp2TA MX0E7gErMWPVSexk8GR4uKpgzYyRwIWW9WM+ScLGydcDLtuZvyHUyUqRhEI4Yz/PofvJ bbIUL2dXdmgyszbTbCA9ieRV/RiZ3+WSGHyyWbIPhj9pvhMb9ooBALEpu/PkVaNqfAtw AzELcIftKQA1+KSGA4LRisCUfOvX5EDVdlBlOqyXRoiXUkQo5jVVXBnJwDuITYKN5K1G hygUaHSuAo2SjG9gLX3Sz1mkWvp+/D2rY7zbwmRQf6lmrk7vr3x9fT+TJPVPnEQSbDVX WuHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711215007; x=1711819807; 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=tqxxoJyz/Tp0Fx2Av8AP+03UJeuM8REKvV5gu6VjKFY=; b=sL/7FtoAdT83DTXKi2z5Ip3QvznaAIDja04HVY+bLZJLcQMoliqegxPyh1Ev1ykVvu m17CGGGxKahAhuHQeFxiVG43Vs2Lrl59xLqf3OMbNwaR69hcekN3e6NuMNkJ5M5h1hod BsCB4X01NtE3mV33CJAgU0MyLIbTows092za1E1g2zq4tEVvXu4OwyepuHI9jMb6Gzlb 0gQzw/gZNz69Ke+XWWFAOlgBfFEjOEEE+KhTfQp7SrWgA2KVOWP7VoUo2DbK49nFC8AQ xl0z4ZhbpdhXmMKyoq+RQTlRkzoKBnUut1DcSZT3lyuq435+7WpAUjFVRTYP6GO1AS6m c5hw== X-Gm-Message-State: AOJu0YzVLExhS6GxQCd3L2GxrTfQ81wswvHzlQxqG6uLzm6Q266LsglK ovY8VZ3s4lf9Mnuxljbc1kpJXhAxdS4C7PcZAfZgEwYxFgfpHdz0vXNl+K3YKMV02u+6SbTdgBg e X-Received: by 2002:a17:903:40c2:b0:1e0:1174:6360 with SMTP id t2-20020a17090340c200b001e011746360mr3451396pld.14.1711215007005; Sat, 23 Mar 2024 10:30:07 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id n15-20020a170902d2cf00b001dcfaab3457sm1811758plc.104.2024.03.23.10.30.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 10:30:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: svens@stackframe.org, deller@gmx.de Subject: [PATCH v2 6/7] target/hppa: Tidy read of interval timer Date: Sat, 23 Mar 2024 07:29:53 -1000 Message-Id: <20240323172954.1041480-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240323172954.1041480-1-richard.henderson@linaro.org> References: <20240323172954.1041480-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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 The call to gen_helper_read_interval_timer is identical on both sides of the IF. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller Tested-by: Helge Deller --- target/hppa/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 8c1a564c5d..5b8c1b06c3 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2082,11 +2082,9 @@ static bool trans_mfctl(DisasContext *ctx, arg_mfctl *a) nullify_over(ctx); tmp = dest_gpr(ctx, rt); if (translator_io_start(&ctx->base)) { - gen_helper_read_interval_timer(tmp); ctx->base.is_jmp = DISAS_IAQ_N_STALE; - } else { - gen_helper_read_interval_timer(tmp); } + gen_helper_read_interval_timer(tmp); save_gpr(ctx, rt, tmp); return nullify_end(ctx); case 26: From patchwork Sat Mar 23 17:29:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 782042 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp457344wrt; Sat, 23 Mar 2024 10:31:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVqZmTMflwzYLWwSwFC0A1CHuCLtWRreqo8R0nAN/713dBdcfy58m5dIiBEmfb/TvB6EFcR/kAte6OfAyyXWSX0 X-Google-Smtp-Source: AGHT+IFniiJeW8/4FzQRbNgLjXcQ3ah0j6IGUViSyo9/tXzbIDdEe25z2ONpTMCZXiCBBXJtUW4v X-Received: by 2002:a05:6102:c03:b0:475:48c5:c4fc with SMTP id x3-20020a0561020c0300b0047548c5c4fcmr2921234vss.24.1711215062203; Sat, 23 Mar 2024 10:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711215062; cv=none; d=google.com; s=arc-20160816; b=ITFjxo33jrNZP0H3pDkvVndNiHHt2TsiNJgZKBsTrC6g3Oioos4EY4zdshnJtaRrG2 mvasCNX2pP4yxAtaiXkAFXueTNhsW/MmhjJUu2F/3MwJXM/XJ1NIsQ6+TIt2BpkDxjw6 rU63lZx1zuOGkCkIqXomLqDiGbYwdZwDS9SHLJLPXAY2X7WcxgayWltnDuFMPdYg6q6k YU/HhA0RhpCX675fTEYozm+l6W1qnaB4xlN8/sZJy3H/3hw39GJeVvX5UzVGVSqoLMKA w838IdztHyVseGcfgfUAWpKKUQSo49jgqzcWiNGFZjwo/vLJGdrfvA19HDmmZm5cXNCK wyQA== 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=APeG/8zopMeZ+EKfHuhSVKWY0YScOPqHRLuO02LWlN4=; fh=odZjvFrgMDmfTa4Yn/jVKLPsclS8EzRuPmYcS/SNwLw=; b=0h5/jM2RyivzWEhJaeHzRzDkVb6SeQp5bLe2Pg1BI4rW3cUyg74SNO41MEF7xZzeFS X17tlaFerdcwNHuVO4UXrtMX4dEWmmLkKXOJi6aoLiewLAfgDOOwX5Yy0mBRchLZh1Mz lFk8Bg0gBXH4NS2bmpWp1YHROGXWKyMHcqzwA/NSMQeG70KRdDxqJy+GsARcqiiVeUGB rU1hOVLMeVTc0zjAR4i5BAhbNakPiwTZgoKDfO52MVBC3vPSbSSH8iIETLS3/DBqDb9x 4q6MOUAEe0CefVGlVHzjUc+ZQokmAe9fyqBT9xC9D2jjkKIvyxgQETiKjXp/3fqQbg9x rjMQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hSydgXbM; 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 r1-20020a056214212100b006915f7a4a82si4526524qvc.388.2024.03.23.10.31.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Mar 2024 10:31:02 -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=hSydgXbM; 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 1ro5CF-0002mN-Ef; Sat, 23 Mar 2024 13:30:19 -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 1ro5CD-0002m3-NM for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:17 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ro5C6-00066L-1P for qemu-devel@nongnu.org; Sat, 23 Mar 2024 13:30:17 -0400 Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-5d8b70b39efso2237718a12.0 for ; Sat, 23 Mar 2024 10:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711215008; x=1711819808; 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=APeG/8zopMeZ+EKfHuhSVKWY0YScOPqHRLuO02LWlN4=; b=hSydgXbMKBcw1FiSlZAAtb2w2F8ssg3MHr4jmjrX99U8AMUoXx4lMdwDbStUWg2xU1 5Ya+rf2MRpWk/zxOylMWqEWIIjw3LRvQaYmA0gsP3H6QwZE9T/U9GMLPVpkHWMaiyjJV ijOrX4s0nFHIL495mP7nUBGHBHCZ+0g4ePQnmwkZQbuaAxU8wzFeGYNRL/AuSGsnZJ6L 4kgDUt4cxmbDUKyDO6F8xhT8Bs8HGbRUCkbdlgQYE0wP35iIV13GOFfVXuFQCH2hEsZw eYUEzjvH1d8XdRi27M4lOCvcDcJ/jjxyU0NJ6RLRUdI9A2+O0/1sSDJWBKRh8aH0+4Os CmXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711215008; x=1711819808; 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=APeG/8zopMeZ+EKfHuhSVKWY0YScOPqHRLuO02LWlN4=; b=bkZ3UC0gshM/bq3sbwlSQDNSYFmw8Ql2n2pEmQi0AUOr6m+yYxo5AQNC3KaLwqY/eo dV3KQerm9wLpULM1KS/DHUutrTbRsM2euBjkriAMGuMF6i3eC2TghqdeY520KRHfwceg QwqFgRMMgElLS3B4uGCVhT6uM5NOTeDZH4KpkKR7s5UdatJHdzNQEuPvYmFgo38ZlAwN f8CfIVFGBlh0XBjxlYcRi3nDU+pPCLQmKfDUq2LW5BWxmqemaGcddEoW8l4DRIhJ6kZo in3+LkHM+hRID++XBqD4O7IgCaJ4seYr4S2GzQ1zPGBxh2f3umAxH8hxFNQ4Oake14bl Uv4g== X-Gm-Message-State: AOJu0Yxl68fZR8DgeW5vRE7H0bChEZUQnWTaXUczDl1s1BuTnXb36tkj WtCMI0GiVkJXzaa5+/9io8zshDmcEsFTo3uKw5HWV9W6VhmS58iRmkOuRasangv77wFvi4TF4UG z X-Received: by 2002:a17:902:e54d:b0:1d9:4ede:66b5 with SMTP id n13-20020a170902e54d00b001d94ede66b5mr3428591plf.15.1711215008371; Sat, 23 Mar 2024 10:30:08 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id n15-20020a170902d2cf00b001dcfaab3457sm1811758plc.104.2024.03.23.10.30.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 10:30:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: svens@stackframe.org, deller@gmx.de Subject: [PATCH v2 7/7] target/hppa: Fix EIRR, EIEM versus icount Date: Sat, 23 Mar 2024 07:29:54 -1000 Message-Id: <20240323172954.1041480-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240323172954.1041480-1-richard.henderson@linaro.org> References: <20240323172954.1041480-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52e.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, T_SPF_TEMPERROR=0.01 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 Call translator_io_start before write to EIRR. Move evaluation of EIRR vs EIEM to hppa_cpu_exec_interrupt. Exit TB after write to EIEM, but otherwise use a straight store. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller Tested-by: Helge Deller --- target/hppa/helper.h | 1 - target/hppa/int_helper.c | 14 ++++---------- target/hppa/translate.c | 10 +++++++--- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/target/hppa/helper.h b/target/hppa/helper.h index 1bdbcd8f98..8fd7ba65d8 100644 --- a/target/hppa/helper.h +++ b/target/hppa/helper.h @@ -91,7 +91,6 @@ DEF_HELPER_1(rfi, void, env) DEF_HELPER_1(rfi_r, void, env) DEF_HELPER_FLAGS_2(write_interval_timer, TCG_CALL_NO_RWG, void, env, tl) DEF_HELPER_FLAGS_2(write_eirr, TCG_CALL_NO_RWG, void, env, tl) -DEF_HELPER_FLAGS_2(write_eiem, TCG_CALL_NO_RWG, void, env, tl) DEF_HELPER_FLAGS_2(swap_system_mask, TCG_CALL_NO_RWG, tl, env, tl) DEF_HELPER_FLAGS_3(itlba_pa11, TCG_CALL_NO_RWG, void, env, tl, tl) DEF_HELPER_FLAGS_3(itlbp_pa11, TCG_CALL_NO_RWG, void, env, tl, tl) diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c index efe638b36e..90437a92cd 100644 --- a/target/hppa/int_helper.c +++ b/target/hppa/int_helper.c @@ -28,7 +28,7 @@ static void eval_interrupt(HPPACPU *cpu) { CPUState *cs = CPU(cpu); - if (cpu->env.cr[CR_EIRR] & cpu->env.cr[CR_EIEM]) { + if (cpu->env.cr[CR_EIRR]) { cpu_interrupt(cs, CPU_INTERRUPT_HARD); } else { cpu_reset_interrupt(cs, CPU_INTERRUPT_HARD); @@ -89,14 +89,6 @@ void HELPER(write_eirr)(CPUHPPAState *env, target_ulong val) bql_unlock(); } -void HELPER(write_eiem)(CPUHPPAState *env, target_ulong val) -{ - env->cr[CR_EIEM] = val; - bql_lock(); - eval_interrupt(env_archcpu(env)); - bql_unlock(); -} - void hppa_cpu_do_interrupt(CPUState *cs) { HPPACPU *cpu = HPPA_CPU(cs); @@ -280,7 +272,9 @@ bool hppa_cpu_exec_interrupt(CPUState *cs, int interrupt_request) } /* If interrupts are requested and enabled, raise them. */ - if ((env->psw & PSW_I) && (interrupt_request & CPU_INTERRUPT_HARD)) { + if ((interrupt_request & CPU_INTERRUPT_HARD) + && (env->psw & PSW_I) + && (env->cr[CR_EIRR] & env->cr[CR_EIEM])) { cs->exception_index = EXCP_EXT_INTERRUPT; hppa_cpu_do_interrupt(cs); return true; diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 5b8c1b06c3..46b2d6508d 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2166,10 +2166,10 @@ static bool trans_mtctl(DisasContext *ctx, arg_mtctl *a) gen_helper_write_interval_timer(tcg_env, reg); break; case CR_EIRR: + /* Helper modifies interrupt lines and is therefore IO. */ + translator_io_start(&ctx->base); gen_helper_write_eirr(tcg_env, reg); - break; - case CR_EIEM: - gen_helper_write_eiem(tcg_env, reg); + /* Exit to re-evaluate interrupts in the main loop. */ ctx->base.is_jmp = DISAS_IAQ_N_STALE_EXIT; break; @@ -2195,6 +2195,10 @@ static bool trans_mtctl(DisasContext *ctx, arg_mtctl *a) #endif break; + case CR_EIEM: + /* Exit to re-evaluate interrupts in the main loop. */ + ctx->base.is_jmp = DISAS_IAQ_N_STALE_EXIT; + /* FALLTHRU */ default: tcg_gen_st_i64(reg, tcg_env, offsetof(CPUHPPAState, cr[ctl])); break;