summaryrefslogtreecommitdiff
path: root/gcc/ada/s-vaflop-vms-alpha.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-05 07:53:10 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-05 07:53:10 +0000
commit6e62b6c3b01ad9adc92f4bbed7e97677b1fbcb07 (patch)
tree3618aae5514f82a3f4fba73b73fe7fdd4c483062 /gcc/ada/s-vaflop-vms-alpha.adb
parentad018b0cbec171fc39a144fb42471d2d99c64ffb (diff)
downloadgcc-6e62b6c3b01ad9adc92f4bbed7e97677b1fbcb07.tar.gz
2005-09-01 Robert Dewar <dewar@adacore.com>
Doug Rupp <rupp@adacore.com> * exp_attr.adb: Handle vax fpt for 'Valid attribute * exp_vfpt.ads, exp_vfpt.adb: (Expand_Vax_Valid): New procedure * s-vaflop-vms-alpha.adb, s-vaflop.ads, s-vaflop.adb (Valid_D, Valid_F, Valid_G): New functions git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103860 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-vaflop-vms-alpha.adb')
-rw-r--r--gcc/ada/s-vaflop-vms-alpha.adb41
1 files changed, 40 insertions, 1 deletions
diff --git a/gcc/ada/s-vaflop-vms-alpha.adb b/gcc/ada/s-vaflop-vms-alpha.adb
index d778187ed57..45a39bba08b 100644
--- a/gcc/ada/s-vaflop-vms-alpha.adb
+++ b/gcc/ada/s-vaflop-vms-alpha.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1997-2000 Free Software Foundation, Inc. --
+-- Copyright (C) 1997-2005 Free Software Foundation, Inc. --
-- (Version for Alpha OpenVMS) --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
@@ -618,4 +618,43 @@ package body System.Vax_Float_Operations is
return R1;
end Sub_G;
+ -------------
+ -- Valid_D --
+ -------------
+
+ -- For now, convert to IEEE and do Valid test on result. This is not quite
+ -- accurate, but is good enough in practice.
+
+ function Valid_D (Arg : D) return Boolean is
+ Val : T := G_To_T (D_To_G (Arg));
+ begin
+ return Val'Valid;
+ end Valid_D;
+
+ -------------
+ -- Valid_F --
+ -------------
+
+ -- For now, convert to IEEE and do Valid test on result. This is not quite
+ -- accurate, but is good enough in practice.
+
+ function Valid_F (Arg : F) return Boolean is
+ Val : S := F_To_S (Arg);
+ begin
+ return Val'Valid;
+ end Valid_F;
+
+ -------------
+ -- Valid_G --
+ -------------
+
+ -- For now, convert to IEEE and do Valid test on result. This is not quite
+ -- accurate, but is good enough in practice.
+
+ function Valid_G (Arg : G) return Boolean is
+ Val : T := G_To_T (Arg);
+ begin
+ return Val'Valid;
+ end Valid_G;
+
end System.Vax_Float_Operations;