* src/vm/jit/emit-common.c (emit_bccz) [STATISTICS]: Is called
authortwisti <none@none>
Thu, 14 Jun 2007 16:51:44 +0000 (16:51 +0000)
committertwisti <none@none>
Thu, 14 Jun 2007 16:51:44 +0000 (16:51 +0000)
ENABLE_STATISTICS.
(emit_label_bccz): Likewise.
(emit_label): Likewise.

src/vm/jit/emit-common.c

index e9ddcf1bbab381cca97679cb0421654c9633fda8..c02566c5396a6db4f2efa38c1041c710087faa48 100644 (file)
@@ -270,15 +270,16 @@ void emit_bccz(codegendata *cd, basicblock *target, s4 condition, s4 reg, u4 opt
                branchmpc = cd->mcodeptr - cd->mcodebase;
                disp      = target->mpc - branchmpc;
 
-               #if defined(STATISTICS)
-                       count_emit_branch++;
-                       if ((int8_t)disp == disp)  count_emit_branch_8bit++; 
-                       else if ((int16_t)disp == disp) count_emit_branch_16bit++;
-                       else if ((int32_t)disp == disp) count_emit_branch_32bit++;
-                       #if (SIZEOF_VOID_P == 8)
-                       else if ((int64_t)disp == disp) count_emit_branch_64bit++;
-                       #endif
-               #endif
+#if defined(ENABLE_STATISTICS)
+               count_emit_branch++;
+               if ((int8_t)disp == disp)  count_emit_branch_8bit++; 
+               else if ((int16_t)disp == disp) count_emit_branch_16bit++;
+               else if ((int32_t)disp == disp) count_emit_branch_32bit++;
+# if SIZEOF_VOID_P == 8
+               else if ((int64_t)disp == disp) count_emit_branch_64bit++;
+# endif
+#endif
+
                emit_branch(cd, disp, condition, reg, options);
        }
        else {
@@ -490,15 +491,16 @@ void emit_label_bccz(codegendata *cd, s4 label, s4 condition, s4 reg, u4 options
                mpc  = cd->mcodeptr - cd->mcodebase;
                disp = br->mpc - mpc;
 
-               #if defined(STATISTICS)
-                       count_emit_branch++;
-                       if ((int8_t)disp == disp)  count_emit_branch_8bit++; 
-                       else if ((int16_t)disp == disp) count_emit_branch_16bit++;
-                       else if ((int32_t)disp == disp) count_emit_branch_32bit++;
-                       #if (SIZEOF_VOID_P == 8)
-                       else if ((int64_t)disp == disp) count_emit_branch_64bit++;
-                       #endif
-               #endif
+#if defined(ENABLE_STATISTICS)
+               count_emit_branch++;
+               if ((int8_t)disp == disp)  count_emit_branch_8bit++; 
+               else if ((int16_t)disp == disp) count_emit_branch_16bit++;
+               else if ((int32_t)disp == disp) count_emit_branch_32bit++;
+# if SIZEOF_VOID_P == 8
+               else if ((int64_t)disp == disp) count_emit_branch_64bit++;
+# endif
+#endif
+
                emit_branch(cd, disp, condition, reg, options);
 
                /* now remove the branch reference */
@@ -560,15 +562,16 @@ void emit_label(codegendata *cd, s4 label)
                mcodeptr     = cd->mcodeptr;
                cd->mcodeptr = cd->mcodebase + br->mpc;
 
-               #if defined(STATISTICS)
-                       count_emit_branch++;
-                       if ((int8_t)disp == disp)  count_emit_branch_8bit++; 
-                       else if ((int16_t)disp == disp) count_emit_branch_16bit++;
-                       else if ((int32_t)disp == disp) count_emit_branch_32bit++;
-                       #if (SIZEOF_VOID_P == 8)
-                       else if ((int64_t)disp == disp) count_emit_branch_64bit++;
-                       #endif
-               #endif
+#if defined(ENABLE_STATISTICS)
+               count_emit_branch++;
+               if ((int8_t)disp == disp)  count_emit_branch_8bit++; 
+               else if ((int16_t)disp == disp) count_emit_branch_16bit++;
+               else if ((int32_t)disp == disp) count_emit_branch_32bit++;
+# if SIZEOF_VOID_P == 8
+               else if ((int64_t)disp == disp) count_emit_branch_64bit++;
+# endif
+#endif
+
                emit_branch(cd, disp, br->condition, br->reg, br->options);
 
                /* restore mcodeptr */