diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-12-05 11:55:42 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-12-05 11:55:42 +0100 |
commit | 5e29ae8259c54bdc25e82b3e71c956cde0a49a99 (patch) | |
tree | 125bcd0e1d28de72c61c9d14eb0e0ef10da3b17c /gcc/ada/lib-writ.adb | |
parent | b9daa96e707ca488636eccded3255657ad0ef2bf (diff) | |
download | gcc-5e29ae8259c54bdc25e82b3e71c956cde0a49a99.zip gcc-5e29ae8259c54bdc25e82b3e71c956cde0a49a99.tar.gz gcc-5e29ae8259c54bdc25e82b3e71c956cde0a49a99.tar.bz2 |
[multiple changes]
2012-12-05 Robert Dewar <dewar@adacore.com>
* lib-writ.adb (Write_ALI): Output T lines.
* lib-writ.ads: Minor reformatting. Add documentation of T lines.
* opt.ads (Generate_Target_Dependent_Info): New flag.
* switch-c.adb (Scan_Switches): Recognize -gnatet switch
(target dependent info).
* ttypes.ads: Add four letter codes to declarations (for target
dependent info).
* usage.adb: Add line for -gnatet switch.
2012-12-05 Hristian Kirtchev <kirtchev@adacore.com>
* exp_prag.adb (Expand_N_Pragma): Add a call to expand
pragma Loop_Variant.
(Expand_Pragma_Loop_Assertion): Removed.
(Expand_Pragma_Loop_Variant): New routine.
* par-prag.adb: Remove Pragma_Loop_Assertion and add two new
Pragma_Loop_Invariant and Pragma_Loop_Variant entries.
* sem_attr.adb (Analyze_Attribute): Update the code which
locates the enclosing pragma.
* sem_prag.adb (Analyze_Pragma): Remove the code which analyzes
pragma Loop_Assertion as the pragma is now obsolete. Add the
machinery to checks the semantics of pragmas Loop_Invariant
and Loop_Variant.
(Check_Loop_Invariant_Variant_Placement): New routine.
* snames.ads-tmpl: Remove name Loop_Assertion. Add new names
Loop_Invariant and Loop_Variant. Rename Name_Decreasing
to Name_Decreases and Name_Increasing to Name_Increases.
Remove the pragma Id for Loop_Assertion and add two new Ids for
Loop_Invariant and Loop_Variant.
From-SVN: r194203
Diffstat (limited to 'gcc/ada/lib-writ.adb')
-rw-r--r-- | gcc/ada/lib-writ.adb | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb index e84023c..7f743e2 100644 --- a/gcc/ada/lib-writ.adb +++ b/gcc/ada/lib-writ.adb @@ -49,6 +49,7 @@ with Sinput; use Sinput; with Snames; use Snames; with Stringt; use Stringt; with Tbuild; use Tbuild; +with Ttypes; use Ttypes; with Uname; use Uname; with System.Case_Util; use System.Case_Util; @@ -1440,6 +1441,93 @@ package body Lib.Writ is Output_Alfa; end if; + -- Output target dependent information if needed + + if Generate_Target_Dependent_Info then + Gen_TDI : declare + subtype Str4 is String (1 .. 4); + + procedure Gen_TDI_Bool (Code : Str4; Val : Boolean); + -- Generate T line for Bool value + + procedure Gen_TDI_Nat (Code : Str4; Val : Int); + -- Generate T line for Pos or Nat value + + ------------------ + -- Gen_TDI_Bool -- + ------------------ + + procedure Gen_TDI_Bool (Code : Str4; Val : Boolean) is + begin + Write_Info_Initiate ('T'); + Write_Info_Char (' '); + Write_Info_Str (Code); + + if Val then + Write_Info_Str (" TRUE"); + else + Write_Info_Str (" FALSE"); + end if; + + Write_Info_EOL; + end Gen_TDI_Bool; + + ----------------- + -- Gen_TDI_Nat -- + ----------------- + + procedure Gen_TDI_Nat (Code : Str4; Val : Int) is + begin + Write_Info_Initiate ('T'); + Write_Info_Char (' '); + Write_Info_Str (Code); + Write_Info_Char (' '); + Write_Info_Nat (Val); + + Write_Info_EOL; + end Gen_TDI_Nat; + + -- Start of processing for Gen_TDI + + begin + Gen_TDI_Nat ("SINS", Standard_Short_Short_Integer_Size); + Gen_TDI_Nat ("SINW", Standard_Short_Short_Integer_Width); + Gen_TDI_Nat ("SHIS", Standard_Short_Integer_Size); + Gen_TDI_Nat ("SHIW", Standard_Short_Integer_Width); + Gen_TDI_Nat ("INTS", Standard_Integer_Size); + Gen_TDI_Nat ("INTW", Standard_Integer_Width); + Gen_TDI_Nat ("LINS", Standard_Long_Integer_Size); + Gen_TDI_Nat ("LINW", Standard_Long_Integer_Width); + Gen_TDI_Nat ("LLIS", Standard_Long_Long_Integer_Size); + Gen_TDI_Nat ("LLIW", Standard_Long_Long_Integer_Width); + Gen_TDI_Nat ("SFLS", Standard_Short_Float_Size); + Gen_TDI_Nat ("SFLD", Standard_Short_Float_Digits); + Gen_TDI_Nat ("FLTS", Standard_Float_Size); + Gen_TDI_Nat ("FLTD", Standard_Float_Digits); + Gen_TDI_Nat ("LFLS", Standard_Long_Float_Size); + Gen_TDI_Nat ("LFLD", Standard_Long_Float_Digits); + Gen_TDI_Nat ("LLFS", Standard_Long_Long_Float_Size); + Gen_TDI_Nat ("LLFD", Standard_Long_Long_Float_Digits); + Gen_TDI_Nat ("CHAS", Standard_Character_Size); + Gen_TDI_Nat ("WCHS", Standard_Wide_Character_Size); + Gen_TDI_Nat ("WWCS", Standard_Wide_Wide_Character_Size); + Gen_TDI_Nat ("ADRS", System_Address_Size); + Gen_TDI_Nat ("MBMP", System_Max_Binary_Modulus_Power); + Gen_TDI_Nat ("MNMP", System_Max_Nonbinary_Modulus_Power); + Gen_TDI_Nat ("SUNI", System_Storage_Unit); + Gen_TDI_Nat ("WRDS", System_Word_Size); + Gen_TDI_Nat ("TICK", System_Tick_Nanoseconds); + Gen_TDI_Nat ("WCTS", Interfaces_Wchar_T_Size); + Gen_TDI_Nat ("MAXA", Maximum_Alignment); + Gen_TDI_Nat ("ALLA", System_Allocator_Alignment); + Gen_TDI_Nat ("MUNF", Max_Unaligned_Field); + Gen_TDI_Bool ("BEND", Bytes_Big_Endian); + Gen_TDI_Bool ("STRA", Target_Strict_Alignment); + Gen_TDI_Nat ("DFLA", Target_Double_Float_Alignment); + Gen_TDI_Nat ("DSCA", Target_Double_Scalar_Alignment); + end Gen_TDI; + end if; + -- Output final blank line and we are done. This final blank line is -- probably junk, but we don't feel like making an incompatible change! |