From nobody Tue Feb 10 23:55:19 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=mail.uni-paderborn.de ARC-Seal: i=1; a=rsa-sha256; t=1561468545; cv=none; d=zoho.com; s=zohoarc; b=XOE4f2NtNBUq5n2DJSuKqpCNDXyucwvCMUiS3tDkPTzccdeBN10T3Xa5SgOhbvZBMuItJ12ZXhueqmNkCCHdsUD5SmswDpKbe7/wxYdoLTlmTvrYR0dlHjtNTWjgBu/c5QMhHPvCvayYAVZwqZuHUShv2vZAD+L7LjN+mvrJkaU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561468545; h=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=708RpPXa2IUo7RUFoWejwd4pEMIalApEbAkil0e53M4=; b=UHSGooeBoHixOW/We2KwrJia87Vl7VpcSAzxRsVECO0tZwXUG5HdUSFALclMlCeZ2+uVwKNRB1dtPcF22NwaIT+fiIIij8qpGNaH93lR/dtQd0kq5fsjmSY5ADD8FNUbwMTVkXd41CzReGiDmmz8RtGvAUAO8ZVbKLruRszDggM= 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 1561468545109766.2757025295368; Tue, 25 Jun 2019 06:15:45 -0700 (PDT) Received: from localhost ([::1]:60092 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hflIV-0006zV-03 for importer@patchew.org; Tue, 25 Jun 2019 09:15:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50898) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hflAL-0001CU-0r for qemu-devel@nongnu.org; Tue, 25 Jun 2019 09:07:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hflAH-0007hT-7y for qemu-devel@nongnu.org; Tue, 25 Jun 2019 09:07:15 -0400 Received: from telepax.uni-paderborn.de ([131.234.189.14]:50752) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hflAD-0007ds-Ek for qemu-devel@nongnu.org; Tue, 25 Jun 2019 09:07:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.uni-paderborn.de; s=20170601; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=708RpPXa2IUo7RUFoWejwd4pEMIalApEbAkil0e53M4=; b=mMSadSgHTaoQ5qV4/XV14b0ojP OQox13LiIXjXPBUrLZnHpaANsBZLBeoZTGgLW7h1JK0tBMQ5mj+2bOgIhmR+VnBaiFHdl5PIpLQlj C0cdZ1ZGTnJQtNH5DCR2vIVSCsaePbBFQJwnEL3pL2gr5c8NPg6kzYq5z/ZKL7rokggk=; From: Bastian Koppelmann To: qemu-devel@nongnu.org Date: Tue, 25 Jun 2019 15:06:55 +0200 Message-Id: <20190625130658.24895-3-kbastian@mail.uni-paderborn.de> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190625130658.24895-1-kbastian@mail.uni-paderborn.de> References: <20190625130658.24895-1-kbastian@mail.uni-paderborn.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IMT-Spam-Score: 0.0 () X-PMX-Version: 6.4.6.2792898, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2019.6.25.125716, AntiVirus-Engine: 5.63.0, AntiVirus-Data: 2019.6.18.5630002 X-IMT-Authenticated-Sender: uid=kbastian,ou=People,o=upb,c=de X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 131.234.189.14 Subject: [Qemu-devel] [PULL 2/5] tricore: add UTOF instruction X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Lars Biermanski , Georg Hofstetter , David Brenken , Robert Rasche , Andreas Konopik Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: David Brenken Signed-off-by: Andreas Konopik Signed-off-by: David Brenken Signed-off-by: Georg Hofstetter Signed-off-by: Robert Rasche Signed-off-by: Lars Biermanski Reviewed-by: Bastian Koppelmann Message-Id: <20190624070339.4408-3-david.brenken@efs-auto.org> Signed-off-by: Bastian Koppelmann --- target/tricore/fpu_helper.c | 16 ++++++++++++++++ target/tricore/helper.h | 1 + target/tricore/translate.c | 3 +++ 3 files changed, 20 insertions(+) diff --git a/target/tricore/fpu_helper.c b/target/tricore/fpu_helper.c index f079d9e939..432079c8e2 100644 --- a/target/tricore/fpu_helper.c +++ b/target/tricore/fpu_helper.c @@ -303,6 +303,22 @@ uint32_t helper_itof(CPUTriCoreState *env, uint32_t ar= g) return (uint32_t)f_result; } =20 +uint32_t helper_utof(CPUTriCoreState *env, uint32_t arg) +{ + float32 f_result; + uint32_t flags; + + f_result =3D uint32_to_float32(arg, &env->fp_status); + + flags =3D f_get_excp_flags(env); + if (flags) { + f_update_psw_flags(env, flags); + } else { + env->FPU_FS =3D 0; + } + return (uint32_t)f_result; +} + uint32_t helper_ftoiz(CPUTriCoreState *env, uint32_t arg) { float32 f_arg =3D make_float32(arg); diff --git a/target/tricore/helper.h b/target/tricore/helper.h index 16b62edf7f..f1a5cb367e 100644 --- a/target/tricore/helper.h +++ b/target/tricore/helper.h @@ -111,6 +111,7 @@ DEF_HELPER_4(fmsub, i32, env, i32, i32, i32) DEF_HELPER_3(fcmp, i32, env, i32, i32) DEF_HELPER_2(ftoi, i32, env, i32) DEF_HELPER_2(itof, i32, env, i32) +DEF_HELPER_2(utof, i32, env, i32) DEF_HELPER_2(ftoiz, i32, env, i32) DEF_HELPER_2(ftouz, i32, env, i32) DEF_HELPER_2(updfl, void, env, i32) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 5e1c4f54b9..bd913d71a1 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -6747,6 +6747,9 @@ static void decode_rr_divide(CPUTriCoreState *env, Di= sasContext *ctx) case OPC2_32_RR_UPDFL: gen_helper_updfl(cpu_env, cpu_gpr_d[r1]); break; + case OPC2_32_RR_UTOF: + gen_helper_utof(cpu_gpr_d[r3], cpu_env, cpu_gpr_d[r1]); + break; case OPC2_32_RR_FTOIZ: gen_helper_ftoiz(cpu_gpr_d[r3], cpu_env, cpu_gpr_d[r1]); break; --=20 2.22.0