提交 ef9d48da 编写于 作者: E Edgar E. Iglesias 提交者: Edgar E. Iglesias

microblaze: Add support for fcmp.un

Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@petalogix.com>
上级 e403e433
......@@ -297,8 +297,22 @@ uint32_t helper_fdiv(uint32_t a, uint32_t b)
uint32_t helper_fcmp_un(uint32_t a, uint32_t b)
{
cpu_abort(env, "Unsupported fcmp.un\n");
return 0;
CPU_FloatU fa, fb;
uint32_t r = 0;
fa.l = a;
fb.l = b;
if (float32_is_signaling_nan(fa.f) || float32_is_signaling_nan(fb.f)) {
update_fpu_flags(float_flag_invalid);
r = 1;
}
if (float32_is_nan(fa.f) || float32_is_nan(fb.f)) {
r = 1;
}
return r;
}
uint32_t helper_fcmp_lt(uint32_t a, uint32_t b)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册