Message ID | 20231028194522.245170-32-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:4c47:0:b0:32d:baff:b0ca with SMTP id n7csp481516wrt; Sat, 28 Oct 2023 12:49:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEy4IPLfJW97J2HpWlnY14lOPWS2WOWg1hea85ugW9l0KLBWSPg8TMo/w2zR75ks+uxSyJI X-Received: by 2002:ad4:5b8d:0:b0:65b:150e:604b with SMTP id 13-20020ad45b8d000000b0065b150e604bmr6936121qvp.49.1698522577346; Sat, 28 Oct 2023 12:49:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698522577; cv=none; d=google.com; s=arc-20160816; b=hzhK3hTzMTYDodhUKmcp4VbAewDI/gqOYoW915ZhXl4OSFC5muyL1uuRQy7jEVraZM KoCf3l/x4V2oFV/GAyNgByxkt2W8BSa6IHZo85GeXdDcc42YMnnuVdyYmu6b4FCKbicG /YhXfing0Tdb1E5CvUOXzk2EVi4sw3seEQilhY++XagcnXHkGjEYgvfAkrNT8YpN+xd8 ULqUSr4wGAKh3dVFLyTQTh1JAeiRZLHMx0Tjt0ZBleXtLPTNhFWVax6o7uxzivpEtf2n peGpekkBZ/pQ6b/GR8aOG5KBAKOi/7wIUXwPTUNCdpyetJy9TlzJ9GIXN2+inv+99Zpl XmXw== 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=GbSB792CRg76qyQfASHmg380JBauy2gTuYi49sbOwBU=; b=FCHkG6ToI3vdP2Vpxp4d0ETa2gcwzxk+nBB0KzbuDtMbpMoQDaGVPkv7wV4mqqp1AR sUDTxmRg9vupE9gY00Fc7RarI01dVBUBPTTyeH+R2Wl2/UjPdBEQ9/L26Fx2L4rZVGoW 3r7S28sDx2w+z3s7l29+8+XZjsetz52nefBNmnsX1JXMf0UYpZ/QdLyfNwGi6AnSxhw4 fUS1hQU+dvBuCcWWjwlE87wjJWlNLZKbpmfo2a7fw7l4uWi4fqgZUl5G3vx4QX0sPFs0 +9OC5vgbh5Y7uMB/b4bOFsKueutII81Uhk50W3hIGUdCIBEyr+cw0S/nDIpsit4HF2T5 KhnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tDQ4Hbnl; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j8-20020a056214032800b00670c7fd09desi1533274qvu.240.2023.10.28.12.49.37 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Oct 2023 12:49:37 -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=tDQ4Hbnl; 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 <qemu-devel-bounces@nongnu.org>) id 1qwpG2-0004w1-7v; Sat, 28 Oct 2023 15:46:06 -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 <richard.henderson@linaro.org>) id 1qwpFs-0004oH-1o for qemu-devel@nongnu.org; Sat, 28 Oct 2023 15:45:56 -0400 Received: from mail-oo1-xc29.google.com ([2607:f8b0:4864:20::c29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1qwpFq-0004Ay-FI for qemu-devel@nongnu.org; Sat, 28 Oct 2023 15:45:55 -0400 Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-581de3e691dso1845428eaf.3 for <qemu-devel@nongnu.org>; Sat, 28 Oct 2023 12:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698522352; x=1699127152; 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=tDQ4HbnlE9V0M/8o6p/OttI1+kn23kt+fv31QguUy5t663k/dPU1aKWiwk4jfQ1pp1 7KUvcxoWlgHj6rboxozdb9ynfDennqhKw83F8qhyJYimx35Zou59GUaklibWesvkAxTp 5Xd6laoCwYbLLZ/0r3VbnYYp+rOqg+ZcViBJioHe4hR5F/g4PXSFYSttVI4XKZQntTwH SAdcPAuinjfzO+57itS2t+CPZYp4q9NSy/iooaG1wXSXiMZc4vgIYzqsXOkFgNFbWjIN ek771W6sTsxWboDRMX91ScqFZwcDC/U6Xsl+fyzn42dUCi9/j7ENIaWxJwftw6MhLysa lGow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698522352; x=1699127152; 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=CsX+6klj+KSfCXfI9Ij6Knb/YW3Ipc4bKyDqf1iEXMQ/eNV6dRn1WbKFOXeXsFgUYO miHRGwZxPMpOx4S7jKIAtUN4jML7m20jQvZkpdgPSO2qONFcXvGyF09GAgEyRVduGrax JhrlAk2FOQX2sTaTsWql2usKy9KGEIrZpnzqM6tZatSGYBzc5A8Fu0lA2Z0WsjFP2Ns2 tgGOS8szM2w9jjp1ANEjwVkH9cOLkVZ92lqiX4SRXTWfKGHQGq8xSHeBN5lr5C26Nikd +O1vKeFP8BlovOU12KDws0nLGWyouxoEJeYdpn1s1F8LV1avQlXbEYARSWtzXfY6XAdU c+YQ== X-Gm-Message-State: AOJu0YzeqCPWRJzFMqdurQ399kla+vHMtI4jZF2wuYPKbwXK0IvPq1Ds /fpYlhGB/aYbrkaak/VH5k4oG/x2eV37w3Lpxeg= X-Received: by 2002:a05:6359:6b82:b0:168:d0d4:d8e6 with SMTP id ta2-20020a0563596b8200b00168d0d4d8e6mr6362041rwb.16.1698522351761; Sat, 28 Oct 2023 12:45:51 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id h9-20020a170902f7c900b001b8a3e2c241sm3600096plw.14.2023.10.28.12.45.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Oct 2023 12:45:51 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: philmd@linaro.org, pbonzini@redhat.com Subject: [PATCH v2 31/35] tcg/tci: Support TCG_COND_TST{EQ,NE} Date: Sat, 28 Oct 2023 12:45:18 -0700 Message-Id: <20231028194522.245170-32-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231028194522.245170-1-richard.henderson@linaro.org> References: <20231028194522.245170-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::c29; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc29.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
tcg: Introduce TCG_COND_TST{EQ,NE}
|
expand
|
On 28/10/23 21:45, Richard Henderson wrote: > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > tcg/tci.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
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));
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/tci.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)