diff options
author | Edgar E. Iglesias <edgar.iglesias@petalogix.com> | 2010-09-09 22:05:48 +0200 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2010-09-09 22:05:48 +0200 |
commit | ef9d48da598691ca97bb3588f8bf625717f65418 (patch) | |
tree | 256b5ecba2888a3d182e153cea1a63d08d4be13f /target-microblaze/op_helper.c | |
parent | e403e433c1a30568a019cac9ba7301f8d5d7a382 (diff) | |
download | qemu-ef9d48da598691ca97bb3588f8bf625717f65418.zip qemu-ef9d48da598691ca97bb3588f8bf625717f65418.tar.gz qemu-ef9d48da598691ca97bb3588f8bf625717f65418.tar.bz2 |
microblaze: Add support for fcmp.un
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
Diffstat (limited to 'target-microblaze/op_helper.c')
-rw-r--r-- | target-microblaze/op_helper.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/target-microblaze/op_helper.c b/target-microblaze/op_helper.c index 294e08c..3d2b313 100644 --- a/target-microblaze/op_helper.c +++ b/target-microblaze/op_helper.c @@ -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) |