From patchwork Wed Oct 25 07:27:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 737848 Delivered-To: patch@linaro.org Received: by 2002:adf:f842:0:b0:32d:baff:b0ca with SMTP id d2csp150296wrq; Wed, 25 Oct 2023 00:32:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESOWpmThnAigziYWCqT/Q29dAkpImK4mEj/kH/cGC/977YD05bSqOedfvEafCChbupgFuj X-Received: by 2002:a5d:4a04:0:b0:32d:95ef:9281 with SMTP id m4-20020a5d4a04000000b0032d95ef9281mr11004036wrq.4.1698219147252; Wed, 25 Oct 2023 00:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698219147; cv=none; d=google.com; s=arc-20160816; b=vFkU3UfIVOSaVBBqWOKDDx7SxFdMy770lmPRcOtYNLAm07e8U6VD97/lry/1OFQuYW PWvRT6VMzA1q5LxlyfMhfunXqiOUFaPrHEsbVmKzKh1g7+L5WyYbzzWTxMrLVs5Yu+Dx S8xniVMUYKyfiD+6DveSkfCzFK/Dy7FZHAUDAYnuGRFwqVP4ISLj9zoD5nRRZSUeJxNW hL9a43cBkb5Ik4/Ag5ITY7IjEOqcIFh0APf8b+0LmVhlpDpvP7HiJVGjvW6wQyDWxR/h 18/ai4C6nG+h58WLznuq+WZtyNutfpiMtCLHc2VQCiuUmgkINaJWiI/4RN9f1+CghU1M Lzhg== 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=pEO6SLhS+OilG+TaX+qmXlK9OgBRNvjKZJDuVMclfD4=; fh=ycigHkwOPieh2u5PmcA89sNk/qPD1ZkdDlL8Mchfvw8=; b=ZjdoX1+BJNCrFY30PlaM0V3EklbKKQuorbjUH+O5TjmEprR2rUcOJhlLX0oo/7H4a7 3jGFVRN8g2Z6Xzs8QxPK7fnAf45IL2UI+dEHokQqJSyDniqQL3NWqmZkD4ooZxH0k1Cw jUiDBc1PkIbU1+iYIDFY2BCr3wmYs+V85IaDkxdakkB5Etdv5SjnvBVyd5GxEOMWJYyf KtqNxc/s+RNHVqb2H2AhUC+P3W/0m0nB88go7YLq46L9MTVjCKHb+DHp1KH2tygKklHO ReYUe5+Q9qbNJ5IjEFz63Y0qvVmXTVkTrImPxpdwavAKDy9hguVFctRZKcQYSWVinn3Y rdFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J4obVAGF; 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 w7-20020a5d6807000000b0032da68936eesi6694867wru.470.2023.10.25.00.32.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2023 00: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=J4obVAGF; 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 1qvYIn-0000Mg-9A; Wed, 25 Oct 2023 03:27:42 -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 1qvYIj-0000L1-2n for qemu-devel@nongnu.org; Wed, 25 Oct 2023 03:27:37 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvYIh-0004k9-K8 for qemu-devel@nongnu.org; Wed, 25 Oct 2023 03:27:36 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1cace3e142eso34980215ad.3 for ; Wed, 25 Oct 2023 00:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698218854; x=1698823654; 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=pEO6SLhS+OilG+TaX+qmXlK9OgBRNvjKZJDuVMclfD4=; b=J4obVAGFfuuOAswvsJKTlWiP/udBJARqnjiUqJNMsGNukDzqMsK7693jIlDq22iN7q EhBGF1RSZqO1cx7fo7g+kpXDhUaJ7fysgtMqMM8ZGIgMNlQGRQXl8jtxE+/5J3cRI+c+ 8P0L3PMJ/KUr6OXDI+nKF+ERDcobdTHnQixULgpgmAQmoG6icMnYe6QO//TSK5+EMhOp 4sKUZ1oSQ3Kj4mAPDWAaysaCd940TcZX5g+GXRLUAw/oxRLFy/zvb8sIu5LAmOF7Wv2T uEIM0bogiQFjuT439DCRjFyrvEON22RmrDANuT+rUmKexw0wrVOKZHx9PS/l/VvAmJyJ 3/zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698218854; x=1698823654; 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=pEO6SLhS+OilG+TaX+qmXlK9OgBRNvjKZJDuVMclfD4=; b=PJoamALbSQJAr0dbbRuzio4+CoNVICydH9BP90otjeNdVby/XgQ7tfaPC/V7hum6nv x5//iOvyc+O8QmQmTWnsiHkNP+wgqeIW0t3trirHCUciwQDzbTt13Tdx6DJCKsyjoIl0 4T88LUNmumBIA/DqJo3KI0QH0+QikQ6K1U6RqorIdcFV/ydLh/AqEVMJlJFuWpbH+02n J01dPxatUbMop/31eTJGhQQSWFua/DBuB82LXo7/cSWo+Me8B/mNbUA5UlWnwZCFRX1F hStxumJK4U8sLStQknvBuy12wI1Wi+LE1B0HHY0E/nCZ/8iF1Nb/+bSKn3HwAqyfjn2j xJ+w== X-Gm-Message-State: AOJu0Yyn0rHTh1bZaz1aNDo785Cta4lZ7WTQW550Mh9vBoo5FT7yRnH8 mwOVmMwcuDsTyGc4ocEnUILeDX33LMyET33sdOk= X-Received: by 2002:a17:903:2348:b0:1c9:bfd3:1f4a with SMTP id c8-20020a170903234800b001c9bfd31f4amr12212434plh.66.1698218853730; Wed, 25 Oct 2023 00:27:33 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id ji5-20020a170903324500b001b06c106844sm8578661plb.151.2023.10.25.00.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 00:27:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH 26/29] tcg/tci: Support TCG_COND_TST{EQ,NE} Date: Wed, 25 Oct 2023 00:27:04 -0700 Message-Id: <20231025072707.833943-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025072707.833943-1-richard.henderson@linaro.org> References: <20231025072707.833943-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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 --- tcg/tci.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tcg/tci.c b/tcg/tci.c index 4640902c88..5e1c4a491d 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -228,6 +228,12 @@ static bool tci_compare32(uint32_t u0, uint32_t u1, TCGCond condition) case TCG_COND_GTU: result = (u0 > u1); break; + case TCG_COND_TSTEQ: + result = (u0 & u1) == 0; + break; + case TCG_COND_TSTNE: + result = (u0 & u1) != 0; + break; default: g_assert_not_reached(); } @@ -270,6 +276,12 @@ static bool tci_compare64(uint64_t u0, uint64_t u1, TCGCond condition) case TCG_COND_GTU: result = (u0 > u1); break; + case TCG_COND_TSTEQ: + result = (u0 & u1) == 0; + break; + case TCG_COND_TSTNE: + result = (u0 & u1) != 0; + break; default: g_assert_not_reached(); } @@ -1043,6 +1055,8 @@ static const char *str_c(TCGCond c) [TCG_COND_GEU] = "geu", [TCG_COND_LEU] = "leu", [TCG_COND_GTU] = "gtu", + [TCG_COND_TSTEQ] = "tsteq", + [TCG_COND_TSTNE] = "tstne", }; assert((unsigned)c < ARRAY_SIZE(cond));