use is_log_level_active to check if logging is enabled

This commit is contained in:
Christoph Hindermann 2024-07-17 20:56:44 +02:00
parent 449950cac7
commit 667084153b

View File

@ -3728,7 +3728,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
TCGOp *op; TCGOp *op;
#ifndef NDEBUG #ifndef NDEBUG
if (getenv("UNICORN_DEBUG")) { if (is_log_level_active(CPU_LOG_TB_IN_ASM)) {
tcg_dump_ops(s, false, "TCG before optimization:"); tcg_dump_ops(s, false, "TCG before optimization:");
} }
#endif #endif
@ -3777,7 +3777,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
#endif #endif
#ifndef NDEBUG #ifndef NDEBUG
if (getenv("UNICORN_DEBUG")) { if (is_log_level_active(CPU_LOG_TB_IN_ASM)) {
tcg_dump_ops(s, false, "TCG before codegen:"); tcg_dump_ops(s, false, "TCG before codegen:");
} }
#endif #endif