]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/tricore: Rename tricore_feature
authorBastian Koppelmann <kbastian@mail.uni-paderborn.de>
Fri, 21 Jul 2023 06:06:05 +0000 (08:06 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 19 Nov 2023 18:15:23 +0000 (21:15 +0300)
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 <kbastian@mail.uni-paderborn.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230721060605.76636-1-kbastian@mail.uni-paderborn.de>
(cherry picked from commit f8cfdd2038c1823301e6df753242e465b1dc8539)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(Mjt: update context in target/tricore/cpu.c, target/tricore/op_helper.c, drop chunks in target/tricore/helper.c)

target/tricore/cpu.c
target/tricore/cpu.h
target/tricore/op_helper.c

index 2c54a2825f8d2d0f031846912a1d16a17f979540..0594d3843b6cbbe6ce7972a060f44a83444be641 100644 (file)
@@ -100,14 +100,14 @@ static void tricore_cpu_realizefn(DeviceState *dev, Error **errp)
     }
 
     /* Some features automatically imply others */
-    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);
index 3b9c533a7c3b10756b6ad3608110a3340b006666..2e122b44a76b526ef4b83a9045cfcae6b763ccb4 100644 (file)
@@ -269,7 +269,7 @@ enum tricore_features {
     TRICORE_FEATURE_161,
 };
 
-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;
 }
index 532ae6b74c79c566fd8d15a84095669fc8dd7316..676529f754efe931a2d44a0a158af5369978e33b 100644 (file)
@@ -2528,7 +2528,7 @@ void helper_ret(CPUTriCoreState *env)
     /* PCXI = new_PCXI; */
     env->PCXI = new_PCXI;
 
-    if (tricore_feature(env, TRICORE_FEATURE_13)) {
+    if (tricore_has_feature(env, TRICORE_FEATURE_13)) {
         /* PSW = new_PSW */
         psw_write(env, new_PSW);
     } else {
@@ -2639,7 +2639,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;
     }
 }