From 4165b4e4fdf1ef21e7c8cba5e03b723a32a8d37a Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 27 Sep 2006 11:03:40 +0000 Subject: [PATCH] don't emit +0 offsets --- ir/be/ia32/ia32_emitter.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ir/be/ia32/ia32_emitter.c b/ir/be/ia32/ia32_emitter.c index 22debe8c1..4cf0addff 100644 --- a/ir/be/ia32/ia32_emitter.c +++ b/ir/be/ia32/ia32_emitter.c @@ -653,17 +653,16 @@ const char *ia32_emit_am(const ir_node *n, ia32_emit_env_t *env) { } if (am_flav & ia32_O) { - s = get_ia32_am_offs(n); + int offs = get_ia32_am_offs_int(n); - if (s) { + if (offs != 0) { /* omit explicit + if there was no base or index */ if (! had_output) { - obstack_printf(obst, "["); - if (s[0] == '+') - s++; + obstack_printf(obst, "[%d", offs); + } else { + obstack_printf(obst, "%+d", offs); } - obstack_printf(obst, s); had_output = 1; } } -- 2.20.1