From nobody Tue Feb 10 06:43:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1557792766; cv=none; d=zoho.com; s=zohoarc; b=ELtyjQLjeo3dbvucT8Zz4A3F7LskKWvZkUAC4SIdcAbIOdyou4i+w4Kikyd3pzpFikIWj2dP0Jn5b8VXi5WzMzoRxvpaNNjxC01ti2VG3G/vQAtnsc5Dl1Uxr5CKPaRGhvH21+2RcNhZmDK+pJN9p+rpWtZcXFq/zhG0oajw20U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557792766; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=NPRvgVGg8Y/3Ni/kBR6Hw8ovXKBKiDD4+leXLS3F/ik=; b=VrNP2C0HGKzPRz6SbyRPVWhpRUJegHSS4y2YT20QIHZl6YrldXkkyUWHSFLLoTkoO7VzpVsvxFjrHlkNKJKzYHTd1GFHMyvdhDoh4GUAOrrR4UTNZR3vP+gpjCAXOOLtGEYpfkm9NnXX6vhF7YL01C2rwWyWqkPew5lLrQtfpI4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557792766327510.44457271130705; Mon, 13 May 2019 17:12:46 -0700 (PDT) Received: from localhost ([127.0.0.1]:36664 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQL3j-0005qz-7y for importer@patchew.org; Mon, 13 May 2019 20:12:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQKzB-00025X-K6 for qemu-devel@nongnu.org; Mon, 13 May 2019 20:08:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQKxg-0003sY-5l for qemu-devel@nongnu.org; Mon, 13 May 2019 20:08:01 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:41105) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQKxd-0003jf-UX for qemu-devel@nongnu.org; Mon, 13 May 2019 20:06:27 -0400 Received: by mail-pf1-x42a.google.com with SMTP id l132so8057206pfc.8 for ; Mon, 13 May 2019 17:06:21 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id u3sm238151pfn.29.2019.05.13.17.06.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 17:06:19 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=NPRvgVGg8Y/3Ni/kBR6Hw8ovXKBKiDD4+leXLS3F/ik=; b=JteRtTLDNIM8JHMEuRdmyIaBMSBrjp3H1hDPFGeoMKXyzyrYDTdqNt7o9GpCY0Rsz5 jC4wgCkZjwyHRInK0fyz5DT+mSwxrVNv+WVWIyHcrzE1iKYImaHEUY4rbV6TIm+LTLyu nFOHwwbEKubcPUkujDc1g0m4ZW6RwlS02TyI2ldPs/SgR5T8O/OLd1Eao6mWGp06cPCH TIq5SkhXfNUNamtaqws8e7DMA+DTBVM1NDupSCWJlw+7/ntdVFuF/VWWiCcGgbVlu+co Ooiswa0KnCNPb2bWOZuuKTzccnw/oEAz1HYc2Y/XY6xvMhy5bZZSnQ2sV2rZJwq6djMi q12w== 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:mime-version:content-transfer-encoding; bh=NPRvgVGg8Y/3Ni/kBR6Hw8ovXKBKiDD4+leXLS3F/ik=; b=latT8BI/vM2ctSUpiyKsHpFVuPzPp5Om+4TBHVtTGhcihprPwF/0Npro4ATwtqZVlE 6MnHR936KBsAECD39JNk1IUUXx94hV+SkokFWjcb8Iuot/NpI85WgWsD2l0cl6cYPnk5 SGMCp09VjL7hmrGvraEFNTlpXQ45aTy10cVNr2vmRSFMGUkm4+UL5JH/ZVbm8jCg8p5X z/gxyjELlQDMpHeV3fU/QTYsBfmlyxX9+RIJeiBEjywKJUYm3/VOK6zxaw0ZPdxDwY+y ewhkp9CytZk2FMpRjdnmwUXGcF+BFra7xNbSIH7A3cOR8e5ls249Qp2yc27Y5xysWagR m2gw== X-Gm-Message-State: APjAAAX6lBhnMYeqKolUu6DT7Y0UedeX+7uF7sumGnTMdtY3+yz8HZS2 H8leAUvkxGk+MJhtSCKId1xcr6BUUOo= X-Google-Smtp-Source: APXvYqzHv+6a6a8mTJ7a45JMOAU+PT2jrdlIsftYUpt9mh+26H41yeM6kQT3EcvxRdKy7IdmA6rztA== X-Received: by 2002:a62:5801:: with SMTP id m1mr495543pfb.32.1557792380158; Mon, 13 May 2019 17:06:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 13 May 2019 17:05:38 -0700 Message-Id: <20190514000540.4313-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190514000540.4313-1-richard.henderson@linaro.org> References: <20190514000540.4313-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42a Subject: [Qemu-devel] [PULL 29/31] target/tricore: Use tcg_gen_abs_tl 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@linux.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Bastian Koppelmann Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190423102145.14812-3-f4bug@amsat.org> Signed-off-by: Richard Henderson --- target/tricore/translate.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 8f6416144e..06c4485e55 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -2415,11 +2415,7 @@ gen_msubadr32s_h(TCGv ret, TCGv r1, TCGv r2, TCGv r3= , uint32_t n, uint32_t mode) =20 static inline void gen_abs(TCGv ret, TCGv r1) { - TCGv temp =3D tcg_temp_new(); - TCGv t0 =3D tcg_const_i32(0); - - tcg_gen_neg_tl(temp, r1); - tcg_gen_movcond_tl(TCG_COND_GE, ret, r1, t0, r1, temp); + tcg_gen_abs_tl(ret, r1); /* overflow can only happen, if r1 =3D 0x80000000 */ tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_PSW_V, r1, 0x80000000); tcg_gen_shli_tl(cpu_PSW_V, cpu_PSW_V, 31); @@ -2430,9 +2426,6 @@ static inline void gen_abs(TCGv ret, TCGv r1) tcg_gen_xor_tl(cpu_PSW_AV, ret, cpu_PSW_AV); /* calc SAV bit */ tcg_gen_or_tl(cpu_PSW_SAV, cpu_PSW_SAV, cpu_PSW_AV); - - tcg_temp_free(temp); - tcg_temp_free(t0); } =20 static inline void gen_absdif(TCGv ret, TCGv r1, TCGv r2) @@ -6617,13 +6610,8 @@ static void decode_rr_divide(CPUTriCoreState *env, D= isasContext *ctx) tcg_gen_movi_tl(cpu_PSW_AV, 0); if (!tricore_feature(env, TRICORE_FEATURE_131)) { /* overflow =3D (abs(D[r3+1]) >=3D abs(D[r2])) */ - tcg_gen_neg_tl(temp, temp3); - /* use cpu_PSW_AV to compare against 0 */ - tcg_gen_movcond_tl(TCG_COND_LT, temp, temp3, cpu_PSW_AV, - temp, temp3); - tcg_gen_neg_tl(temp2, cpu_gpr_d[r2]); - tcg_gen_movcond_tl(TCG_COND_LT, temp2, cpu_gpr_d[r2], cpu_PSW_= AV, - temp2, cpu_gpr_d[r2]); + tcg_gen_abs_tl(temp, temp3); + tcg_gen_abs_tl(temp2, cpu_gpr_d[r2]); tcg_gen_setcond_tl(TCG_COND_GE, cpu_PSW_V, temp, temp2); } else { /* overflow =3D (D[b] =3D=3D 0) */ @@ -6655,13 +6643,8 @@ static void decode_rr_divide(CPUTriCoreState *env, D= isasContext *ctx) tcg_gen_movi_tl(cpu_PSW_AV, 0); if (!tricore_feature(env, TRICORE_FEATURE_131)) { /* overflow =3D (abs(D[r3+1]) >=3D abs(D[r2])) */ - tcg_gen_neg_tl(temp, temp3); - /* use cpu_PSW_AV to compare against 0 */ - tcg_gen_movcond_tl(TCG_COND_LT, temp, temp3, cpu_PSW_AV, - temp, temp3); - tcg_gen_neg_tl(temp2, cpu_gpr_d[r2]); - tcg_gen_movcond_tl(TCG_COND_LT, temp2, cpu_gpr_d[r2], cpu_PSW_= AV, - temp2, cpu_gpr_d[r2]); + tcg_gen_abs_tl(temp, temp3); + tcg_gen_abs_tl(temp2, cpu_gpr_d[r2]); tcg_gen_setcond_tl(TCG_COND_GE, cpu_PSW_V, temp, temp2); } else { /* overflow =3D (D[b] =3D=3D 0) */ --=20 2.17.1