From: Matthias Braun Date: Sat, 14 Jul 2007 15:05:45 +0000 (+0000) Subject: ad-hoc fix for lfoat compares (this is not mallons optimal solution yet) X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=3e83d9824a9cf1b7c6a59caf436c1d0c5a63b869;p=libfirm ad-hoc fix for lfoat compares (this is not mallons optimal solution yet) [r15142] --- diff --git a/ir/be/ia32/ia32_emitter.c b/ir/be/ia32/ia32_emitter.c index 801c05e1d..715f6a41e 100644 --- a/ir/be/ia32/ia32_emitter.c +++ b/ir/be/ia32/ia32_emitter.c @@ -675,14 +675,6 @@ const struct cmp2conditon_t cmp2condition_s[] = { { "ge", pn_Cmp_Ge }, /* >= */ { "ne", pn_Cmp_Lg }, /* != */ { NULL, pn_Cmp_Leg}, /* Floating point: ordered */ - { NULL, pn_Cmp_Uo }, /* Floating point: unordered */ - { "e", pn_Cmp_Ue }, /* Floating point: unordered or == */ - { "b", pn_Cmp_Ul }, /* Floating point: unordered or < */ - { "be", pn_Cmp_Ule }, /* Floating point: unordered or <= */ - { "a", pn_Cmp_Ug }, /* Floating point: unordered or > */ - { "ae", pn_Cmp_Uge }, /* Floating point: unordered or >= */ - { "ne", pn_Cmp_Ne }, /* Floating point: unordered or != */ - { NULL, pn_Cmp_True }, /* always true */ }; /* @@ -706,13 +698,13 @@ const struct cmp2conditon_t cmp2condition_u[] = { static const char *get_cmp_suffix(pn_Cmp cmp_code) { - assert( (cmp2condition_s[cmp_code & 15].num) == (cmp_code & 15)); + assert( (cmp2condition_s[cmp_code & 7].num) == (cmp_code & 7)); assert( (cmp2condition_u[cmp_code & 7].num) == (cmp_code & 7)); if((cmp_code & ia32_pn_Cmp_Unsigned)) { return cmp2condition_u[cmp_code & 7].name; } else { - return cmp2condition_s[cmp_code & 15].name; + return cmp2condition_s[cmp_code & 7].name; } } @@ -821,7 +813,7 @@ void finish_CondJmp(ia32_emit_env_t *env, const ir_node *node, ir_mode *mode, } be_emit_cstring(env, "\tj"); - ia32_emit_cmp_suffix(env, pnc); + ia32_emit_cmp_suffix(env, pnc | ia32_pn_Cmp_Unsigned); be_emit_char(env, ' '); ia32_emit_cfop_target(env, proj_true); be_emit_finish_line_gas(env, proj_true); @@ -999,7 +991,7 @@ void CMov_emitter(ia32_emit_env_t *env, const ir_node *node) } be_emit_cstring(env, "\tcmov"); - ia32_emit_cmp_suffix(env, pnc); + ia32_emit_cmp_suffix(env, pnc ); be_emit_cstring(env, "l "); ia32_emit_register(env, in1); be_emit_cstring(env, ", ");