added used_x87 flag, so the x87 simulator runs only if fp
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 28 Mar 2006 17:10:14 +0000 (17:10 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 28 Mar 2006 17:10:14 +0000 (17:10 +0000)
code was emitted

ir/be/ia32/bearch_ia32.c
ir/be/ia32/bearch_ia32_t.h

index 0c7f21b..b113839 100644 (file)
@@ -681,7 +681,7 @@ static void ia32_after_ra(void *self) {
        irg_walk_blkwise_graph(cg->irg, NULL, ia32_after_ra_walker, self);
 
        /* if we do x87 code generation, rewrite all the virtual instructions and registers */
-       if (USE_x87(cg)) {
+       if (cg->used_x87) {
                x87_simulate_graph(cg->arch_env, cg->irg, cg->blk_sched);
                be_dump(cg->irg, "-x87", dump_ir_extblock_graph_sched);
        }
@@ -745,11 +745,13 @@ static void *ia32_cg_init(FILE *F, const be_irg_t *birg) {
        cg->birg      = birg;
        cg->blk_sched = NULL;
        cg->fp_kind   = isa->fp_kind;
+       cg->used_x87  = 0;
+
        FIRM_DBG_REGISTER(cg->mod, "firm.be.ia32.cg");
 
        /* set optimizations */
        cg->opt.incdec    = 0;
-       cg->opt.doam      = USE_SSE2(cg) ? 1 : 0;
+       cg->opt.doam      = 1;
        cg->opt.placecnst = 1;
        cg->opt.immops    = 1;
        cg->opt.extbb     = 1;
index 8258b3a..2329eea 100644 (file)
@@ -51,6 +51,7 @@ typedef struct _ia32_code_gen_t {
        ir_node                        **blk_sched;    /**< an array containing the scheduled blocks */
        ia32_optimize_t                 opt;           /**< contains optimization information */
        char                            fp_kind;       /**< floating point kind */
+       char                            used_x87;      /**< x87 floating point unit used in this graph */
 } ia32_code_gen_t;
 
 typedef struct _ia32_isa_t {