ia32_transform_sub_to_neg_add() now can handle mode_T.
[libfirm] / ir / be / ia32 / ia32_emitter.c
index e5c46b7..34c75bb 100644 (file)
@@ -23,9 +23,7 @@
  * @author      Christian Wuerdig, Matthias Braun
  * @version     $Id$
  */
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include <limits.h>
 
@@ -68,7 +66,6 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 
 #define SNPRINTF_BUF_LEN 128
 
-static const arch_env_t *arch_env;
 static const ia32_isa_t *isa;
 static ia32_code_gen_t  *cg;
 static int               do_pic;
@@ -678,9 +675,11 @@ emit_S:
                                                be_emit_char('$');
                                        emit_ia32_Immediate_no_prefix(in);
                                } else {
+                                       const arch_register_t *reg;
+
                                        if (mod & EMIT_ALTERNATE_AM)
                                                be_emit_char('*');
-                                       const arch_register_t *reg = get_in_reg(node, pos);
+                                       reg = get_in_reg(node, pos);
                                        emit_register(reg, mod & EMIT_RESPECT_LS ? get_ia32_ls_mode(node) : NULL);
                                }
                                break;
@@ -2109,8 +2108,7 @@ void ia32_gen_routine(ia32_code_gen_t *ia32_cg, ir_graph *irg)
        int i, n;
 
        cg       = ia32_cg;
-       isa      = (const ia32_isa_t*) cg->arch_env;
-       arch_env = cg->arch_env;
+       isa      = cg->isa;
        do_pic   = cg->birg->main_env->options->pic;
 
        ia32_register_emitters();