projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove strange init_once/inited checks from arch_init functions. Calling it twice...
[libfirm]
/
ir
/
be
/
ia32
/
bearch_ia32.c
diff --git
a/ir/be/ia32/bearch_ia32.c
b/ir/be/ia32/bearch_ia32.c
index
01b8130
..
d7749f4
100644
(file)
--- a/
ir/be/ia32/bearch_ia32.c
+++ b/
ir/be/ia32/bearch_ia32.c
@@
-97,7
+97,7
@@
transformer_t be_transformer = TRANSFORMER_DEFAULT;
DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
-ir_mode *mode_fpcw = NULL;
+ir_mode *
ia32_
mode_fpcw = NULL;
/** The current omit-fp state */
static unsigned ia32_curr_fp_ommitted = 0;
/** The current omit-fp state */
static unsigned ia32_curr_fp_ommitted = 0;
@@
-851,7
+851,7
@@
static void ia32_prepare_graph(ir_graph *irg)
dump_ir_graph(irg, "place");
}
dump_ir_graph(irg, "place");
}
-ir_node *turn_back_am(ir_node *node)
+ir_node *
ia32_
turn_back_am(ir_node *node)
{
dbg_info *dbgi = get_irn_dbg_info(node);
ir_graph *irg = get_irn_irg(node);
{
dbg_info *dbgi = get_irn_dbg_info(node);
ir_graph *irg = get_irn_irg(node);
@@
-929,7
+929,7
@@
static ir_node *flags_remat(ir_node *node, ir_node *after)
type = get_ia32_op_type(node);
switch (type) {
case ia32_AddrModeS:
type = get_ia32_op_type(node);
switch (type) {
case ia32_AddrModeS:
- turn_back_am(node);
+
ia32_
turn_back_am(node);
break;
case ia32_AddrModeD:
break;
case ia32_AddrModeD:
@@
-1348,7
+1348,7
@@
static void ia32_finish(ir_graph *irg)
/* we might have to rewrite x87 virtual registers */
if (irg_data->do_x87_sim) {
/* we might have to rewrite x87 virtual registers */
if (irg_data->do_x87_sim) {
- x87_simulate_graph(irg);
+
ia32_
x87_simulate_graph(irg);
}
/* do peephole optimisations */
}
/* do peephole optimisations */
@@
-1518,30
+1518,21
@@
static void init_asm_constraints(void)
*/
static arch_env_t *ia32_init(FILE *file_handle)
{
*/
static arch_env_t *ia32_init(FILE *file_handle)
{
- static int inited = 0;
- ia32_isa_t *isa;
+ ia32_isa_t *isa = XMALLOC(ia32_isa_t);
int i, n;
int i, n;
- if (inited)
- return NULL;
- inited = 1;
-
set_tarval_output_modes();
set_tarval_output_modes();
- isa = XMALLOC(ia32_isa_t);
memcpy(isa, &ia32_isa_template, sizeof(*isa));
memcpy(isa, &ia32_isa_template, sizeof(*isa));
- if (mode_fpcw == NULL) {
- mode_fpcw = new_ir_mode("Fpcw", irms_int_number, 16, 0, irma_none, 0);
+ if (
ia32_
mode_fpcw == NULL) {
+
ia32_
mode_fpcw = new_ir_mode("Fpcw", irms_int_number, 16, 0, irma_none, 0);
}
ia32_register_init();
ia32_create_opcodes(&ia32_irn_ops);
be_emit_init(file_handle);
}
ia32_register_init();
ia32_create_opcodes(&ia32_irn_ops);
be_emit_init(file_handle);
- isa->regs_16bit = pmap_create();
- isa->regs_8bit = pmap_create();
- isa->regs_8bit_high = pmap_create();
isa->types = pmap_create();
isa->tv_ent = pmap_create();
isa->cpu = ia32_init_machine_description();
isa->types = pmap_create();
isa->tv_ent = pmap_create();
isa->cpu = ia32_init_machine_description();
@@
-1581,9
+1572,6
@@
static void ia32_done(void *self)
/* emit now all global declarations */
be_gas_emit_decls(isa->base.main_env);
/* emit now all global declarations */
be_gas_emit_decls(isa->base.main_env);
- pmap_destroy(isa->regs_16bit);
- pmap_destroy(isa->regs_8bit);
- pmap_destroy(isa->regs_8bit_high);
pmap_destroy(isa->tv_ent);
pmap_destroy(isa->types);
pmap_destroy(isa->tv_ent);
pmap_destroy(isa->types);