From patchwork Tue Jul 25 14:58:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 706153 Delivered-To: patch@linaro.org Received: by 2002:a5d:464f:0:b0:317:2194:b2bc with SMTP id j15csp232595wrs; Tue, 25 Jul 2023 07:59:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlEvCLftczGj3yuB4QJ2hiXtfjNbFPYzKr44U6SgArMzZE968kmLa5/X2CHVfE84Z3N3XYq7 X-Received: by 2002:a0c:cb08:0:b0:61a:d6af:cb00 with SMTP id o8-20020a0ccb08000000b0061ad6afcb00mr2648277qvk.9.1690297194572; Tue, 25 Jul 2023 07:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690297194; cv=none; d=google.com; s=arc-20160816; b=MvIUWnQx4keO8M5ZpaoRAxpw0LYuGX1Ot5B52qc98E96Rk92sY0BubS+P5bi4LLU7M ROSgsSCddXHsZoj5HO3oQTdbN6MjQT0bZbvUW+c2lcjT7dzqGeD0DzMM0nq0iCMflTeS QDE95JgdXECiOsz0q0tUk25kTvEBjZBHrRSkluAPkW6wsyPhiFj+mnYcV/vEXwrv38b9 HQ49CYEWLOxYtUI41Yietfsv5G06+QaaxueAkkdreVek7XbmgXq2Yz/jt4RMey8LLrR8 UoxgGCZbYjOQAroThUUvjfH6r0cyo8mal3Yq2Wpnet0ra/ksho2xgdGd3q+XkMJhOg+i z5Vg== 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=2oHA/J/s7nN4RB2ZZD2qvJIrA12HJjmnHfA5XOpzEbY=; fh=t8cTMBG+DPAOM+Csye7RvQWAL7MOWUNRsu9mnS5OpgY=; b=ogFtCAPZuzWIpqkQcWCAcW3ZvjhueoAAk/sMweynot5lawq2+emso5n6TAOFIc1Q/C 75VVJFnTjgwH8+LSMoeWhWSEbNxKK9YWMYmONeP8IpUFX3zZdrMmolXQ/KK6ClOJtuvS rAwn8PEQwaSsGWvJIPvayK7a+yB6QBlAum3gL2O9zR0ccf++eD8vOS7GJZvyuRwtS1B9 xHxzs+n8kuOd8T5P9GHuRTXElufG2tk2pDRdIq8x6z7D0X7vqe+Vsrk7EuBtSFZaDHgM MFpaRcfpBQi4Ofm/LWYtV+2L14tm7DTvQgGXnqJro9QOTp92CEN+Pt3JvDf5PKWaZDBn G0SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ydlt6aK5; 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 m1-20020a0cf181000000b00631e69834e9si6723310qvl.195.2023.07.25.07.59.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Jul 2023 07:59:54 -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=ydlt6aK5; 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 1qOJVe-0005RR-1k; Tue, 25 Jul 2023 10:59:34 -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 1qOJVc-0005DN-2Y for qemu-devel@nongnu.org; Tue, 25 Jul 2023 10:59:32 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOJVa-0001Iu-4S for qemu-devel@nongnu.org; Tue, 25 Jul 2023 10:59:31 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fbc244d384so47311725e9.0 for ; Tue, 25 Jul 2023 07:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690297168; x=1690901968; 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=2oHA/J/s7nN4RB2ZZD2qvJIrA12HJjmnHfA5XOpzEbY=; b=ydlt6aK5A1/6P/qQ7zKH4QmRgrq/B8e7qzgVGZiFj/wWurh79WedVhp6BOfkJn733d LBfH+TvnQMp8VkRo4hfjEncjLurFOVADMkiqDNg4pr1hsU3Odn/4V1cZBlnoBCn5ouWH 9DuYfLjIGxAmaxzADJwXo1eDyT0Q1qV1il/LOcxW3k+m+/dMwlAEMYBEsMkIo+VbJ0Lm 0HNXkROIpBbbQrA5CHO4gqjEX9mwqx9IiUMQFj/OeP+uO5hLOvF0Mgl4DySZMKFWc+Ou soBapIcbuE1AN2yQCOb56kc1eSI+y+cPZmMRk0X4+KzdxF0LBse2DDw9FObTck+CpV5c 2kMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690297168; x=1690901968; 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=2oHA/J/s7nN4RB2ZZD2qvJIrA12HJjmnHfA5XOpzEbY=; b=OifC2S4ds3YmeVyPZBbedPRkrafgfKmGBiQC+kgWDKHGdk8SiAyHyvPiivnCBINWCO yOCJLJkxwq7V+hBYe460Vq4RyUu1SakLVPVlgiBSXUX9ag/HdJLHaJr4hKmlNvSz3YI0 y+VfhbwrRSrzqP5Fq69hzecPZwAGs0XsZiM6sLY/atgKTrbmlr90D/Uzzxr5tMkKSuwF uAUXYfWk7TJ0l5zQy7NwXN9VVzTlHeHKPvgbA28ZYxVh/qhYJYB/thA2fxFglULujK2U b/b7GbKcfFT0Wftys3njYQ4K6Bi6bSAcVuMJF7vSFgyFNEftdfkw11t5oqSKfgb9xAQ/ uiIw== X-Gm-Message-State: ABy/qLYEQCqc/cmfBWsrqUe7BIeRBfsABrxLTbkiRaOHI9vWd8Kse1rO TxZ6KrE6qcH2GdlkYxd+bIC+UeByjPISmOcP4Ds= X-Received: by 2002:a7b:cc17:0:b0:3fa:e92e:7a8b with SMTP id f23-20020a7bcc17000000b003fae92e7a8bmr9454243wmh.13.1690297168700; Tue, 25 Jul 2023 07:59:28 -0700 (PDT) Received: from localhost.localdomain ([176.187.203.142]) by smtp.gmail.com with ESMTPSA id w3-20020a1cf603000000b003fd2eba5a9esm8850789wmc.5.2023.07.25.07.59.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 25 Jul 2023 07:59:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Artyom Tarasenko , Bastian Koppelmann , qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PULL 10/10] target/tricore: Rename tricore_feature Date: Tue, 25 Jul 2023 16:58:29 +0200 Message-Id: <20230725145829.37782-11-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230725145829.37782-1-philmd@linaro.org> References: <20230725145829.37782-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 From: Bastian Koppelmann this name is used by capstone and will lead to a build failure of QEMU, when capstone is enabled. So we rename it to tricore_has_feature(), to match has_feature() in translate.c. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1774 Signed-off-by: Bastian Koppelmann Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20230721060605.76636-1-kbastian@mail.uni-paderborn.de> --- target/tricore/cpu.h | 2 +- target/tricore/cpu.c | 8 ++++---- target/tricore/helper.c | 4 ++-- target/tricore/op_helper.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index a50b91cc36..3708405be8 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -277,7 +277,7 @@ enum tricore_features { TRICORE_FEATURE_162, }; -static inline int tricore_feature(CPUTriCoreState *env, int feature) +static inline int tricore_has_feature(CPUTriCoreState *env, int feature) { return (env->features & (1ULL << feature)) != 0; } diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index f15169bd1b..133a9ac70e 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -104,18 +104,18 @@ static void tricore_cpu_realizefn(DeviceState *dev, Error **errp) } /* Some features automatically imply others */ - if (tricore_feature(env, TRICORE_FEATURE_162)) { + if (tricore_has_feature(env, TRICORE_FEATURE_162)) { set_feature(env, TRICORE_FEATURE_161); } - if (tricore_feature(env, TRICORE_FEATURE_161)) { + if (tricore_has_feature(env, TRICORE_FEATURE_161)) { set_feature(env, TRICORE_FEATURE_16); } - if (tricore_feature(env, TRICORE_FEATURE_16)) { + if (tricore_has_feature(env, TRICORE_FEATURE_16)) { set_feature(env, TRICORE_FEATURE_131); } - if (tricore_feature(env, TRICORE_FEATURE_131)) { + if (tricore_has_feature(env, TRICORE_FEATURE_131)) { set_feature(env, TRICORE_FEATURE_13); } cpu_reset(cs); diff --git a/target/tricore/helper.c b/target/tricore/helper.c index 951024d491..731a6e9cb6 100644 --- a/target/tricore/helper.c +++ b/target/tricore/helper.c @@ -155,7 +155,7 @@ void psw_write(CPUTriCoreState *env, uint32_t val) #define FIELD_GETTER_WITH_FEATURE(NAME, REG, FIELD, FEATURE) \ uint32_t NAME(CPUTriCoreState *env) \ { \ - if (tricore_feature(env, TRICORE_FEATURE_##FEATURE)) { \ + if (tricore_has_feature(env, TRICORE_FEATURE_##FEATURE)) { \ return FIELD_EX32(env->REG, REG, FIELD ## _ ## FEATURE); \ } \ return FIELD_EX32(env->REG, REG, FIELD ## _13); \ @@ -170,7 +170,7 @@ uint32_t NAME(CPUTriCoreState *env) \ #define FIELD_SETTER_WITH_FEATURE(NAME, REG, FIELD, FEATURE) \ void NAME(CPUTriCoreState *env, uint32_t val) \ { \ - if (tricore_feature(env, TRICORE_FEATURE_##FEATURE)) { \ + if (tricore_has_feature(env, TRICORE_FEATURE_##FEATURE)) { \ env->REG = FIELD_DP32(env->REG, REG, FIELD ## _ ## FEATURE, val); \ } \ env->REG = FIELD_DP32(env->REG, REG, FIELD ## _13, val); \ diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c index 821a4b67cb..89be1ed648 100644 --- a/target/tricore/op_helper.c +++ b/target/tricore/op_helper.c @@ -2584,7 +2584,7 @@ void helper_ret(CPUTriCoreState *env) /* PCXI = new_PCXI; */ env->PCXI = new_PCXI; - if (tricore_feature(env, TRICORE_FEATURE_131)) { + if (tricore_has_feature(env, TRICORE_FEATURE_131)) { /* PSW = {new_PSW[31:26], PSW[25:24], new_PSW[23:0]}; */ psw_write(env, (new_PSW & ~(0x3000000)) + (psw & (0x3000000))); } else { /* TRICORE_FEATURE_13 only */ @@ -2695,7 +2695,7 @@ void helper_rfm(CPUTriCoreState *env) env->gpr_a[10] = cpu_ldl_data(env, env->DCX+8); env->gpr_a[11] = cpu_ldl_data(env, env->DCX+12); - if (tricore_feature(env, TRICORE_FEATURE_131)) { + if (tricore_has_feature(env, TRICORE_FEATURE_131)) { env->DBGTCR = 0; } }