Commit 62c659ca authored by Matthias Braun's avatar Matthias Braun
Browse files

make libfirm work with strings being const char*

[r28090]
parent 502eba77
......@@ -482,9 +482,9 @@ static void debug_vcg_dump_pkg(rss_t *rss, ir_nodeset_t *max_ac, int iteration)
}
foreach_plist(rss->nodes, el) {
ir_node *irn = plist_element_get_value(el);
rss_irn_t *rirn = get_rss_irn(rss, irn);
char *c1 = "";
ir_node *irn = plist_element_get_value(el);
rss_irn_t *rirn = get_rss_irn(rss, irn);
const char *c1 = "";
plist_element_t *k_el;
/* dump selected saturating values in yellow */
......@@ -500,9 +500,9 @@ static void debug_vcg_dump_pkg(rss_t *rss, ir_nodeset_t *max_ac, int iteration)
}
foreach_plist(rirn->pkiller_list, k_el) {
ir_node *pkiller = plist_element_get_value(k_el);
rss_irn_t *pk_rirn = get_rss_irn(rss, pkiller);
char *c2 = "";
ir_node *pkiller = plist_element_get_value(k_el);
rss_irn_t *pk_rirn = get_rss_irn(rss, pkiller);
const char *c2 = "";
if (max_ac && ir_nodeset_contains(max_ac, pkiller))
c2 = "color:yellow";
......
......@@ -41,30 +41,30 @@
void ia32_build_16bit_reg_map(pmap *reg_map)
{
pmap_insert(reg_map, &ia32_registers[REG_EAX], "ax");
pmap_insert(reg_map, &ia32_registers[REG_EBX], "bx");
pmap_insert(reg_map, &ia32_registers[REG_ECX], "cx");
pmap_insert(reg_map, &ia32_registers[REG_EDX], "dx");
pmap_insert(reg_map, &ia32_registers[REG_ESI], "si");
pmap_insert(reg_map, &ia32_registers[REG_EDI], "di");
pmap_insert(reg_map, &ia32_registers[REG_EBP], "bp");
pmap_insert(reg_map, &ia32_registers[REG_ESP], "sp");
pmap_insert(reg_map, &ia32_registers[REG_EAX], (void*)"ax");
pmap_insert(reg_map, &ia32_registers[REG_EBX], (void*)"bx");
pmap_insert(reg_map, &ia32_registers[REG_ECX], (void*)"cx");
pmap_insert(reg_map, &ia32_registers[REG_EDX], (void*)"dx");
pmap_insert(reg_map, &ia32_registers[REG_ESI], (void*)"si");
pmap_insert(reg_map, &ia32_registers[REG_EDI], (void*)"di");
pmap_insert(reg_map, &ia32_registers[REG_EBP], (void*)"bp");
pmap_insert(reg_map, &ia32_registers[REG_ESP], (void*)"sp");
}
void ia32_build_8bit_reg_map(pmap *reg_map)
{
pmap_insert(reg_map, &ia32_registers[REG_EAX], "al");
pmap_insert(reg_map, &ia32_registers[REG_EBX], "bl");
pmap_insert(reg_map, &ia32_registers[REG_ECX], "cl");
pmap_insert(reg_map, &ia32_registers[REG_EDX], "dl");
pmap_insert(reg_map, &ia32_registers[REG_EAX], (void*)"al");
pmap_insert(reg_map, &ia32_registers[REG_EBX], (void*)"bl");
pmap_insert(reg_map, &ia32_registers[REG_ECX], (void*)"cl");
pmap_insert(reg_map, &ia32_registers[REG_EDX], (void*)"dl");
}
void ia32_build_8bit_reg_map_high(pmap *reg_map)
{
pmap_insert(reg_map, &ia32_registers[REG_EAX], "ah");
pmap_insert(reg_map, &ia32_registers[REG_EBX], "bh");
pmap_insert(reg_map, &ia32_registers[REG_ECX], "ch");
pmap_insert(reg_map, &ia32_registers[REG_EDX], "dh");
pmap_insert(reg_map, &ia32_registers[REG_EAX], (void*)"ah");
pmap_insert(reg_map, &ia32_registers[REG_EBX], (void*)"bh");
pmap_insert(reg_map, &ia32_registers[REG_ECX], (void*)"ch");
pmap_insert(reg_map, &ia32_registers[REG_EDX], (void*)"dh");
}
const char *ia32_get_mapped_reg_name(pmap *reg_map, const arch_register_t *reg)
......
......@@ -311,13 +311,13 @@ void dump_graph_as_text(FILE *out, ir_graph *irg)
* "prefix" node8, ... node15,\n
* "prefix" node16, node17\n
*/
static void dump_node_list(FILE *F, firm_kind *k, char *prefix,
static void dump_node_list(FILE *F, firm_kind *k, const char *prefix,
int (*get_entity_n_nodes)(firm_kind *ent),
ir_node *(*get_entity_node)(firm_kind *ent, int pos),
char *name)
const char *name)
{
int i, n_nodes = get_entity_n_nodes(k);
char *comma = "";
const char *comma = "";
fprintf(F, "%s %s (%d):", prefix, name, n_nodes);
for (i = 0; i < n_nodes; ++i) {
......@@ -338,13 +338,13 @@ static void dump_node_list(FILE *F, firm_kind *k, char *prefix,
* "prefix" node8, ... node15,\n
* "prefix" node16, node17\n
*/
static void dump_type_list(FILE *F, ir_type *tp, char *prefix,
static void dump_type_list(FILE *F, ir_type *tp, const char *prefix,
int (*get_n_types)(const ir_type *tp),
ir_type *(*get_type)(const ir_type *tp, int pos),
const char *name)
{
int i, n_nodes = get_n_types(tp);
char *comma = "";
const char *comma = "";
fprintf(F, "%s %s (%d):", prefix, name, n_nodes);
for (i = 0; i < n_nodes; ++i) {
......@@ -446,7 +446,7 @@ static void dump_entity_linkage(FILE *F, const ir_entity *entity)
fprintf(F, " hidden_user");
}
static void dump_entity_to_file_prefix(FILE *F, ir_entity *ent, char *prefix)
static void dump_entity_to_file_prefix(FILE *F, ir_entity *ent, const char *prefix)
{
int i, j;
ir_type *owner, *type;
......
......@@ -207,7 +207,7 @@ static int is_nice_value(ir_node *n)
* @param txt a text to describe the set
* @param block the owner block of the set
*/
static void dump_value_set(ir_valueset_t *set, char *txt, ir_node *block)
static void dump_value_set(ir_valueset_t *set, const char *txt, ir_node *block)
{
ir_valueset_iterator_t iter;
ir_node *value, *expr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment