]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tcg: check for CONFIG_DEBUG_TCG instead of NDEBUG
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 21 Apr 2016 08:48:50 +0000 (10:48 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 21 Apr 2016 14:43:20 +0000 (15:43 +0100)
Check for CONFIG_DEBUG_TCG instead of NDEBUG, drop now useless code.

Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Message-id: 1461228530-14852-2-git-send-email-aurelien@aurel32.net
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
tcg/aarch64/tcg-target.inc.c
tcg/arm/tcg-target.inc.c
tcg/i386/tcg-target.inc.c
tcg/ia64/tcg-target.inc.c
tcg/mips/tcg-target.inc.c
tcg/ppc/tcg-target.inc.c
tcg/s390/tcg-target.inc.c
tcg/sparc/tcg-target.inc.c
tcg/tcg.c
tcg/tci/tcg-target.inc.c

index f5f0ce3af922cfe120e614671829925d5b421520..a8fb4420defe3d3f5d6a9da14ececd19185d6d73 100644 (file)
    makes things much cleaner.  */
 QEMU_BUILD_BUG_ON(TCG_TYPE_I32 != 0 || TCG_TYPE_I64 != 1);
 
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG_TCG
 static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
     "%x0", "%x1", "%x2", "%x3", "%x4", "%x5", "%x6", "%x7",
     "%x8", "%x9", "%x10", "%x11", "%x12", "%x13", "%x14", "%x15",
     "%x16", "%x17", "%x18", "%x19", "%x20", "%x21", "%x22", "%x23",
     "%x24", "%x25", "%x26", "%x27", "%x28", "%fp", "%x30", "%sp",
 };
-#endif /* NDEBUG */
+#endif /* CONFIG_DEBUG_TCG */
 
 static const int tcg_target_reg_alloc_order[] = {
     TCG_REG_X20, TCG_REG_X21, TCG_REG_X22, TCG_REG_X23,
index 9995b74671fc8cacf05cfcda0f11fa064b045fdd..2b7fbddbf01dec55436d5146841ba4264e8fdf8d 100644 (file)
@@ -67,7 +67,7 @@ bool use_idiv_instructions;
 # define USING_SOFTMMU 0
 #endif
 
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG_TCG
 static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
     "%r0",
     "%r1",
index 65f0d4c449a000d81b9dd47d0f4c9ee4e7962f4c..007407c3fceb0731d521ae43afd6da7a8ff1d222 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "tcg-be-ldst.h"
 
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG_TCG
 static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
 #if TCG_TARGET_REG_BITS == 64
     "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
index 5233da1d6cc725f4ca747c3734d8ed3a48ccc7ad..7557e6a9d41c6ffaab6217b42cee19fefbec58db 100644 (file)
@@ -27,7 +27,7 @@
  * Register definitions
  */
 
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG_TCG
 static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
      "r0",  "r1",  "r2",  "r3",  "r4",  "r5",  "r6",  "r7",
      "r8",  "r9", "r10", "r11", "r12", "r13", "r14", "r15",
index f7194b6b5fe9d5e431c2d203b34162993d777e65..aaf881cfd0dc3f2d201192cc4e7cf7fa23784b30 100644 (file)
@@ -35,7 +35,7 @@
 #define LO_OFF    (MIPS_BE * 4)
 #define HI_OFF    (4 - LO_OFF)
 
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG_TCG
 static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
     "zero",
     "at",
index 60bcaa7f5b2245733e68fc10fcb553c710e02d7b..00bb90fc25ade5102f45c526a15e9c58a23a7210 100644 (file)
@@ -89,7 +89,7 @@ static bool have_isa_2_06;
 #define TCG_GUEST_BASE_REG 30
 #endif
 
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG_TCG
 static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
     "r0",
     "r1",
index 8b30256e4f227ee90255c6fc91a2b01494a8bf04..5805532398b10450fbad4f6dcb4972b37be94f23 100644 (file)
@@ -221,7 +221,7 @@ typedef enum S390Opcode {
     RX_STH      = 0x40,
 } S390Opcode;
 
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG_TCG
 static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
     "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7",
     "%r8", "%r9", "%r10" "%r11" "%r12" "%r13" "%r14" "%r15"
index d64daba7b565899ca1d82f693fddaf8949e961ce..d641cfd8c50315f9b526682aa317e71172d9d450 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "tcg-be-null.h"
 
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG_TCG
 static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
     "%g0",
     "%g1",
index 525d5c8063631a38b800e835c7b8be4ae1e83fd3..796addd1fc762b15c762f9c82069a225655ffd2d 100644 (file)
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
 /* Define to jump the ELF file used to communicate with GDB.  */
 #undef DEBUG_JIT
 
-#if !defined(CONFIG_DEBUG_TCG) && !defined(NDEBUG)
-/* define it to suppress various consistency checks (faster) */
-#define NDEBUG
-#endif
-
 #include "qemu/cutils.h"
 #include "qemu/host-utils.h"
 #include "qemu/timer.h"
@@ -1586,7 +1581,7 @@ static void tcg_liveness_analysis(TCGContext *s)
 }
 #endif
 
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG_TCG
 static void dump_regs(TCGContext *s)
 {
     TCGTemp *ts;
@@ -2454,7 +2449,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
             tcg_reg_alloc_op(s, def, opc, args, dead_args, sync_args);
             break;
         }
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG_TCG
         check_regs(s);
 #endif
         /* Test for (pending) buffer overflow.  The assumption is that any
index 6855ed2247ede88d9f64063c0a9d439122429b28..e2fc52a167507e856b21f9edfe8e74cc2f810b57 100644 (file)
@@ -315,7 +315,7 @@ static const int tcg_target_call_oarg_regs[] = {
 #endif
 };
 
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG_TCG
 static const char *const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
     "r00",
     "r01",