aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-vaflop.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2005-11-15 14:51:27 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2005-11-15 14:51:27 +0100
commit0d268911a44bf4ecc845f4f1c212999d3d751ca4 (patch)
treee54b0d0f1f3af51f07c6e177453dbe50f24fccea /gcc/ada/s-vaflop.adb
parentf02b8bb877f4e1000c92df67b4a8b5b1efc263bd (diff)
downloadgcc-0d268911a44bf4ecc845f4f1c212999d3d751ca4.zip
gcc-0d268911a44bf4ecc845f4f1c212999d3d751ca4.tar.gz
gcc-0d268911a44bf4ecc845f4f1c212999d3d751ca4.tar.bz2
exp_vfpt.adb: Handle /= case
2005-11-14 Robert Dewar <dewar@adacore.com> * exp_vfpt.adb: Handle /= case (Expand_Vax_Conversion): Properly recognize Conversion_OK flag so that we do not get duplicate scaling for fixed point conversions. * s-vaflop.ads, s-vaflop.adb: (Ne_F): New function From-SVN: r106951
Diffstat (limited to 'gcc/ada/s-vaflop.adb')
-rw-r--r--gcc/ada/s-vaflop.adb26
1 files changed, 22 insertions, 4 deletions
diff --git a/gcc/ada/s-vaflop.adb b/gcc/ada/s-vaflop.adb
index ae721cf..3cf96e2 100644
--- a/gcc/ada/s-vaflop.adb
+++ b/gcc/ada/s-vaflop.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1997-2005 Free Software Foundation, Inc. --
+-- Copyright (C) 1997-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -310,6 +310,24 @@ package body System.Vax_Float_Operations is
return X * Y;
end Mul_G;
+ ----------
+ -- Ne_F --
+ ----------
+
+ function Ne_F (X, Y : F) return Boolean is
+ begin
+ return X /= Y;
+ end Ne_F;
+
+ ----------
+ -- Ne_G --
+ ----------
+
+ function Ne_G (X, Y : G) return Boolean is
+ begin
+ return X /= Y;
+ end Ne_G;
+
-----------
-- Neg_F --
-----------
@@ -426,7 +444,7 @@ package body System.Vax_Float_Operations is
-- accurate, but is good enough in practice.
function Valid_D (Arg : D) return Boolean is
- Val : T := G_To_T (D_To_G (Arg));
+ Val : constant T := G_To_T (D_To_G (Arg));
begin
return Val'Valid;
end Valid_D;
@@ -439,7 +457,7 @@ package body System.Vax_Float_Operations is
-- accurate, but is good enough in practice.
function Valid_F (Arg : F) return Boolean is
- Val : S := F_To_S (Arg);
+ Val : constant S := F_To_S (Arg);
begin
return Val'Valid;
end Valid_F;
@@ -452,7 +470,7 @@ package body System.Vax_Float_Operations is
-- accurate, but is good enough in practice.
function Valid_G (Arg : G) return Boolean is
- Val : T := G_To_T (Arg);
+ Val : constant T := G_To_T (Arg);
begin
return Val'Valid;
end Valid_G;