-/**
- * Prints a tarval to file F.
- * @param F output file
- * @param tv tarval
- * @param brackets 1 == print square brackets around tarval
- */
-static void fprintf_tv(FILE *F, tarval *tv, int brackets) {
- char buf[1024];
- tarval_snprintf(buf, sizeof(buf), tv);
-
- if (brackets)
- fprintf(F, "[%s]", buf);
- else
- fprintf(F, "%s", buf);
-}
-
-/**
- * Returns the name of a SymConst.
- * @param symc the SymConst
- * @return name of the SymConst
- */
-const char *get_sc_name(ir_node *symc) {
- if (get_irn_opcode(symc) != iro_SymConst)
- return "NONE";
-
- switch (get_SymConst_kind(symc)) {
- case symconst_addr_name:
- return get_id_str(get_SymConst_name(symc));
-
- case symconst_addr_ent:
- return get_entity_ld_name(get_SymConst_entity(symc));
-
- default:
- assert(0 && "Unsupported SymConst");
- }
-
- return NULL;
-}
-
-/**
- * Returns a string containing the names of all registers within the limited bitset
- */
-static char *get_limited_regs(const arch_register_req_t *req, char *buf, int max) {
- bitset_t *bs = bitset_alloca(req->cls->n_regs);
- char *p = buf;
- int size = 0;
- int i, cnt;
-
- req->limited(NULL, bs);
-
- for (i = 0; i < req->cls->n_regs; i++) {
- if (bitset_is_set(bs, i)) {
- cnt = snprintf(p, max - size, " %s", req->cls->regs[i].name);
- if (cnt < 0) {
- fprintf(stderr, "dumper problem, exiting\n");
- exit(1);
- }
-
- p += cnt;
- size += cnt;
-
- if (size >= max)
- break;
- }
- }
-
- return buf;
-}
-