From nobody Tue Oct 28 12:14:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1514576368322703.8607863560043; Fri, 29 Dec 2017 11:39:28 -0800 (PST) Received: from localhost ([::1]:52152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eV0Up-0006aI-1C for importer@patchew.org; Fri, 29 Dec 2017 14:39:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eV0NK-0000lx-Jk for qemu-devel@nongnu.org; Fri, 29 Dec 2017 14:31:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eV0NJ-0000K8-RS for qemu-devel@nongnu.org; Fri, 29 Dec 2017 14:31:26 -0500 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:36900) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eV0NJ-0000Iq-MF for qemu-devel@nongnu.org; Fri, 29 Dec 2017 14:31:25 -0500 Received: by mail-pf0-x241.google.com with SMTP id n6so22426727pfa.4 for ; Fri, 29 Dec 2017 11:31:25 -0800 (PST) Received: from cloudburst.twiddle.net (97-113-183-164.tukw.qwest.net. [97.113.183.164]) by smtp.gmail.com with ESMTPSA id q68sm71240492pfb.1.2017.12.29.11.31.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Dec 2017 11:31:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/YlH32H9tYHZq9RETQ643K/J2do610JFBVn7ZN+NgVA=; b=g/FGsD/0DlNjutQ9c3H4mm84STiSazkRUmePuhc5xlgci+9oCxj17wum88VxOHx8Iy u4oaC9x8rdxZMFDyFFV5C1lFZakREtwzo3fuaOGkDqEvWvl5gBNCSaTHDannT3s79dO7 T+8JHrjJeq3lWP0elBCgeP1b3hlFc2XwkVuZ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/YlH32H9tYHZq9RETQ643K/J2do610JFBVn7ZN+NgVA=; b=Y0eBDJF9KmkiK9H+ukvgRZSJ4kEb/YZJDETAPOBVUkTRSnmuK8mKFsiT+ZYqztUeug 78MBUbtx+99TbOAH+WXrYmx3hpdrJq6QC6cayh/8GvF+EGssBV5MQp09V9FEV62tM4ry nJ3EragWGyZfvkOgUUpBiwbRzg34RznjNHEYoLhLMkI6qgAzgy7K8ch0+rPjJ6uX3QYx 7sbhFrF2LIZMiNfrGgKKx4CV9YkyKwp2JieOiooWm8X9pEGKrEs6aeMEu/0t19eFcSIG CRtclgvvRh/E7dc3hS97LUqP2HP1ar/BVqrByta69G2tWnLFv/6+Cf+WE2x0brQzcHYj X7ow== X-Gm-Message-State: AKGB3mLa4nVJgBEtAsBeoQ1UTyWggqYPMmlR0WlyVDVoN/oY6bJZqMBG PuEZxGuS8qWrYtSnjLwiQXSn0fYhrVc= X-Google-Smtp-Source: ACJfBotgF0UMMFGoS/zOJGfbOu/IJBH/qn666xpUfzmr+rCnlMq8KTBrCi1x00GN0oGdA2AHwFR5fA== X-Received: by 10.99.167.14 with SMTP id d14mr5349909pgf.257.1514575884536; Fri, 29 Dec 2017 11:31:24 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 29 Dec 2017 11:31:11 -0800 Message-Id: <20171229193113.11753-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171229193113.11753-1-richard.henderson@linaro.org> References: <20171229193113.11753-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::241 Subject: [Qemu-devel] [PULL 6/8] tcg: Add tcg_signed_cond X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Complimenting the existing tcg_unsigned_cond. Signed-off-by: Richard Henderson --- tcg/tcg.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tcg/tcg.h b/tcg/tcg.h index f25efa9795..8c45f7edbc 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -488,6 +488,12 @@ static inline TCGCond tcg_unsigned_cond(TCGCond c) return c & 2 ? (TCGCond)(c ^ 6) : c; } =20 +/* Create a "signed" version of an "unsigned" comparison. */ +static inline TCGCond tcg_signed_cond(TCGCond c) +{ + return c & 4 ? (TCGCond)(c ^ 6) : c; +} + /* Must a comparison be considered unsigned? */ static inline bool is_unsigned_cond(TCGCond c) { --=20 2.14.3