#include "irprintf.h"
#include "pset.h"
#include "iterator.h"
+#include "bitset.h"
/**
{
char fmt_str[16];
snprintf(fmt_str, sizeof(fmt_str), "%%%s%c", len_str, ch);
- vsnprintf(buf, sizeof(buf), fmt_str, args);
+
+ switch(len) {
+ case len_char:
+ case len_short:
+ case len_int:
+ {
+ int arg = va_arg(args, int);
+ snprintf(buf, sizeof(buf), fmt_str, arg);
+ }
+ break;
+
+ case len_long:
+ {
+ long arg = va_arg(args, long);
+ snprintf(buf, sizeof(buf), fmt_str, arg);
+ }
+ break;
+
+ case len_long_long:
+ {
+ long long arg = va_arg(args, long long);
+ snprintf(buf, sizeof(buf), fmt_str, arg);
+ }
+ break;
+ }
}
break;
str = get_mode_name(va_arg(args, ir_mode *));
break;
- case 'b':
+ case 'B':
snprintf(buf, sizeof(buf), "%ld",
get_irn_node_nr(get_nodes_block(va_arg(args, ir_node *))));
break;
+ case 'b':
+ {
+ const bitset_t *bs = va_arg(args, const bitset_t *);
+ const char *prefix = "";
+ unsigned long i;
+
+ DUMP_CH('[');
+ for(i = bitset_next_set(bs, 0); i != -1; i = bitset_next_set(bs, i + 1)) {
+ snprintf(buf, sizeof(buf), "%ld", i);
+ DUMP_STR(prefix);
+ DUMP_STR(buf);
+ prefix = ", ";
+ }
+ DUMP_CH(']');
+ buf[0] = '\0';
+ }
+ break;
+
case '*':
{
iterator_t *it = va_arg(args, iterator_t *);
* - @%e An entity name.
* - @%E An entity ld_name.
* - @%n A full description of a node.
- * - @%o The opcode name of an ir node.
+ * - @%O The opcode name of an ir node.
* - @%m The mode name of an ir mode.
* - @%N The node number of an ir node.
- * - @%b The block node number of the nodes block.
+ * - @%B The block node number of the nodes block.
+ * - @%b A bitset.
* - @%t A tarval.
*
* Each of these can be prepended by a '+' which means, that the given