reorganize beabi - save wether we are using omit_fp in the stack_layout structure
[libfirm] / ir / be / ia32 / ia32_dbg_stat.h
index b51b5fd..5701e5a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -29,8 +29,7 @@
 #include "irhooks.h"
 #include "dbginfo_t.h"
 #include "firmstat.h"
-
-#define SIZ(x)    sizeof(x)/sizeof((x)[0])
+#include "util.h"
 
 /**
  * Merge the debug info due to a LEA creation.
  * @param oldn2  an additional old node
  * @param n      the new lea
  */
-#define DBG_OPT_LEA2(oldn1, oldn2, n)                              \
-       do {                                                           \
-               ir_node *ons[2];                                           \
-               ons[0] = oldn1;                                            \
-               ons[1] = oldn2;                                            \
-               hook_merge_nodes(&n, 1, ons, SIZ(ons), FS_BE_IA32_LEA);    \
-               __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_backend);  \
+#define DBG_OPT_LEA2(oldn1, oldn2, n)                                    \
+       do {                                                                 \
+               ir_node *ons[2];                                                 \
+               ons[0] = oldn1;                                                  \
+               ons[1] = oldn2;                                                  \
+               hook_merge_nodes(&n, 1, ons, ARRAY_SIZE(ons), FS_BE_IA32_LEA);   \
+               __dbg_info_merge_sets(&n, 1, ons, ARRAY_SIZE(ons), dbg_backend); \
        } while(0)
 
 /**
  * @param oldn3  an additional old node
  * @param n      the new lea
  */
-#define DBG_OPT_LEA3(oldn1, oldn2, oldn3, n)                       \
-       do {                                                           \
-               ir_node *ons[3];                                           \
-               ons[0] = oldn1;                                            \
-               ons[1] = oldn2;                                            \
-               ons[2] = oldn3;                                            \
-               hook_merge_nodes(&n, 1, ons, SIZ(ons), FS_BE_IA32_LEA);    \
-               __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_backend);  \
+#define DBG_OPT_LEA3(oldn1, oldn2, oldn3, n)                             \
+       do {                                                                 \
+               ir_node *ons[3];                                                 \
+               ons[0] = oldn1;                                                  \
+               ons[1] = oldn2;                                                  \
+               ons[2] = oldn3;                                                  \
+               hook_merge_nodes(&n, 1, ons, ARRAY_SIZE(ons), FS_BE_IA32_LEA);   \
+               __dbg_info_merge_sets(&n, 1, ons, ARRAY_SIZE(ons), dbg_backend); \
        } while(0)
 
 /**
  * @param oldn4  an additional old node
  * @param n      the new lea
  */
-#define DBG_OPT_LEA4(oldn1, oldn2, oldn3, oldn4, n)                \
-       do {                                                           \
-               ir_node *ons[4];                                           \
-               ons[0] = oldn1;                                            \
-               ons[1] = oldn2;                                            \
-               ons[2] = oldn3;                                            \
-               ons[3] = oldn4;                                            \
-               hook_merge_nodes(&n, 1, ons, SIZ(ons), FS_BE_IA32_LEA);    \
-               __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_backend);  \
+#define DBG_OPT_LEA4(oldn1, oldn2, oldn3, oldn4, n)                      \
+       do {                                                                 \
+               ir_node *ons[4];                                                 \
+               ons[0] = oldn1;                                                  \
+               ons[1] = oldn2;                                                  \
+               ons[2] = oldn3;                                                  \
+               ons[3] = oldn4;                                                  \
+               hook_merge_nodes(&n, 1, ons, ARRAY_SIZE(ons), FS_BE_IA32_LEA);   \
+               __dbg_info_merge_sets(&n, 1, ons, ARRAY_SIZE(ons), dbg_backend); \
        } while(0)
 
 /**
  * @param store  the old store
  * @param n      the new op
  */
-#define DBG_OPT_AM_D(load, store, n)                               \
-       do {                                                           \
-               ir_node *ons[2];                                           \
-               ons[0] = load;                                             \
-               ons[1] = store;                                            \
-               hook_merge_nodes(&n, 1, ons, SIZ(ons), FS_BE_IA32_AM_D);   \
-               __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_backend);  \
+#define DBG_OPT_AM_D(load, store, n)                                     \
+       do {                                                                 \
+               ir_node *ons[2];                                                 \
+               ons[0] = load;                                                   \
+               ons[1] = store;                                                  \
+               hook_merge_nodes(&n, 1, ons, ARRAY_SIZE(ons), FS_BE_IA32_AM_D);  \
+               __dbg_info_merge_sets(&n, 1, ons, ARRAY_SIZE(ons), dbg_backend); \
        } while(0)
 
 /**