diff options
Diffstat (limited to 'gcc-4.6/gcc/ada')
-rw-r--r-- | gcc-4.6/gcc/ada/ChangeLog | 81 | ||||
-rw-r--r-- | gcc-4.6/gcc/ada/Make-generated.in | 31 | ||||
-rw-r--r-- | gcc-4.6/gcc/ada/gcc-interface/Makefile.in | 56 | ||||
-rw-r--r-- | gcc-4.6/gcc/ada/gcc-interface/decl.c | 25 | ||||
-rw-r--r-- | gcc-4.6/gcc/ada/gcc-interface/trans.c | 22 | ||||
-rw-r--r-- | gcc-4.6/gcc/ada/gnatvsn.ads | 4 | ||||
-rw-r--r-- | gcc-4.6/gcc/ada/init.c | 23 | ||||
-rw-r--r-- | gcc-4.6/gcc/ada/mlib-tgt-specific-darwin.adb | 12 | ||||
-rw-r--r-- | gcc-4.6/gcc/ada/system-darwin-ppc64.ads | 149 | ||||
-rw-r--r-- | gcc-4.6/gcc/ada/tracebak.c | 20 |
10 files changed, 360 insertions, 63 deletions
diff --git a/gcc-4.6/gcc/ada/ChangeLog b/gcc-4.6/gcc/ada/ChangeLog index 646cf5e..6b52cbf 100644 --- a/gcc-4.6/gcc/ada/ChangeLog +++ b/gcc-4.6/gcc/ada/ChangeLog @@ -1,3 +1,84 @@ +2012-01-02 Eric Botcazou <ebotcazou@adacore.com> + + * gnatvsn.ads (Current_Year): Bump to 2011. + +2011-12-08 Eric Botcazou <ebotcazou@adacore.com> + + PR tree-optimization/51315 + Backport from mainline + 2011-09-25 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote + the alignment if this doesn't prevent BLKmode access to the object. + +2011-11-13 Iain Sandoe <iains@gcc.gnu.org> + + Backport from mainline r181474 + PR target/50678 + * init.c (__gnat_error_handler) [Darwin]: Move work-around to the + bug filed as radar #10302855 from __gnat_error_handler ... + ... to (__gnat_adjust_context_for_raise) [Darwin]: New. + (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define. + (__gnat_error_handler) [Darwin]: Use __gnat_adjust_context_for_raise. + +2011-11-18 Tristan Gingold <gingold@adacore.com> + Iain Sandoe <iains@gcc.gnu.org> + + PR target/49992 + * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove. + * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing + for Darwin. + +2011-11-13 Iain Sandoe <iains@gcc.gnu.org> + + Backport from mainline r181319 + * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link + s-oscons.ads. + (OSCONS_CPP, OSCONS_EXTRACT): New. + (./bldtools/oscons/xoscons): New Target. + ($(RTSDIR)/s-oscons.ads): New Target. + (gnatlib): Depend on $(RTSDIR)/s-oscons.ads. + * Make-generated.in: Remove machinery to generate xoscons and + ada/s-oscons.ads. + +2011-10-26 Release Manager + + * GCC 4.6.2 released. + +2011-09-19 Iain Sandoe <iains@gcc.gnu.org> + + Backport from mainline (restore powerpc-darwin Ada bootstrap). + * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8. + +2011-09-11 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form + of an addressable type. + * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New. + Deal with those cases for which creating a temporary is mandatory. + +2011-09-08 Iain Sandoe <iains@gcc.gnu.org> + + Backport from mainline (restore powerpc-darwin Ada bootstrap). + * gcc-interface/Makefile.in (darwin): Provide powerpc64 system + implementation. + * system-darwin-ppc64.ads: New file. + +2011-09-06 Iain Sandoe <iains@gcc.gnu.org> + + Backport from mainline. + * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture + size switches to the link phase for shared libs. + +2011-07-23 Eric Botcazou <ebotcazou@adacore.com> + + Backport from mainline + 2011-07-23 Arnaud Charlet <charlet@adacore.com> + + PR ada/49819 + * gcc-interface/Makefile.in (powerpc-linux): Remove reference to + g-trasym-dwarf.adb. + 2011-07-15 Eric Botcazou <ebotcazou@adacore.com> PR ada/48711 diff --git a/gcc-4.6/gcc/ada/Make-generated.in b/gcc-4.6/gcc/ada/Make-generated.in index 30ce14e..ac52e49 100644 --- a/gcc-4.6/gcc/ada/Make-generated.in +++ b/gcc-4.6/gcc/ada/Make-generated.in @@ -64,37 +64,6 @@ $(ADA_GEN_SUBDIR)/nmake.ads : $(ADA_GEN_SUBDIR)/sinfo.ads $(ADA_GEN_SUBDIR)/nma $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/nmake_s (cd $(ADA_GEN_SUBDIR)/bldtools/nmake_s; gnatmake -q xnmake ; ./xnmake -s ../../nmake.ads ) -ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),) -OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \ - -DTARGET='""$(target)""' s-oscons-tmplt.c - -OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \ - -DTARGET='""$(target)""' s-oscons-tmplt.c ; \ - ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \ - ./s-oscons-tmplt.exe > s-oscons-tmplt.s - -else -# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to ajust -# for running it from $(ADA_GEN_SUBDIR)/bldtools/oscons -OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \ - | sed -e 's^\./xgcc^../../../xgcc^' -e 's^-B./^-B../../../^'` -OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \ - -DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i -OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i -endif - -$(ADA_GEN_SUBDIR)/s-oscons.ads : $(ADA_GEN_SUBDIR)/s-oscons-tmplt.c $(ADA_GEN_SUBDIR)/gsocket.h $(ADA_GEN_SUBDIR)/xoscons.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb - -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/oscons - $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/oscons/,$(notdir $^)) - $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/oscons - (cd $(ADA_GEN_SUBDIR)/bldtools/oscons ; gnatmake -q xoscons ; \ - $(RM) s-oscons-tmplt.i s-oscons-tmplt.s ; \ - $(OSCONS_CPP) ; \ - $(OSCONS_EXTRACT) ; \ - ./xoscons ; \ - $(RM) ../../s-oscons.ads ; \ - $(CP) s-oscons.ads s-oscons.h ../../) - $(ADA_GEN_SUBDIR)/sdefault.adb: $(ADA_GEN_SUBDIR)/stamp-sdefault ; @true $(ADA_GEN_SUBDIR)/stamp-sdefault : $(srcdir)/version.c Makefile $(ECHO) "pragma Style_Checks (Off);" >tmp-sdefault.adb diff --git a/gcc-4.6/gcc/ada/gcc-interface/Makefile.in b/gcc-4.6/gcc/ada/gcc-interface/Makefile.in index b64ba55..77027dd 100644 --- a/gcc-4.6/gcc/ada/gcc-interface/Makefile.in +++ b/gcc-4.6/gcc/ada/gcc-interface/Makefile.in @@ -1792,7 +1792,6 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),) s-osinte.adb<s-osinte-posix.adb \ s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ g-sercom.adb<g-sercom-linux.adb \ - g-trasym.adb<g-trasym-dwarf.adb \ $(ATOMICS_TARGET_PAIRS) ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),) @@ -2105,6 +2104,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),) endif ifeq ($(strip $(filter-out darwin%,$(osys))),) + SO_OPTS = -Wl,-flat_namespace -shared-libgcc ifeq ($(strip $(filter-out %86,$(arch))),) LIBGNAT_TARGET_PAIRS = \ a-intnam.ads<a-intnam-darwin.ads \ @@ -2124,6 +2124,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),) ifeq ($(strip $(MULTISUBDIR)),/x86_64) LIBGNAT_TARGET_PAIRS += \ system.ads<system-darwin-x86_64.ads + SO_OPTS += -m64 else LIBGNAT_TARGET_PAIRS += \ system.ads<system-darwin-x86.ads @@ -2150,6 +2151,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),) ifeq ($(strip $(MULTISUBDIR)),/i386) LIBGNAT_TARGET_PAIRS += \ system.ads<system-darwin-x86.ads + SO_OPTS += -m32 else LIBGNAT_TARGET_PAIRS += \ system.ads<system-darwin-x86_64.ads @@ -2171,8 +2173,15 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),) a-numaux.ads<a-numaux-darwin.ads \ a-numaux.adb<a-numaux-darwin.adb \ g-trasym.ads<g-trasym-unimplemented.ads \ - g-trasym.adb<g-trasym-unimplemented.adb \ - system.ads<system-darwin-ppc.ads + g-trasym.adb<g-trasym-unimplemented.adb + ifeq ($(strip $(MULTISUBDIR)),/ppc64) + LIBGNAT_TARGET_PAIRS += \ + system.ads<system-darwin-ppc64.ads + SO_OPTS += -m64 + else + LIBGNAT_TARGET_PAIRS += \ + system.ads<system-darwin-ppc.ads + endif endif TOOLS_TARGET_PAIRS = \ @@ -2180,8 +2189,6 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),) EH_MECHANISM=-gcc GNATLIB_SHARED = gnatlib-shared-darwin - SO_OPTS = -Wl,-flat_namespace -shared-libgcc - RANLIB = ranlib -c GMEM_LIB = gmemlib LIBRARY_VERSION := $(LIB_VERSION) soext = .dylib @@ -2439,21 +2446,52 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \ $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \ $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));) -# Copy generated target dependent sources - $(RM) $(RTSDIR)/s-oscons.ads - (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads) +# Copy tsystem.h + $(CP) $(srcdir)/tsystem.h $(RTSDIR) $(RM) ../stamp-gnatlib-$(RTSDIR) touch ../stamp-gnatlib1-$(RTSDIR) # GNULLI End ############################################################# +ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),) +OSCONS_CPP=../../$(DECC) -E /comment=as_is -DNATIVE \ + -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c + +OSCONS_EXTRACT=../../$(DECC) -DNATIVE \ + -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c ; \ + ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \ + ./s-oscons-tmplt.exe > s-oscons-tmplt.s + +else +# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust +# for running it from $(RTSDIR) +OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \ + | sed -e 's^\./xgcc^../../xgcc^' -e 's^-B./^-B../../^'` +OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \ + -DTARGET=\"$(target)\" $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i +OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i +endif + +./bldtools/oscons/xoscons: xoscons.adb xutil.ads xutil.adb + -$(MKDIR) ./bldtools/oscons + $(RM) $(addprefix ./bldtools/oscons/,$(notdir $^)) + $(CP) $^ ./bldtools/oscons + (cd ./bldtools/oscons ; gnatmake -q xoscons) + +$(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h ./bldtools/oscons/xoscons + $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s + (cd $(RTSDIR) ; \ + $(OSCONS_CPP) ; \ + $(OSCONS_EXTRACT) ; \ + ../bldtools/oscons/xoscons) + # Don't use semicolon separated shell commands that involve list expansions. # The semicolon triggers a call to DCL on VMS and DCL can't handle command # line lengths in excess of 256 characters. # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS) # is guaranteed to overflow the buffer. -gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) +gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads $(MAKE) -C $(RTSDIR) \ CC="`echo \"$(GCC_FOR_TARGET)\" \ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ diff --git a/gcc-4.6/gcc/ada/gcc-interface/decl.c b/gcc-4.6/gcc/ada/gcc-interface/decl.c index e576895..58459d4 100644 --- a/gcc-4.6/gcc/ada/gcc-interface/decl.c +++ b/gcc-4.6/gcc/ada/gcc-interface/decl.c @@ -808,16 +808,30 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) && No (Address_Clause (gnat_entity)))) && TREE_CODE (TYPE_SIZE (gnu_type)) == INTEGER_CST) { - /* No point in jumping through all the hoops needed in order + unsigned int size_cap, align_cap; + + /* No point in promoting the alignment if this doesn't prevent + BLKmode access to the object, in particular block copy, as + this will for example disable the NRV optimization for it. + No point in jumping through all the hoops needed in order to support BIGGEST_ALIGNMENT if we don't really have to. So we cap to the smallest alignment that corresponds to a known efficient memory access pattern of the target. */ - unsigned int align_cap = Is_Atomic (gnat_entity) - ? BIGGEST_ALIGNMENT - : get_mode_alignment (ptr_mode); + if (Is_Atomic (gnat_entity)) + { + size_cap = UINT_MAX; + align_cap = BIGGEST_ALIGNMENT; + } + else + { + size_cap = MAX_FIXED_MODE_SIZE; + align_cap = get_mode_alignment (ptr_mode); + } if (!host_integerp (TYPE_SIZE (gnu_type), 1) - || compare_tree_int (TYPE_SIZE (gnu_type), align_cap) >= 0) + || compare_tree_int (TYPE_SIZE (gnu_type), size_cap) > 0) + align = 0; + else if (compare_tree_int (TYPE_SIZE (gnu_type), align_cap) > 0) align = align_cap; else align = ceil_alignment (tree_low_cst (TYPE_SIZE (gnu_type), 1)); @@ -6422,6 +6436,7 @@ maybe_pad_type (tree type, tree size, unsigned int align, if (align != 0 && TREE_CODE (type) == RECORD_TYPE && TYPE_MODE (type) == BLKmode + && !TREE_ADDRESSABLE (type) && TREE_CODE (orig_size) == INTEGER_CST && !TREE_OVERFLOW (orig_size) && compare_tree_int (orig_size, MAX_FIXED_MODE_SIZE) <= 0 diff --git a/gcc-4.6/gcc/ada/gcc-interface/trans.c b/gcc-4.6/gcc/ada/gcc-interface/trans.c index b60cccf..2925395 100644 --- a/gcc-4.6/gcc/ada/gcc-interface/trans.c +++ b/gcc-4.6/gcc/ada/gcc-interface/trans.c @@ -6276,6 +6276,28 @@ gnat_gimplify_expr (tree *expr_p, gimple_seq *pre_p, return GS_UNHANDLED; + case VIEW_CONVERT_EXPR: + op = TREE_OPERAND (expr, 0); + + /* If we are view-converting a CONSTRUCTOR or a call from an aggregate + type to a scalar one, explicitly create the local temporary. That's + required if the type is passed by reference. */ + if ((TREE_CODE (op) == CONSTRUCTOR || TREE_CODE (op) == CALL_EXPR) + && AGGREGATE_TYPE_P (TREE_TYPE (op)) + && !AGGREGATE_TYPE_P (TREE_TYPE (expr))) + { + tree mod, new_var = create_tmp_var_raw (TREE_TYPE (op), "C"); + gimple_add_tmp_var (new_var); + + mod = build2 (INIT_EXPR, TREE_TYPE (new_var), new_var, op); + gimplify_and_add (mod, pre_p); + + TREE_OPERAND (expr, 0) = new_var; + return GS_OK; + } + + return GS_UNHANDLED; + case DECL_EXPR: op = DECL_EXPR_DECL (expr); diff --git a/gcc-4.6/gcc/ada/gnatvsn.ads b/gcc-4.6/gcc/ada/gnatvsn.ads index c73824e..1224b3b 100644 --- a/gcc-4.6/gcc/ada/gnatvsn.ads +++ b/gcc-4.6/gcc/ada/gnatvsn.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -92,7 +92,7 @@ package Gnatvsn is Verbose_Library_Version : constant String := "GNAT Lib v" & Library_Version; -- Version string stored in e.g. ALI files - Current_Year : constant String := "2010"; + Current_Year : constant String := "2011"; -- Used in printing copyright messages end Gnatvsn; diff --git a/gcc-4.6/gcc/ada/init.c b/gcc-4.6/gcc/ada/init.c index 9b6370e..f6c1a5b 100644 --- a/gcc-4.6/gcc/ada/init.c +++ b/gcc-4.6/gcc/ada/init.c @@ -2216,12 +2216,33 @@ __gnat_is_stack_guard (mach_vm_address_t addr) return 0; } +#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE + +void +__gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, + void *ucontext ATTRIBUTE_UNUSED) +{ +#if defined (__x86_64__) + /* Work around radar #10302855/pr50678, where the unwinders (libunwind or + libgcc_s depending on the system revision) and the DWARF unwind data for + the sigtramp have different ideas about register numbering (causing rbx + and rdx to be transposed).. */ + ucontext_t *uc = (ucontext_t *)ucontext ; + unsigned long t = uc->uc_mcontext->__ss.__rbx; + + uc->uc_mcontext->__ss.__rbx = uc->uc_mcontext->__ss.__rdx; + uc->uc_mcontext->__ss.__rdx = t; +#endif +} + static void -__gnat_error_handler (int sig, siginfo_t *si, void *ucontext ATTRIBUTE_UNUSED) +__gnat_error_handler (int sig, siginfo_t *si, void *ucontext) { struct Exception_Data *exception; const char *msg; + __gnat_adjust_context_for_raise (sig, ucontext); + switch (sig) { case SIGSEGV: diff --git a/gcc-4.6/gcc/ada/mlib-tgt-specific-darwin.adb b/gcc-4.6/gcc/ada/mlib-tgt-specific-darwin.adb index 5bab21d..fc66423 100644 --- a/gcc-4.6/gcc/ada/mlib-tgt-specific-darwin.adb +++ b/gcc-4.6/gcc/ada/mlib-tgt-specific-darwin.adb @@ -36,8 +36,6 @@ package body MLib.Tgt.Specific is -- Non default subprograms - function Archive_Indexer_Options return String_List_Access; - procedure Build_Dynamic_Library (Ofiles : Argument_List; Options : Argument_List; @@ -67,15 +65,6 @@ package body MLib.Tgt.Specific is (1 => Flat_Namespace'Access, 2 => Shared_Libgcc'Access); - ----------------------------- - -- Archive_Indexer_Options -- - ----------------------------- - - function Archive_Indexer_Options return String_List_Access is - begin - return new String_List'(1 => new String'("-c")); - end Archive_Indexer_Options; - --------------------------- -- Build_Dynamic_Library -- --------------------------- @@ -180,7 +169,6 @@ package body MLib.Tgt.Specific is end Is_Archive_Ext; begin - Archive_Indexer_Options_Ptr := Archive_Indexer_Options'Access; Build_Dynamic_Library_Ptr := Build_Dynamic_Library'Access; DLL_Ext_Ptr := DLL_Ext'Access; Dynamic_Option_Ptr := Dynamic_Option'Access; diff --git a/gcc-4.6/gcc/ada/system-darwin-ppc64.ads b/gcc-4.6/gcc/ada/system-darwin-ppc64.ads new file mode 100644 index 0000000..c4d3c14 --- /dev/null +++ b/gcc-4.6/gcc/ada/system-darwin-ppc64.ads @@ -0,0 +1,149 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M -- +-- -- +-- S p e c -- +-- (Darwin/PPC64 Version) -- +-- -- +-- Copyright (C) 2011, Free Software Foundation, Inc. -- +-- -- +-- This specification is derived from the Ada Reference Manual for use with -- +-- GNAT. The copyright notice above, and the license provisions that follow -- +-- apply solely to the contents of the part following the private keyword. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 3, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. -- +-- -- +-- As a special exception under Section 7 of GPL version 3, you are granted -- +-- additional permissions described in the GCC Runtime Library Exception, -- +-- version 3.1, as published by the Free Software Foundation. -- +-- -- +-- You should have received a copy of the GNU General Public License and -- +-- a copy of the GCC Runtime Library Exception along with this program; -- +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- +-- <http://www.gnu.org/licenses/>. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +package System is + pragma Pure; + -- Note that we take advantage of the implementation permission to make + -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada + -- 2005, this is Pure in any case (AI-362). + + type Name is (SYSTEM_NAME_GNAT); + System_Name : constant Name := SYSTEM_NAME_GNAT; + + -- System-Dependent Named Numbers + + Min_Int : constant := Long_Long_Integer'First; + Max_Int : constant := Long_Long_Integer'Last; + + Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size; + Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; + + Max_Base_Digits : constant := Long_Long_Float'Digits; + Max_Digits : constant := Long_Long_Float'Digits; + + Max_Mantissa : constant := 63; + Fine_Delta : constant := 2.0 ** (-Max_Mantissa); + + Tick : constant := 0.01; + + -- Storage-related Declarations + + type Address is private; + pragma Preelaborable_Initialization (Address); + Null_Address : constant Address; + + Storage_Unit : constant := 8; + Word_Size : constant := 64; + Memory_Size : constant := 2 ** 64; + + -- Address comparison + + function "<" (Left, Right : Address) return Boolean; + function "<=" (Left, Right : Address) return Boolean; + function ">" (Left, Right : Address) return Boolean; + function ">=" (Left, Right : Address) return Boolean; + function "=" (Left, Right : Address) return Boolean; + + pragma Import (Intrinsic, "<"); + pragma Import (Intrinsic, "<="); + pragma Import (Intrinsic, ">"); + pragma Import (Intrinsic, ">="); + pragma Import (Intrinsic, "="); + + -- Other System-Dependent Declarations + + type Bit_Order is (High_Order_First, Low_Order_First); + Default_Bit_Order : constant Bit_Order := High_Order_First; + pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning + + -- Priority-related Declarations (RM D.1) + + -- The values defined here are copied from the ppc version. + + Max_Interrupt_Priority : constant Positive := 63; + Max_Priority : constant Positive := Max_Interrupt_Priority - 1; + + subtype Any_Priority is Integer range 0 .. Max_Interrupt_Priority; + subtype Priority is Any_Priority range 0 .. Max_Priority; + subtype Interrupt_Priority is Any_Priority + range Priority'Last + 1 .. Max_Interrupt_Priority; + + Default_Priority : constant Priority := + (Priority'Last - Priority'First) / 2; + +private + + type Address is mod Memory_Size; + Null_Address : constant Address := 0; + + -------------------------------------- + -- System Implementation Parameters -- + -------------------------------------- + + -- These parameters provide information about the target that is used + -- by the compiler. They are in the private part of System, where they + -- can be accessed using the special circuitry in the Targparm unit + -- whose source should be consulted for more detailed descriptions + -- of the individual switch values. + + Backend_Divide_Checks : constant Boolean := False; + Backend_Overflow_Checks : constant Boolean := True; + Command_Line_Args : constant Boolean := True; + Configurable_Run_Time : constant Boolean := False; + Denorm : constant Boolean := True; + Duration_32_Bits : constant Boolean := False; + Exit_Status_Supported : constant Boolean := True; + Fractional_Fixed_Ops : constant Boolean := False; + Frontend_Layout : constant Boolean := False; + Machine_Overflows : constant Boolean := False; + Machine_Rounds : constant Boolean := True; + Preallocated_Stacks : constant Boolean := False; + Signed_Zeros : constant Boolean := True; + Stack_Check_Default : constant Boolean := False; + Stack_Check_Probes : constant Boolean := False; + Stack_Check_Limits : constant Boolean := False; + Support_64_Bit_Divides : constant Boolean := True; + Support_Aggregates : constant Boolean := True; + Support_Composite_Assign : constant Boolean := True; + Support_Composite_Compare : constant Boolean := True; + Support_Long_Shifts : constant Boolean := True; + Always_Compatible_Rep : constant Boolean := False; + Suppress_Standard_Library : constant Boolean := False; + Use_Ada_Main_Program_Name : constant Boolean := False; + ZCX_By_Default : constant Boolean := True; + GCC_ZCX_Support : constant Boolean := True; + +end System; diff --git a/gcc-4.6/gcc/ada/tracebak.c b/gcc-4.6/gcc/ada/tracebak.c index c16741d..d1f74b4 100644 --- a/gcc-4.6/gcc/ada/tracebak.c +++ b/gcc-4.6/gcc/ada/tracebak.c @@ -199,10 +199,24 @@ extern void (*Unlock_Task) (void); */ -/*--------------------------- PPC AIX/Darwin ----------------------------*/ +/*--------------------------- Darwin 8 or newer ----------------------------*/ +#if defined (__APPLE__) \ + && defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \ + && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1040 + +#define USE_GCC_UNWINDER + +#if defined (__i386__) || defined (__x86_64__) +#define PC_ADJUST -2 +#elif defined (__ppc__) || defined (__ppc64__) +#define PC_ADJUST -4 +#else +#error Unhandled darwin architecture. +#endif -#if ((defined (_POWER) && defined (_AIX)) || \ -(defined (__ppc__) && defined (__APPLE__))) +/*------------------------ PPC AIX/Older Darwin -------------------------*/ +#elif ((defined (_POWER) && defined (_AIX)) \ + || (defined (__APPLE__) && defined (__ppc__))) #define USE_GENERIC_UNWINDER |