aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-atopri.ads
AgeCommit message (Collapse)AuthorFilesLines
2012-07-23[multiple changes]Arnaud Charlet1-13/+10
2012-07-23 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Inst is now a local variable. Retrieve the related instance when processing a subprogram instantiation. Such instances appear as wrapper packages. 2012-07-23 Vincent Pucci <pucci@adacore.com> * system-aix64.ads, system-aix.ads, system-darwin-ppc.ads, system-hpux.ads, system-linux-alpha.ads, system-linux-hppa.ads, system-linux-ppc.ads, system-linux-s390.ads, system-linux-s390x.ads, system-linux-sh4.ads, system-linux-sparc.ads, system-lynxos-ppc.ads, system-mingw.ads, system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms_64.ads, * system-vxworks-arm.ads, system-vxworks-m68k.ads, system-vxworks-mips.ads, system-vxworks-ppc.ads, system-vxworks-sparcv9.ads: Support_Atomic_Primitives set to False. * system-darwin-x86.ads, system-darwin-x86_64.ads, system-freebsd-x86.ads, system-freebsd-x86_64.ads, system-hpux-ia64.ads, system-linux-ia64.ads, system-linux-x86.ads, system-linux-x86_64.ads, system-lynxos-x86.ads, system-mingw-x86_64.ads, system-solaris-x86.ads, system-solaris-x86_64.ads, system-vms-ia64.ads, system-vxworks-x86.ads: Support_Atomic_Primitives set to True. * s-atopri.adb (Lock_Free_Read_X): New body. (Lock_Free_Try_Write_X): Support_Atomic_Primitives check added. (Lock_Free_Try_Write_64): New body. * s-atopri.ads: New type uint. (Sync_Compare_And_Swap_64): __sync_val_compare_and_swap_8 intrinsic import. (Lock_Free_Read_X): Body moved to s-atopri.adb. (Lock_Free_Try_Write_64): Similar to other Lock_Free_Try_Write_X routines. * targparm.adb: New enumeration literal SAP (Support_Atomic_Primitives) for type Targparm_Tags. New constant SAP_Str. New component SAP_Str'Access for array Targparm_Str. (Get_Target_Parameters): Parse Support_Atomic_Primitives_On_Target flag. * targparm.ads: New back-end code generation flag Support_Atomic_Primitives_On_Target 2012-07-23 Vincent Pucci <pucci@adacore.com> * gnat_ugn.texi: Dimensionality checking documentation updated. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Make_Inline): If the pragma applies to a subprogram renaming, set inline flags on both the renamed entity and on the renaming, so that some ASIS queries can be handled consistently in the absence of expansion. From-SVN: r189772
2012-07-17[multiple changes]Arnaud Charlet1-38/+39
2012-07-17 Tristan Gingold <gingold@adacore.com> * gnat_rm.texi: Adjust previous change. 2012-07-17 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Process_Import_Or_Interface): If the pragma comes from an aspect, it applies to the corresponding entity without further check. 2012-07-17 Olivier Hainque <hainque@adacore.com> * initialize.c (__gnat_initialize for VxWorks): Remove section with call to __gnat_vxw_setup_for_eh. * system-vxworks-ppc.ads: Add -auto-register to -crtbe, relying on the VxWorks constructor mechanism for network loaded modules by default. 2012-07-17 Tristan Gingold <gingold@adacore.com> * adaint.c: Minor reformatting. 2012-07-17 Pascal Obry <obry@adacore.com> * s-regexp.adb (Adjust): Fix access violation in Adjust. 2012-07-17 Ed Schonberg <schonberg@adacore.com> * freeze.adb (Freeze_Entity): Warn if an imported subprogram has pre/post conditions, because these will not be enforced. 2012-07-17 Eric Botcazou <ebotcazou@adacore.com> * exp_ch7.adb (Process_Transient_Objects): Put all the finalization blocks and the final raise statement into a wrapper block. 2012-07-17 Vincent Pucci <pucci@adacore.com> * s-atopri.adb (Lock_Free_Try_Write_X): Atomic_Compare_Exchange_X replaced by Sync_Compare_And_Swap_X. (Lock_Free_Try_Write_64): Removed. * s-atopri.ads (Sync_Compare_And_Swap_X): Replaces previous routine Atomic_Compare_Exchange_X. (Lock_Free_Read_64): Renaming of Atomic_Load_64. (Lock_Free_Try_Write_64): Renaming of Sync_Compare_And_Swap_64. 2012-07-17 Vincent Celier <celier@adacore.com> * switch-m.adb (Normalize_Compiler_Switches): Recognize new switches -gnatn1 and -gnatn2. 2012-07-17 Vincent Pucci <pucci@adacore.com> * gnat_ugn.texi: GNAT dimensionality checking documentation updated with System.Dim.Mks modifications. 2012-07-17 Ed Schonberg <schonberg@adacore.com> * exp_ch3.adb: sloc of array init_proc is sloc of type declaration. 2012-07-17 Tristan Gingold <gingold@adacore.com> * raise-gcc.c (get_call_site_action_for): Remove useless init expression for p. (get_action_description_for): Do not overwrite action->kind. 2012-07-17 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Add local variables Attr and Conversion_Added. Add local constant Typ. Retrieve the original attribute after the arithmetic check machinery has modified the node. Add a conversion to the target type when the prefix of attribute Max_Size_In_Storage_Elements is a controlled type. 2012-07-17 Gary Dismukes <dismukes@adacore.com> * exp_ch6.adb (Expand_Inlined_Call): For each actual parameter of mode 'out' or 'in out' that denotes an entity, reset Last_Assignment on the entity so that any assignments to the corresponding formal in the inlining will not trigger spurious warnings about overwriting assignments. From-SVN: r189569
2012-07-12[multiple changes]Arnaud Charlet1-12/+12
2012-07-12 Robert Dewar <dewar@adacore.com> * s-atopri.adb, s-atopri.ads: Minor reformatting. 2012-07-12 Robert Dewar <dewar@adacore.com> * ali.adb: Add circuitry to read new named form of restrictions lines. * debug.adb: Add doc for new -gnatd.R switch (used positional notation for output of restrictions data in ali file). * lib-writ.adb: Implement new named format for restrictions lines. * lib-writ.ads: Add documentation for new named format for restrictions in ali files. * restrict.adb, restrict.ads, sem_prag.adb: Update comments. * rident.ads: Go back to withing System.Rident * s-rident.ads: Add extensive comment on dealing with consistency checking. 2012-07-12 Thomas Quinot <quinot@adacore.com> * par_sco.adb, scos.ads: Emit detailed SCOs for SELECT statements. From-SVN: r189438
2012-07-12[multiple changes]Arnaud Charlet1-29/+84
2012-07-12 Robert Dewar <dewar@adacore.com> * sem_disp.adb: Minor reformatting * s-bytswa.ads: Minor comment update. 2012-07-12 Vincent Pucci <pucci@adacore.com> * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Atomic_Load_N replaced by Lock_Free_Read_N. Atomic_Compare_Exchange_N replaced by Lock_Free_Try_Write_N. Renaming of several local variables. For procedure, Expected_Comp declaration moved to the declaration list of the procedure. * rtsfind.ads: RE_Atomic_Compare_Exchange_8, RE_Atomic_Compare_Exchange_16, RE_Atomic_Compare_Exchange_32, RE_Atomic_Compare_Exchange_64, RE_Atomic_Load_8, RE_Atomic_Load_16, RE_Atomic_Load_32, RE_Atomic_Load_64, RE_Atomic_Synchronize, RE_Relaxed removed. RE_Lock_Free_Read_8, RE_Lock_Free_Read_16, RE_Lock_Free_Read_32, RE_Lock_Free_Read_64, RE_Lock_Free_Try_Write_8, RE_Lock_Free_Try_Write_16, RE_Lock_Free_Try_Write_32, RE_Lock_Free_Try_Write_64 added. * s-atopri.adb: New file. * s-atopri.ads (Atomic_Compare_Exchange_8): Renaming of parameters. Import primitive __sync_val_compare_and_swap_1. (Atomic_Compare_Exchange_16): Renaming of parameters. Import primitive __sync_val_compare_and_swap_2. (Atomic_Compare_Exchange_32): Renaming of parameters. Import primitive __sync_val_compare_and_swap_4. (Atomic_Compare_Exchange_64): Renaming of parameters. Import primitive __sync_val_compare_and_swap_8. (Atomic_Load_8): Ptr renames parameter X. (Atomic_Load_16): Ptr renames parameter X. (Atomic_Load_32): Ptr renames parameter X. (Atomic_Load_64): Ptr renames parameter X. (Lock_Free_Read_8): New routine. (Lock_Free_Read_16): New routine. (Lock_Free_Read_32): New routine. (Lock_Free_Read_64): New routine. (Lock_Free_Try_Write_8): New routine. (Lock_Free_Try_Write_16): New routine. (Lock_Free_Try_Write_32): New routine. (Lock_Free_Try_Write_64): New routine. From-SVN: r189437
2012-05-15[multiple changes]Arnaud Charlet1-1/+6
2012-05-15 Robert Dewar <dewar@adacore.com> * g-comlin.adb, g-comlin.ads: Minor reformatting. 2012-05-15 Vincent Pucci <pucci@adacore.com> * aspects.adb, aspects.adb: Reordering of the Aspect_Idi list. New aspect Aspect_Lock_Free. * einfo.adb, einfo.ads: New flag Uses_Lock_Free (flag 188). (Set_Uses_Lock_Free): New routine. (Uses_Lock_Free): New routine. * exp_ch7.adb (Is_Simple_Protected_Type): Return False for lock-free implementation. * exp_ch9.adb (Allows_Lock_Free_Implementation): Moved to Sem_Ch9. (Build_Lock_Free_Unprotected_Subprogram_Body): Protected procedure uses __sync_synchronise. Check both Object_Size and Value_Size. (Expand_N_Protected_Body): Lock_Free_Active renames Lock_Free_On. (Expand_N_Protected_Type_Declaration): _Object field removed for lock-free implementation. (Install_Private_Data_Declarations): Protection object removed for lock-free implementation. (Make_Initialize_Protection): Protection object initialization removed for lock-free implementation. * rtsfind.ads: RE_Atomic_Synchronize and RE_Relaxed added. * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect_Lock_Free analysis added. * sem_ch9.adb (Allows_Lock_Free_Implementation): New routine. (Analyze_Protected_Body): Allows_Lock_Free_Implementation call added. (Analyze_Protected_Type_Declaration): Allows_Lock_Free_Implementation call added. (Analyze_Single_Protected_Declaration): Second analysis of aspects removed. * s-atopri.ads: Header added. (Atomic_Synchronize): New routine. 2012-05-15 Robert Dewar <dewar@adacore.com> * exp_ch7.ads: Add comment. From-SVN: r187505
2012-04-02[multiple changes]Arnaud Charlet1-0/+2
2012-04-02 Robert Dewar <dewar@adacore.com> * s-atopri.ads: Minor reformatting. 2012-04-02 Thomas Quinot <quinot@adacore.com> * sem_util.adb: Minor reformatting, minor code cleanup. 2012-04-02 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb (Generate_Reference): For a reference to an operator symbol, set the sloc to point to the first character of the operator name, and not to the initial quaote. (Output_References): Ditto for the definition of an operator symbol. 2012-04-02 Vincent Celier <celier@adacore.com> * ali.adb (Scan_Ali): Recognize Z lines. Set Implicit_With_From_Instantiation to True in the With_Record for Z lines. * ali.ads (With_Record): New Boolean component Implicit_With_From_Instantiation, defaulted to False. * csinfo.adb: Indicate that Implicit_With_From_Instantiation is special * lib-writ.adb (Write_ALI): New array Implicit_With. (Collect_Withs): Set Implicit_With for the unit is it is not Yes. (Write_With_Lines): Write a Z line instead of a W line if Implicit_With is Yes for the unit. * sem_ch12.adb (Inherit_Context): Only add a unit in the context if it is not there yet. * sinfo.ads: New flag Implicit_With_From_Instantiation (Flag12) added. From-SVN: r186079
2012-04-02[multiple changes]Arnaud Charlet1-0/+120
2012-04-02 Yannick Moy <moy@adacore.com> * osint.adb, osint.ads (Add_Default_Search_Dirs): Add library search dirs in file specified with option -gnateO. 2012-04-02 Robert Dewar <dewar@adacore.com> * sem_ch5.adb, exp_util.adb, sem_util.adb, exp_ch4.adb: Minor reformatting. 2012-04-02 Olivier Hainque <hainque@adacore.com> * g-sse.ads: Add x86-solaris and x86_64-darwin to the set of platforms where the use of this spec is supported. Add current year to the copyright notice. * gcc-interfaces/Makefile.in: Add g-sse.o and g-ssvety.o to EXTRA_GNATRTL_NONTASKING_OBJS on x86 32/64 targets that support it and where they were missing (x86-solaris, x86-freebsd, x86_64-freebsd, and x86-darwin). 2012-04-02 Gary Dismukes <dismukes@adacore.com> * bindgen.adb (Gen_Ada_Init): When compiling for the AAMP small library, where we no longer suppress the Standard_Library, generate an empty body rather than the usual generation of assignments to imported globals, since those aren't present in the small library. 2012-04-02 Ed Schonberg <schonberg@adacore.com> * sinfo.ads: Minor documentation fix. 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com> * sem_res.adb (Resolve_Conditional_Expression): Add local variables Else_Typ and Then_Typ. Add missing type conversions to the "then" and "else" expressions when their respective types are scalar. 2012-04-02 Vincent Pucci <pucci@adacore.com> * exp_ch9.adb: Reordering of the local subprograms. New Table for the lock free implementation that maps each protected subprograms with the protected component it references. (Allow_Lock_Free_Implementation): New routine. Check if the protected body enables the lock free implementation. (Build_Lock_Free_Protected_Subprogram_Body): New routine. (Build_Lock_Free_Unprotected_Subprogram_Body): New routine. (Comp_Of): New routine. * Makefile.rtl: Add s-atopri.o * debug.adb: New compiler debug flag -gnatd9 for lock free implementation. * rtsfind.ads: RE_Atomic_Compare_Exchange_8, RE_Atomic_Compare_Exchange_16, RE_Atomic_Compare_Exchange_32, RE_Atomic_Compare_Exchange_64, RE_Atomic_Load_8, RE_Atomic_Load_16, RE_Atomic_Load_32, RE_Atomic_Load_64, RE_Uint8, RE_Uint16, RE_Uint32, RE_Uint64 added. * s-atropi.ads: New file. Defines atomic primitives used by the lock free implementation. From-SVN: r186076