From eee248543bd61ec5c3f6aaaa23b9b0cff042fb71 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 29 Aug 2006 13:05:32 +0000 Subject: [PATCH] fix fucompp emitter when no register is needed --- ir/be/ia32/ia32_emitter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir/be/ia32/ia32_emitter.c b/ir/be/ia32/ia32_emitter.c index 579e990e8..fa2cf1336 100644 --- a/ir/be/ia32/ia32_emitter.c +++ b/ir/be/ia32/ia32_emitter.c @@ -1000,7 +1000,7 @@ static void emit_ia32_x87CondJmp(ir_node *irn, ia32_emit_env_t *env) { if (reverse) set_ia32_pncode(irn, (long)get_inversed_pnc(get_ia32_pncode(irn))); - snprintf(cmd_buf, SNPRINTF_BUF_LEN, "%s %%%s", instr, reg); + snprintf(cmd_buf, SNPRINTF_BUF_LEN, "%s %s%s", instr, reg[0] == '\0' ? "" : "%", reg); lc_esnprintf(ia32_get_arg_env(), cmnt_buf, SNPRINTF_BUF_LEN, "/* %+F */", irn); IA32_DO_EMIT(irn); lc_esnprintf(ia32_get_arg_env(), cmd_buf, SNPRINTF_BUF_LEN, "fnstsw %%ax", irn); -- 2.20.1