diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-05 07:53:10 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-05 07:53:10 +0000 |
commit | 6e62b6c3b01ad9adc92f4bbed7e97677b1fbcb07 (patch) | |
tree | 3618aae5514f82a3f4fba73b73fe7fdd4c483062 /gcc/ada/s-vaflop.adb | |
parent | ad018b0cbec171fc39a144fb42471d2d99c64ffb (diff) | |
download | ppe42-gcc-6e62b6c3b01ad9adc92f4bbed7e97677b1fbcb07.tar.gz ppe42-gcc-6e62b6c3b01ad9adc92f4bbed7e97677b1fbcb07.zip |
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.adb')
-rw-r--r-- | gcc/ada/s-vaflop.adb | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/gcc/ada/s-vaflop.adb b/gcc/ada/s-vaflop.adb index 02666de4f8e..ae721cfa33d 100644 --- a/gcc/ada/s-vaflop.adb +++ b/gcc/ada/s-vaflop.adb @@ -41,7 +41,7 @@ with System.IO; use System.IO; package body System.Vax_Float_Operations is pragma Warnings (Off); - -- Warnings about infinite recursion when the -gnatdm switch is used. + -- Warnings about infinite recursion when the -gnatdm switch is used ----------- -- Abs_F -- @@ -418,4 +418,43 @@ package body System.Vax_Float_Operations is return G (X); end T_To_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; |