1 static void fprintf_tv(FILE *F, tarval *tv, int brackets) {
3 tarval_snprintf(buf, sizeof(buf), tv);
6 fprintf(F, "[%s]", buf);
11 const char *get_sc_name(ir_node *symc) {
12 if (get_irn_opcode(symc) != iro_SymConst)
15 switch (get_SymConst_kind(symc)) {
16 case symconst_addr_name:
17 return get_id_str(get_SymConst_name(symc));
19 case symconst_addr_ent:
20 return get_entity_ld_name(get_SymConst_entity(symc));
23 assert(!"Unsupported SymConst");
27 static int dump_node_ia32(ir_node *n, FILE *F, dump_reason_t reason) {
33 case dump_node_opcode_txt:
34 name = get_irn_opname(n);
35 fprintf(F, "%s", name);
38 case dump_node_mode_txt:
39 mode = get_irn_mode(n);
41 if (mode == mode_BB || mode == mode_ANY || mode == mode_BAD || mode == mode_T) {
44 else if (is_ia32_Load(n)) {
45 mode = get_irn_mode(get_irn_n(n, 1));
47 else if (is_ia32_Store(n)) {
48 mode = get_irn_mode(get_irn_n(n, 2));
52 fprintf(F, "[%s]", get_mode_name(mode));
55 case dump_node_nodeattr_txt:
56 name = get_irn_opname(n);
57 p = name + strlen(name) - 2;
58 if (p[0] == '_' && p[1] == 'i') {
59 tarval *tv = get_Immop_tarval(n);
63 fprintf(F, "[SymC &%s]", get_sc_name(get_old_ir(n)));
66 else if (is_ia32_Call(n)) {
67 ir_node *old_call = get_old_ir(n);
68 ir_node *old_imm = get_Call_ptr(old_call);
70 fprintf(F, "&%s ", get_sc_name(get_Imm_sc(old_imm)));
74 case dump_node_info_txt:
76 tarval *o = get_ia32_Lea_offs(n);
77 tarval *tv = get_Immop_tarval(n);
82 fprintf(F, "(%s, %s", get_irn_opname(get_irn_n(n, 0)), get_irn_opname(get_irn_n(n, 1)));