diff options
author | Michael Meissner <gnu@the-meissners.org> | 1997-05-17 02:28:11 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1997-05-17 02:28:11 +0000 |
commit | 63aa80ff5151ee867663272a38ac3d7556408fcf (patch) | |
tree | bb6b2383207066d78f1b0badd5a8c2da796563ba /sim/common/sim-fpu.c | |
parent | 248c1fb830d34f985f4d14370b505bc320ff1d10 (diff) | |
download | gdb-63aa80ff5151ee867663272a38ac3d7556408fcf.zip gdb-63aa80ff5151ee867663272a38ac3d7556408fcf.tar.gz gdb-63aa80ff5151ee867663272a38ac3d7556408fcf.tar.bz2 |
Treat infinities like normal numbers for purposes of comparisons
Diffstat (limited to 'sim/common/sim-fpu.c')
-rw-r--r-- | sim/common/sim-fpu.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c index d2b9266..ab9986c 100644 --- a/sim/common/sim-fpu.c +++ b/sim/common/sim-fpu.c @@ -713,7 +713,7 @@ sim_fpu_is_lt (sim_fpu l, { sim_ufpu tl = fpu2ufpu (&l); sim_ufpu tr = fpu2ufpu (&r); - if (is_ufpu_number (&tl) && is_ufpu_number (&tr)) + if (!is_ufpu_nan (&tl) && !is_ufpu_nan (&tr)) return (l.val.d < r.val.d); else return 0; @@ -725,7 +725,7 @@ sim_fpu_is_le (sim_fpu l, { sim_ufpu tl = fpu2ufpu (&l); sim_ufpu tr = fpu2ufpu (&r); - if (is_ufpu_number (&tl) && is_ufpu_number (&tr)) + if (!is_ufpu_nan (&tl) && !is_ufpu_nan (&tr)) return (l.val.d <= r.val.d); else return 0; @@ -737,7 +737,7 @@ sim_fpu_is_eq (sim_fpu l, { sim_ufpu tl = fpu2ufpu (&l); sim_ufpu tr = fpu2ufpu (&r); - if (is_ufpu_number (&tl) && is_ufpu_number (&tr)) + if (!is_ufpu_nan (&tl) && !is_ufpu_nan (&tr)) return (l.val.d == r.val.d); else return 0; @@ -749,7 +749,7 @@ sim_fpu_is_ne (sim_fpu l, { sim_ufpu tl = fpu2ufpu (&l); sim_ufpu tr = fpu2ufpu (&r); - if (is_ufpu_number (&tl) && is_ufpu_number (&tr)) + if (!is_ufpu_nan (&tl) && !is_ufpu_nan (&tr)) return (l.val.d != r.val.d); else return 0; @@ -761,7 +761,7 @@ sim_fpu_is_ge (sim_fpu l, { sim_ufpu tl = fpu2ufpu (&l); sim_ufpu tr = fpu2ufpu (&r); - if (is_ufpu_number (&tl) && is_ufpu_number (&tr)) + if (!is_ufpu_nan (&tl) && !is_ufpu_nan (&tr)) return (l.val.d >= r.val.d); else return 0; @@ -773,7 +773,7 @@ sim_fpu_is_gt (sim_fpu l, { sim_ufpu tl = fpu2ufpu (&l); sim_ufpu tr = fpu2ufpu (&r); - if (is_ufpu_number (&tl) && is_ufpu_number (&tr)) + if (!is_ufpu_nan (&tl) && !is_ufpu_nan (&tr)) return (l.val.d > r.val.d); else return 0; |