X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fia32%2Fia32_fpu.c;h=1522bf8f8c32df4f2e96a2a9b85956282b9173ea;hb=14b4e9b3f48cd53db6c3179283ce8354d5127ce1;hp=3d0c4b274ee8b8c66459982f8d4b6e9c0bce9cde;hpb=8ce557f8a7ef7f24e2a4c405e1279a43380b24df;p=libfirm diff --git a/ir/be/ia32/ia32_fpu.c b/ir/be/ia32/ia32_fpu.c index 3d0c4b274..1522bf8f8 100644 --- a/ir/be/ia32/ia32_fpu.c +++ b/ir/be/ia32/ia32_fpu.c @@ -41,14 +41,14 @@ #include "array.h" #include "../beirgmod.h" -#include "../bearch_t.h" +#include "../bearch.h" #include "../besched.h" #include "../beabi.h" -#include "../benode_t.h" +#include "../benode.h" #include "../bestate.h" #include "../beutil.h" #include "../bessaconstr.h" -#include "../beirg_t.h" +#include "../beirg.h" static ir_entity *fpcw_round = NULL; static ir_entity *fpcw_truncate = NULL; @@ -56,7 +56,7 @@ static ir_entity *fpcw_truncate = NULL; static ir_entity *create_ent(int value, const char *name) { ir_mode *mode = mode_Hu; - ir_type *type = new_type_primitive(new_id_from_str("_fpcw_type"), mode); + ir_type *type = new_type_primitive(mode); ir_type *glob = get_glob_type(); ir_graph *cnst_irg; ir_entity *ent; @@ -68,12 +68,11 @@ static ir_entity *create_ent(int value, const char *name) tv = new_tarval_from_long(value, mode); ent = new_entity(glob, new_id_from_str(name), type); set_entity_ld_ident(ent, get_entity_ident(ent)); - set_entity_visibility(ent, visibility_local); - set_entity_variability(ent, variability_constant); - set_entity_allocation(ent, allocation_static); + set_entity_visibility(ent, ir_visibility_local); + add_entity_linkage(ent, IR_LINKAGE_CONSTANT); cnst_irg = get_const_code_irg(); - cnst = new_r_Const(cnst_irg, mode, tv); + cnst = new_r_Const(cnst_irg, tv); set_atomic_ent_value(ent, cnst); return ent; @@ -115,7 +114,7 @@ static ir_node *create_fpu_mode_spill(void *env, ir_node *state, int force, set_ia32_ls_mode(spill, mode_Iu); set_ia32_use_frame(spill); - sched_add_after(after, spill); + sched_add_after(skip_Proj(after), spill); } return spill; @@ -190,11 +189,11 @@ static ir_node *create_fpu_mode_reload(void *env, ir_node *state, set_ia32_use_frame(load); sched_add_before(before, load); - load_res = new_r_Proj(irg, block, load, mode_Iu, pn_ia32_Load_res); + load_res = new_r_Proj(block, load, mode_Iu, pn_ia32_Load_res); /* TODO: make the actual mode configurable in ChangeCW... */ or_const = new_bd_ia32_Immediate(NULL, get_irg_start_block(irg), - NULL, 0, 3072); + NULL, 0, 0, 3072); arch_set_irn_register(or_const, &ia32_gp_regs[REG_GP_NOREG]); or = new_bd_ia32_Or(NULL, block, noreg, noreg, nomem, load_res, or_const);