fix sse/x87 fixup code added at wrong places
[libfirm] / ir / be / ia32 / ia32_emitter.c
index c8e1c92..1ccd8a1 100644 (file)
@@ -662,6 +662,11 @@ void ia32_emit_am(ia32_emit_env_t *env, const ir_node *node) {
                }
                be_emit_char(env, ')');
        }
+
+       /* special case if nothing is set */
+       if(ent == NULL && offs == 0 && !has_base && !has_index) {
+               be_emit_char(env, '0');
+       }
 }
 
 /*************************************************
@@ -1405,7 +1410,7 @@ void emit_ia32_Immediate(ia32_emit_env_t *env, const ir_node *node)
        if(attr->symconst == NULL || attr->offset != 0) {
                if(attr->symconst != NULL)
                        be_emit_char(env, '+');
-               be_emit_irprintf(env->emit, "%d", attr->offset);
+               be_emit_irprintf(env->emit, "0x%X", attr->offset);
        }
 }