call set_store first before (potentially) creating stores
authorMatthias Braun <matze@braunis.de>
Tue, 12 Aug 2008 08:43:56 +0000 (08:43 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 12 Aug 2008 08:43:56 +0000 (08:43 +0000)
[r21111]

ast2firm.c

index 1b34c2c..e9d4267 100644 (file)
@@ -4714,6 +4714,11 @@ static void asm_statement_to_firm(const asm_statement_t *statement)
        }
 
        /* create output projs & connect them */
+       if (needs_memory) {
+               ir_node *projm = new_Proj(node, mode_M, out_size+1);
+               set_store(projm);
+       }
+
        size_t i;
        for (i = 0; i < out_size; ++i) {
                const expression_t *out_expr = out_exprs[i];
@@ -4724,10 +4729,6 @@ static void asm_statement_to_firm(const asm_statement_t *statement)
 
                set_value_for_expression_addr(out_expr, proj, addr);
        }
-       if (needs_memory) {
-               ir_node *projm = new_Proj(node, mode_M, i);
-               set_store(projm);
-       }
 }
 
 static void    ms_try_statement_to_firm(ms_try_statement_t *statement) {