aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat/s-forrea.ads
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2021-01-06 15:27:15 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2021-05-05 04:18:58 -0400
commitec80b416554d3f41b5fd23cc86287af9b9a7d2d2 (patch)
tree8b008ec1205194f2b3f53bf43f6bf2dbf5cb6a30 /gcc/ada/libgnat/s-forrea.ads
parentab3de94f09bbaec63da85cdd872f61da2a98e01f (diff)
downloadgcc-ec80b416554d3f41b5fd23cc86287af9b9a7d2d2.zip
gcc-ec80b416554d3f41b5fd23cc86287af9b9a7d2d2.tar.gz
gcc-ec80b416554d3f41b5fd23cc86287af9b9a7d2d2.tar.bz2
[Ada] Implement tiered support for floating-point output operations
gcc/ada/ * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-dourea, s-imager, s-imgflt, s-imglfl and s-imgllf. (LIBGNAT_TARGET_PAIRS) [PowerPC/VxWorks]: Use s-dorepr__fma.adb. (LIBGNAT_TARGET_PAIRS) [PowerPC/VxWorksAE]: Likewise. (LIBGNAT_TARGET_PAIRS) [Aarch64/VxWorks]: Likewise. (LIBGNAT_TARGET_PAIRS) [Aarch64/QNX]: Likewise. (LIBGNAT_TARGET_PAIRS) [Aarch64/FreeBSD]: Likewise. (LIBGNAT_TARGET_PAIRS) [PowerPC/Linux]: Likewise. (LIBGNAT_TARGET_PAIRS) [Aarch64/Linux]: Likewise. (LIBGNAT_TARGET_PAIRS) [IA-64/Linux]: Likewise. (LIBGNAT_TARGET_PAIRS) [IA-64/HP-UX]: Likewise. (LIBGNAT_TARGET_PAIRS) [RISC-V/Linux]: Likewise. (LIBGNAT_TARGET_PAIRS) [PowerPC/Darwin]: Likewise. * exp_attr.adb (Expand_N_Attribute_Reference) [Attribute_Fore]: Use Fixed suffix and Long_Float type. * exp_imgv.adb (Expand_Image_Attribute): For floating-point types, use the routine of the corresponding root type. For ordinary fixed point types, use Fixed suffix and Long_Float type. (Expand_Value_Attribute): Revert latest change for Long_Long_Float. * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove libgnat units g-hesora.o and s-imgenu.o, add g-heasor.o, g-table.o and s-pehage.o. (GNATBIND_OBJS): Remove libgnat unit s-imgenu.o. * rtsfind.ads (RTU_Id): Add System_Img_Flt, System_Img_LFlt and System_Img_LLF. Remove System_Img_Real. (RE_Id): Rename RE_Fore_Real to RE_Fore_Fixed. Add RE_Image_Float, RE_Image_Long_Float and RE_Image_Long_Long_Float. Rename RE_Image_Ordinary_Fixed_Point to RE_Image_Fixed. (RE_Unit_Table): Adjust to above changes. * libgnat/a-nbnbre.adb (Fixed_Conversions): Use Long_Float instead of Long_Long_Float. * libgnat/a-textio.ads (Field): Remove obsolete comment. * libgnat/a-ticoau.ads (Aux): Adjust ancestor package. * libgnat/a-ticoau.adb: Remove with/use clause for System.Img_Real. (Puts): Call Aux.Set_Image instead of Set_Image_Real. * libgnat/a-ticoio.adb: Add with/use clauses for System.Img_Flt, System.Img_LFlt and System.Img_LLF. (Scalar_Float): Add third actual parameter. (Scalar_Long_Float): Likewise. (Scalar_Long_Long_Float): Likewise. * libgnat/a-tifiio.adb: Add with/use clauses for System.Img_LFlt and System.Val_LFlt. Remove the one for System.Val_LLF. Replace Long_Long_Float with Long_Float throughout. * libgnat/a-tifiio__128.adb: Likewise. * libgnat/a-tiflau.ads: Add Set_Image formal parameter. * libgnat/a-tiflau.adb: Add with/use clause for System.Img_Util, remove the one for System.Img_Real. (Put): Call Set_Image instead of Set_Image_Real. (Puts): Likewise. * libgnat/a-tiflio.adb: Add with/use clause for System.Img_Flt, System.Img_LFlt and System.Img_LLF. (Aux_Float): Add third actual parameter. (Aux_Long_Float): Likewise. (Aux_Long_Long_Float): Likewise. * libgnat/a-witeio.ads (Field): Remove obsolete comment. * libgnat/a-wtcoau.ads (Aux): Adjust ancestor package. * libgnat/a-wtcoau.adb: Remove with/use clause for System.Img_Real. (Puts): Call Aux.Set_Image instead of Set_Image_Real. * libgnat/a-wtcoio.adb: Add with/use clauses for System.Img_Flt, System.Img_LFlt and System.Img_LLF. (Scalar_Float): Add third actual parameter. (Scalar_Long_Float): Likewise. (Scalar_Long_Long_Float): Likewise. * libgnat/a-wtfiio.adb: Add with/use clauses for System.Img_LFlt and System.Val_LFlt. Remove the one for System.Val_LLF. Replace Long_Long_Float with Long_Float throughout. * libgnat/a-wtfiio__128.adb: Likewise. * libgnat/a-wtflau.ads: Add Set_Image formal parameter. * libgnat/a-wtflau.adb: Add with/use clause for System.Img_Util, remove the one for System.Img_Real. (Put): Call Set_Image instead of Set_Image_Real. (Puts): Likewise. * libgnat/a-wtflio.adb: Add with/use clause for System.Img_Flt, System.Img_LFlt and System.Img_LLF. (Aux_Float): Add third actual parameter. (Aux_Long_Float): Likewise. (Aux_Long_Long_Float): Likewise. * libgnat/a-ztexio.ads (Field): Remove obsolete comment. * libgnat/a-ztcoau.ads (Aux): Adjust ancestor package. * libgnat/a-ztcoau.adb: Remove with/use clause for System.Img_Real. (Puts): Call Aux.Set_Image instead of Set_Image_Real. * libgnat/a-ztcoio.adb: Add with/use clauses for System.Img_Flt, System.Img_LFlt and System.Img_LLF. (Scalar_Float): Add third actual parameter. (Scalar_Long_Float): Likewise. (Scalar_Long_Long_Float): Likewise. * libgnat/a-ztfiio.adb: Add with/use clauses for System.Img_LFlt and System.Val_LFlt. Remove the one for System.Val_LLF. Replace Long_Long_Float with Long_Float throughout. * libgnat/a-ztfiio__128.adb: Likewise. * libgnat/a-ztflau.ads: Add Set_Image formal parameter. * libgnat/a-ztflau.adb: Add with/use clause for System.Img_Util, remove the one for System.Img_Real. (Put): Call Set_Image instead of Set_Image_Real. (Puts): Likewise. * libgnat/a-ztflio.adb: Add with/use clause for System.Img_Flt, System.Img_LFlt and System.Img_LLF. (Aux_Float): Add third actual parameter. (Aux_Long_Float): Likewise. (Aux_Long_Long_Float): Likewise. * libgnat/s-dorepr.adb: New file. * libgnat/s-dorepr__fma.adb: Likewise. * libgnat/s-dourea.ads: Likewise. * libgnat/s-dourea.adb: Likewise. * libgnat/s-forrea.ads (Fore_Real): Rename into... (Fore_Fixed): ...this and take Long_Float parameters. * libgnat/s-forrea.adb (Fore_Real): Likewise. (Fore_Fixed): Likewise. * libgnat/s-imgrea.ads: Move to... (Set_Image_Real): Turn into mere renaming. * libgnat/s-imager.ads: ...here. (Image_Ordinary_Fixed_Point): Turn into... (Image_Fixed_Point): ...this. * libgnat/s-imgrea.adb: Add pragma No_Body. Move to... * libgnat/s-imager.adb: ...here. (Image_Ordinary_Fixed_Point): Turn into... (Image_Fixed_Point): ...this. (Is_Negative): Replace Long_Long_Float with Num. (Set_Image_Real): Likewise. Use Double_T instead of single Num throughout the algorithm. * libgnat/s-imgflt.ads: New file. * libgnat/s-imglfl.ads: Likewise. * libgnat/s-imgllf.ads: Likewise. * libgnat/s-imagef.ads: Adjust comment. * libgnat/s-imguti.ads (Max_Real_Image_Length): New named number. * libgnat/s-powflt.ads (Maxpow): Adjust. (Powten): Turn into an exact table of double Float. * libgnat/s-powlfl.ads (Maxpow): Adjust. (Powten): Turn into an exact table of double Long_Float. * libgnat/s-powllf.ads (Maxpow): Adjust. (Powten): Turn into an exact table of double Long_Long_Float. * libgnat/s-valrea.ads: Change order of formal parameters. * libgnat/s-valrea.adb: Add with clause for System.Double_Real. (Double_Real): New instantiation. (Fast2Sum): Delete. (Large_Powten): New function. (Integer_to_Real): Use Quick_Two_Sum instead of Fast2Sum. Convert the value to Double_T. Do the scaling in Double_T for base 10. * libgnat/s-valflt.ads: Remove with/use clasue for Interfaces, add it for System.Unsigned_Types. Use Unsigned. * libgnat/s-vallfl.ads: Remove with/use clasue for Interfaces, add it for System.Unsigned_Types. Use Long_Unsigned. * libgnat/s-valllf.ads: Remove with/use clasue for Interfaces, add it for System.Unsigned_Types. Use Long_Long_Unsigned.
Diffstat (limited to 'gcc/ada/libgnat/s-forrea.ads')
-rw-r--r--gcc/ada/libgnat/s-forrea.ads8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/libgnat/s-forrea.ads b/gcc/ada/libgnat/s-forrea.ads
index 72aa91e..73784c0 100644
--- a/gcc/ada/libgnat/s-forrea.ads
+++ b/gcc/ada/libgnat/s-forrea.ads
@@ -29,14 +29,14 @@
-- --
------------------------------------------------------------------------------
--- This package contains the routine used for the Fore attribute of ordinary
--- fixed point types whose Small is neither an integer nor its reciprocal.
+-- This package contains the routine for the Fore attribute of ordinary fixed
+-- point types whose Small is not a ratio of two sufficiently small integers.
package System.Fore_Real is
pragma Pure;
- function Fore_Real (Lo, Hi : Long_Long_Float) return Natural;
+ function Fore_Fixed (Lo, Hi : Long_Float) return Natural;
-- Compute Fore attribute value for a fixed point type. The parameters
- -- are the low and high bounds, converted to Long_Long_Float.
+ -- are the low and high bounds, converted to Long_Float.
end System.Fore_Real;