From: Eric Botcazou Date: Mon, 21 Sep 2020 20:04:55 +0000 (+0200) Subject: [Ada] Remove Digits_From_Size and Width_From_Size X-Git-Tag: upstream/12.2.0~12538 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c1eba1a6a95b339b16cfceb2d10f8d05aea9fc4;p=platform%2Fupstream%2Fgcc.git [Ada] Remove Digits_From_Size and Width_From_Size gcc/ada/ * ada_get_targ.adb (Digits_From_Size): Delete. (Width_From_Size): Likewise. * get_targ.adb (Digits_From_Size): Likewise. (Width_From_Size): Likewise. * get_targ.ads (Digits_From_Size): Likewise. (Width_From_Size): Likewise. * ttypes.ads: Remove with clause for Get_Targ. (Standard_Short_Short_Integer_Width): Delete. (Standard_Short_Integer_Width): Likewise. (Standard_Integer_Width): Likewise. (Standard_Long_Integer_Width): Likewise. (Standard_Long_Long_Integer_Width): Likewise. (Standard_Long_Long_Long_Integer_Width): Likewise. (Standard_Short_Float_Digits): Likewise. (Standard_Float_Digits): Likewise. (Standard_Long_Float_Digits): Likewise. (Standard_Long_Long_Float_Digits): Likewise. * gnat1drv.adb (Adjust_Global_Switches): Adjust. --- diff --git a/gcc/ada/ada_get_targ.adb b/gcc/ada/ada_get_targ.adb index ddaca1a..123ba4e 100644 --- a/gcc/ada/ada_get_targ.adb +++ b/gcc/ada/ada_get_targ.adb @@ -208,22 +208,6 @@ package body Get_Targ is return 0; end Get_Double_Scalar_Alignment; - ---------------------- - -- Digits_From_Size -- - ---------------------- - - function Digits_From_Size (Size : Pos) return Pos is - begin - case Size is - when 32 => return 6; - when 48 => return 9; - when 64 => return 15; - when 96 => return 18; - when 128 => return 18; - when others => raise Program_Error; - end case; - end Digits_From_Size; - ----------------------------- -- Get_Max_Unaligned_Field -- ----------------------------- @@ -260,22 +244,6 @@ package body Get_Targ is Alignment => 64); end Register_Back_End_Types; - --------------------- - -- Width_From_Size -- - --------------------- - - function Width_From_Size (Size : Pos) return Pos is - begin - case Size is - when 8 => return 4; - when 16 => return 6; - when 32 => return 11; - when 64 => return 21; - when 128 => return 40; - when others => raise Program_Error; - end case; - end Width_From_Size; - ------------------------------ -- Get_Back_End_Config_File -- ------------------------------ diff --git a/gcc/ada/get_targ.adb b/gcc/ada/get_targ.adb index 8b35b1c..881c06c 100644 --- a/gcc/ada/get_targ.adb +++ b/gcc/ada/get_targ.adb @@ -278,22 +278,6 @@ package body Get_Targ is return null; end Get_Back_End_Config_File; - ---------------------- - -- Digits_From_Size -- - ---------------------- - - function Digits_From_Size (Size : Pos) return Pos is - begin - case Size is - when 32 => return 6; - when 48 => return 9; - when 64 => return 15; - when 96 => return 18; - when 128 => return 18; - when others => raise Program_Error; - end case; - end Digits_From_Size; - ----------------------------- -- Get_Max_Unaligned_Field -- ----------------------------- @@ -314,20 +298,4 @@ package body Get_Targ is Enumerate_Modes (Call_Back); end Register_Back_End_Types; - --------------------- - -- Width_From_Size -- - --------------------- - - function Width_From_Size (Size : Pos) return Pos is - begin - case Size is - when 8 => return 4; - when 16 => return 6; - when 32 => return 11; - when 64 => return 21; - when 128 => return 40; - when others => raise Program_Error; - end case; - end Width_From_Size; - end Get_Targ; diff --git a/gcc/ada/get_targ.ads b/gcc/ada/get_targ.ads index 676e117..5315292 100644 --- a/gcc/ada/get_targ.ads +++ b/gcc/ada/get_targ.ads @@ -115,10 +115,6 @@ package Get_Targ is -- Returns the maximum supported size in bits for a field that is -- not aligned on a storage unit boundary. - function Width_From_Size (Size : Pos) return Pos; - function Digits_From_Size (Size : Pos) return Pos; - -- Calculate values for 'Width or 'Digits from 'Size - type C_String is array (0 .. 255) of aliased Character; pragma Convention (C, C_String); diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 1ea7d76..65da307 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -813,8 +813,6 @@ procedure Gnat1drv is Ttypes.Standard_Long_Long_Long_Integer_Size := Ttypes.Standard_Long_Long_Integer_Size; - Ttypes.Standard_Long_Long_Long_Integer_Width := - Ttypes.Standard_Long_Long_Integer_Width; Ttypes.System_Max_Integer_Size := Ttypes.Standard_Long_Long_Integer_Size; Ttypes.System_Max_Binary_Modulus_Power := diff --git a/gcc/ada/ttypes.ads b/gcc/ada/ttypes.ads index ebd02b3..46f9698 100644 --- a/gcc/ada/ttypes.ads +++ b/gcc/ada/ttypes.ads @@ -26,7 +26,6 @@ -- This package contains constants describing target properties with Types; use Types; -with Get_Targ; with Set_Targ; package Ttypes is @@ -102,63 +101,33 @@ package Ttypes is Standard_Short_Short_Integer_Size : constant Pos := Set_Targ.Char_Size; - Standard_Short_Short_Integer_Width : constant Pos := - Get_Targ.Width_From_Size - (Standard_Short_Short_Integer_Size); Standard_Short_Integer_Size : constant Pos := Set_Targ.Short_Size; - Standard_Short_Integer_Width : constant Pos := - Get_Targ.Width_From_Size - (Standard_Short_Integer_Size); Standard_Integer_Size : constant Pos := Set_Targ.Int_Size; - Standard_Integer_Width : constant Pos := - Get_Targ.Width_From_Size - (Standard_Integer_Size); Standard_Long_Integer_Size : constant Pos := Set_Targ.Long_Size; - Standard_Long_Integer_Width : constant Pos := - Get_Targ.Width_From_Size - (Standard_Long_Integer_Size); Standard_Long_Long_Integer_Size : constant Pos := Set_Targ.Long_Long_Size; - Standard_Long_Long_Integer_Width : constant Pos := - Get_Targ.Width_From_Size - (Standard_Long_Long_Integer_Size); Standard_Long_Long_Long_Integer_Size : Pos := Set_Targ.Long_Long_Long_Size; - Standard_Long_Long_Long_Integer_Width : Pos := - Get_Targ.Width_From_Size - (Standard_Long_Long_Long_Integer_Size); Standard_Short_Float_Size : constant Pos := Set_Targ.Float_Size; - Standard_Short_Float_Digits : constant Pos := - Get_Targ.Digits_From_Size - (Standard_Short_Float_Size); Standard_Float_Size : constant Pos := Set_Targ.Float_Size; - Standard_Float_Digits : constant Pos := - Get_Targ.Digits_From_Size - (Standard_Float_Size); Standard_Long_Float_Size : constant Pos := Set_Targ.Double_Size; - Standard_Long_Float_Digits : constant Pos := - Get_Targ.Digits_From_Size - (Standard_Long_Float_Size); Standard_Long_Long_Float_Size : constant Pos := Set_Targ.Long_Double_Size; - Standard_Long_Long_Float_Digits : constant Pos := - Get_Targ.Digits_From_Size - (Standard_Long_Long_Float_Size); Standard_Character_Size : constant Pos := Set_Targ.Char_Size;