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/exp_attr.adb | |
parent | ad018b0cbec171fc39a144fb42471d2d99c64ffb (diff) | |
download | gcc-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/exp_attr.adb')
-rw-r--r-- | gcc/ada/exp_attr.adb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index 0c43d595207..b9d7ee1f1df 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -35,6 +35,7 @@ with Exp_Pakd; use Exp_Pakd; with Exp_Strm; use Exp_Strm; with Exp_Tss; use Exp_Tss; with Exp_Util; use Exp_Util; +with Exp_VFpt; use Exp_VFpt; with Gnatvsn; use Gnatvsn; with Hostparm; use Hostparm; with Lib; use Lib; @@ -3826,13 +3827,20 @@ package body Exp_Attr is Rtp : constant Entity_Id := Root_Type (Etype (Pref)); begin + -- For vax fpt types, call appropriate routine in special vax + -- floating point unit. We do not have to worry about loads in + -- this case, since these types have no signalling NaN's. + + if Vax_Float (Rtp) then + Expand_Vax_Valid (N); + -- If the floating-point object might be unaligned, we need -- to call the special routine Unaligned_Valid, which makes -- the needed copy, being careful not to load the value into -- any floating-point register. The argument in this case is -- obj'Address (see Unchecked_Valid routine in s-fatgen.ads). - if Is_Possibly_Unaligned_Object (Pref) then + elsif Is_Possibly_Unaligned_Object (Pref) then Set_Attribute_Name (N, Name_Unaligned_Valid); Expand_Fpt_Attribute (N, Rtp, Name_Unaligned_Valid, @@ -3842,7 +3850,7 @@ package body Exp_Attr is Attribute_Name => Name_Address))); -- In the normal case where we are sure the object is aligned, - -- we generate a caqll to Valid, and the argument in this case + -- we generate a call to Valid, and the argument in this case -- is obj'Unrestricted_Access (after converting obj to the -- right floating-point type). |