Skip to content

Commit 23a9063

Browse files
refactor(target/arm/tcg): gate get_arm_cp_reginfo return value assertions behind ifdef
1 parent 314eda3 commit 23a9063

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

target/arm/tcg/op_helper.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,9 @@ const void *HELPER(access_check_cp_reg)(CPUARMState *env, uint32_t key,
766766
int target_el;
767767
uint32_t excp;
768768

769-
assert(ri != NULL);
769+
#ifdef CONFIG_DEBUG_TCG
770+
g_assert(ri != NULL);
771+
#endif
770772

771773
if (arm_feature(env, ARM_FEATURE_XSCALE) && ri->cp < 14
772774
&& extract32(env->cp15.c15_cpar, ri->cp, 1) == 0) {
@@ -918,7 +920,9 @@ const void *HELPER(lookup_cp_reg)(CPUARMState *env, uint32_t key)
918920
ARMCPU *cpu = env_archcpu(env);
919921
const ARMCPRegInfo *ri = get_arm_cp_reginfo(cpu->cp_regs, key);
920922

921-
assert(ri != NULL);
923+
#ifdef CONFIG_DEBUG_TCG
924+
g_assert(ri != NULL);
925+
#endif
922926
return ri;
923927
}
924928

0 commit comments

Comments
 (0)