diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-04 20:07:59 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-04 20:07:59 +0000 |
commit | 06cad3c357b6c1e24b60e5a0b762899afb4e9c1d (patch) | |
tree | 28ae5ff52099c78e96fc398130cfadce19b0bdfe | |
parent | e3e44e096cafece02f2f85a7cba7d8199ffc71cb (diff) | |
download | gcc-06cad3c357b6c1e24b60e5a0b762899afb4e9c1d.tar.gz |
2008-06-04 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r136369
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@136370 138bc75d-0d04-0410-961f-82ee72b054a4
88 files changed, 587 insertions, 379 deletions
diff --git a/ChangeLog.melt b/ChangeLog.melt index e5ee3dd83ea..1329c466fa5 100644 --- a/ChangeLog.melt +++ b/ChangeLog.melt @@ -1,3 +1,6 @@ +2008-06-04 Basile Starynkevitch <basile@starynkevitch.net> + MELT branch merged with trunk r136369 + 2008-06-03 Basile Starynkevitch <basile@starynkevitch.net> MELT branch merged with trunk r136317 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b42de54c2c4..ed7c58c5c82 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,78 @@ +2008-06-04 Richard Guenther <rguenther@suse.de> + + * tree-flow-inline.h (is_global_var): Do not check TREE_STATIC + on MTAGs. + (is_call_clobbered): Always check var_ann->call_clobbered. + (mark_call_clobbered): Always set var_ann->call_clobbered. + (clear_call_clobbered): Always clear var_ann->call_clobbered. + * tree-ssa-alias.c (mark_non_addressable): Use clear_call_clobbered. + (reset_alias_info): Clear call clobbering info on MTAGs and + globals as well. + (set_pt_anything): Set pt_global_mem. + (create_tag_raw): Adjust comment. + (may_be_aliased): Do not check TREE_PUBLIC on MTAGs. + +2008-06-04 Joseph Myers <joseph@codesourcery.com> + Maxim Kuvyrkov <maxim@codesourcery.com> + + * config/m68k/m68k.opt (mxgot): New option. + * config/m68k/m68k.c (legitimize_pic_address): Handle -mxgot. + (m68k_output_addr_const_extra): New. + * config/m68k/m68k.h (OUTPUT_ADDR_CONST_EXTRA): New. + * config/m68k/m68k-protos.h (m68k_output_addr_const_extra): Declare. + * config/m68k/m68k.md (UNSPEC_GOTOFF): Define. + * doc/invoke.texi (M680x0 Options): Document -mxgot. + +2008-06-04 Richard Guenther <rguenther@suse.de> + + * tree-ssa-structalias.c (handle_ptr_arith): Correctly handle + negative or non-representable offsets. + +2008-06-03 H.J. Lu <hongjiu.lu@intel.com> + + * config/i386/i386.c (ix86_gen_leave): New. + (ix86_gen_pop1): Likewise. + (ix86_gen_add3): Likewise. + (ix86_gen_sub3): Likewise. + (ix86_gen_sub3_carry): Likewise. + (ix86_gen_one_cmpl2): Likewise. + (ix86_gen_monitor): Likewise. + (override_options): Initialize ix86_gen_leave, ix86_gen_pop1, + ix86_gen_add3, ix86_gen_sub3, ix86_gen_sub3_carry, + ix86_gen_one_cmpl2 and ix86_gen_monitor. + (ix86_file_end): Use mov%z0 instead of mov{q}/mov{l}. + (output_set_got): Use mov%z0, pop%z0 and add%z0 instead of + mov{q}/mov{l}, pop{q}/pop{l} and add{q}/add{l}. + (ix86_expand_epilogue): Updated. + (print_operand): Handle integer register operand for 'z'. + (ix86_expand_strlensi_unroll_1): Likewise. + (ix86_expand_strlen): Likewise. + (ix86_expand_builtin): Likewise. + (x86_output_mi_thunk): Use mov%z1 and add%z1 instead of + mov{q}/mov{l} and add{q}/add{l}. + +2008-06-03 Kai Tietz <kai.tietz@onevision.com> + + * config/i386/i386.md (P): New mode iterator. + (SFmode push_operand splitter): Macroize DImode and SImode pushes + using P mode iterator. + (DFmode push_operand splitter): Ditto. + (XFmode push_operand splitter): Ditto. + (DFmode float_extend SFmode push_operand splitter): Ditto. + (XFmode float_extend SFmode push_operand splitter): Do not generate + SImode pushes for 64bit target. Macroize Dimode and SImode + pushes using P mode iterator. + (XFmode float_extend DFmode push_operand splitter): Ditto. + +2008-06-03 Kai Tietz <kai.tietz@onevision.com> + + * config/i386/i386-protos.h (ix86_reg_parm_stack_space): New. + * config/i386/i386.h (ix86_reg_parm_stack_space): Removed + prototype. + * config/i386/i386.c (ix86_reg_parm_stack_space): Changed + return type to int. + (ix86_call_abi_override): Remove check for call_used_regs. + 2008-06-03 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (find_func_aliases): Add constraints diff --git a/gcc/ChangeLog.melt b/gcc/ChangeLog.melt index 73e5da3ac55..d453c56e75c 100644 --- a/gcc/ChangeLog.melt +++ b/gcc/ChangeLog.melt @@ -1,4 +1,7 @@ 2008-06-04 Basile Starynkevitch <basile@starynkevitch.net> + MELT branch merged with trunk r136369 + +2008-06-04 Basile Starynkevitch <basile@starynkevitch.net> * melt/warm-basilys.bysl: generating a separate static initialize_module_cdata routine to make the start_module_basilys routine less huge. diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index e58334c1e1f..71b6316e95e 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20080603 +20080604 diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 48aee98d33b..329630fd6e2 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,21 @@ +2008-06-04 Samuel Tardieu <sam@rfc1149.net> + + * einfo.ads, einfo.adb: Remove unused flag Function_Returns_With_DSP. + +2008-06-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + * Makefile.in (common_tools): Fix typos in $(exeext) extension. + * gnat_ugn.texi (Style Checking) + (Adding the Results of Compiler Checks to gnatcheck Output) + (Example of Binder Output File): Fix typos. + * ali.ads, einfo.ads, exp_ch4.adb, exp_ch6.adb, + exp_dbug.ads, exp_dist.adb, exp_smem.adb, g-socket.ads, + s-osinte-rtems.ads, s-shasto.ads, s-stausa.adb, + s-stausa.ads, sem_cat.adb, sem_ch12.adb, sem_ch3.adb, + sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_util.ads, + sinfo.ads, utils.c: Fix typos in comments. + * sem_ch6.adb, vms_data.ads: Fix typos in strings. + 2008-05-29 Thomas Quinot <quinot@adacore.com> * sem_eval.adb: Minor reformatting diff --git a/gcc/ada/Makefile.in b/gcc/ada/Makefile.in index 4fc101a6ffb..9ffc02e2110 100644 --- a/gcc/ada/Makefile.in +++ b/gcc/ada/Makefile.in @@ -1781,23 +1781,23 @@ common-tools: --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \ gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \ gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS) - $(GNATLINK) -v gnatcmd -o ../../gnat$(exext) \ + $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatchop -o ../../gnatchop$(exext) \ + $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatkr -o ../../gnatkr$(exext) \ + $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatls -o ../../gnatls$(exext) \ + $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatprep -o ../../gnatprep$(exext) \ + $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatxref -o ../../gnatxref$(exext) \ + $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatfind -o ../../gnatfind$(exext) \ + $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatname -o ../../gnatname$(exext) \ + $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatclean -o ../../gnatclean$(exext) \ + $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) ../../gnatsym$(exeext): diff --git a/gcc/ada/ali.ads b/gcc/ada/ali.ads index dd3b6cd6577..3e95595edca 100644 --- a/gcc/ada/ali.ads +++ b/gcc/ada/ali.ads @@ -444,7 +444,7 @@ package ALI is Float_Format_Specified : Character := ' '; -- Set to blank by Initialize_ALI. Set to appropriate float format - -- character (V or I, see Opt.Float_Format) if an an ali file that + -- character (V or I, see Opt.Float_Format) if an ali file that -- is read contains an F line setting the floating point format. Initialize_Scalars_Used : Boolean := False; diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index fa212a76bed..49dffae047b 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -421,7 +421,6 @@ package body Einfo is -- Debug_Info_Off Flag166 -- Sec_Stack_Needed_For_Return Flag167 -- Materialize_Entity Flag168 - -- Function_Returns_With_DSP Flag169 -- Is_Known_Valid Flag170 -- Is_Hidden_Open_Scope Flag171 @@ -506,6 +505,7 @@ package body Einfo is -- Overlays_Constant Flag243 -- Is_RACW_Stub_Type Flag244 + -- (unused) Flag169 -- (unused) Flag245 -- (unused) Flag246 -- (unused) Flag247 @@ -1098,13 +1098,6 @@ package body Einfo is return Node11 (Id); end Full_View; - function Function_Returns_With_DSP (Id : E) return B is - begin - pragma Assert - (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type); - return Flag169 (Id); - end Function_Returns_With_DSP; - function Generic_Homonym (Id : E) return E is begin pragma Assert (Ekind (Id) = E_Generic_Package); @@ -3505,13 +3498,6 @@ package body Einfo is Set_Node11 (Id, V); end Set_Full_View; - procedure Set_Function_Returns_With_DSP (Id : E; V : B := True) is - begin - pragma Assert - (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type); - Set_Flag169 (Id, V); - end Set_Function_Returns_With_DSP; - procedure Set_Generic_Homonym (Id : E; V : E) is begin Set_Node11 (Id, V); @@ -7472,7 +7458,6 @@ package body Einfo is W ("Can_Use_Internal_Rep", Flag229 (Id)); W ("Finalize_Storage_Only", Flag158 (Id)); W ("From_With_Type", Flag159 (Id)); - W ("Function_Returns_With_DSP", Flag169 (Id)); W ("Has_Aliased_Components", Flag135 (Id)); W ("Has_Alignment_Clause", Flag46 (Id)); W ("Has_All_Calls_Remote", Flag79 (Id)); diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index c0377a5430d..43e0e17ab1d 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -1289,17 +1289,6 @@ package Einfo is -- For all types other than private and incomplete types, this field -- always contains Empty. See also Underlying_Type. --- Function_Returns_With_DSP (Flag169) --- Present in all subprogram entities, and type entities for access --- to subprogram values. Set True if the function (or referenced --- function in the case of an access value) returns with using the --- DSP (depressed stack pointer) approach. This can only be set --- True if Targparm.Functions_Return_By_DSP_On_Target is True and --- the function returns a value of a type whose size is not known --- at compile time. --- --- Note: this flag is obsolete, it is always False ??? - -- Generic_Homonym (Node11) -- Present in generic packages. The generic homonym is the entity of -- a renaming declaration inserted in every generic unit. It is used @@ -2602,7 +2591,7 @@ package Einfo is -- Is_Remote_Call_Interface (Flag62) -- Present in all entities. Set in E_Package and E_Generic_Package --- entities to which a pragma Remote_Call_Interace is applied, and +-- entities to which a pragma Remote_Call_Interface is applied, and -- also on entities declared in the visible part of such a package. -- Is_Remote_Types (Flag61) @@ -5027,7 +5016,6 @@ package Einfo is -- Extra_Formals (Node28) -- Body_Needed_For_SAL (Flag40) -- Elaboration_Entity_Required (Flag174) - -- Function_Returns_With_DSP (Flag169) -- Default_Expressions_Processed (Flag108) -- Delay_Cleanups (Flag114) -- Delay_Subprogram_Descriptors (Flag50) @@ -5292,7 +5280,6 @@ package Einfo is -- Delay_Cleanups (Flag114) -- Discard_Names (Flag88) -- Elaboration_Entity_Required (Flag174) - -- Function_Returns_With_DSP (Flag169) (false for procedure) -- Default_Expressions_Processed (Flag108) -- Delay_Cleanups (Flag114) -- Delay_Subprogram_Descriptors (Flag50) @@ -5459,7 +5446,6 @@ package Einfo is -- First_Formal (synth) -- First_Formal_With_Extras (synth) -- Number_Formals (synth) - -- Function_Returns_With_DSP (Flag169) -- (plus type attributes) -- E_Task_Body @@ -5841,7 +5827,6 @@ package Einfo is function Freeze_Node (Id : E) return N; function From_With_Type (Id : E) return B; function Full_View (Id : E) return E; - function Function_Returns_With_DSP (Id : E) return B; function Generic_Homonym (Id : E) return E; function Generic_Renamings (Id : E) return L; function Handler_Records (Id : E) return S; @@ -6399,7 +6384,6 @@ package Einfo is procedure Set_Freeze_Node (Id : E; V : N); procedure Set_From_With_Type (Id : E; V : B := True); procedure Set_Full_View (Id : E; V : E); - procedure Set_Function_Returns_With_DSP (Id : E; V : B := True); procedure Set_Generic_Homonym (Id : E; V : E); procedure Set_Generic_Renamings (Id : E; V : L); procedure Set_Handler_Records (Id : E; V : S); @@ -7047,7 +7031,6 @@ package Einfo is pragma Inline (Freeze_Node); pragma Inline (From_With_Type); pragma Inline (Full_View); - pragma Inline (Function_Returns_With_DSP); pragma Inline (Generic_Homonym); pragma Inline (Generic_Renamings); pragma Inline (Handler_Records); @@ -7472,7 +7455,6 @@ package Einfo is pragma Inline (Set_Freeze_Node); pragma Inline (Set_From_With_Type); pragma Inline (Set_Full_View); - pragma Inline (Set_Function_Returns_With_DSP); pragma Inline (Set_Generic_Homonym); pragma Inline (Set_Generic_Renamings); pragma Inline (Set_Handler_Records); diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 2d275a9bc80..798da67036e 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -2422,7 +2422,7 @@ package body Exp_Ch4 is begin -- If the index type is an enumeration type, the computation can be -- done in standard integer. Otherwise, choose a large enough integer - -- type to accomodate the index type computation. + -- type to accommodate the index type computation. if Is_Enumeration_Type (Ind_Typ) or else Root_Type (Ind_Typ) = Standard_Integer @@ -5947,7 +5947,7 @@ package body Exp_Ch4 is -- the mod value is always 0, and we can just ignore the left operand -- completely in this case. - -- The operand type may be private (e.g. in the expansion of an an + -- The operand type may be private (e.g. in the expansion of an -- intrinsic operation) so we must use the underlying type to get the -- bounds, and convert the literals explicitly. diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 3afb7696770..cddc0210241 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -3839,7 +3839,7 @@ package body Exp_Ch6 is Make_Defining_Identifier (Loc, New_Internal_Name ('C')); Set_Is_Internal (Temp); - -- For the unconstrained case. the generated temporary has the + -- For the unconstrained case, the generated temporary has the -- same constrained declaration as the result variable. -- It may eventually be possible to remove that temporary and -- use the result variable directly. @@ -3967,7 +3967,7 @@ package body Exp_Ch6 is -- If the return value of a foreign compiled function is -- VAX Float then expand the return (adjusts the location - -- of the return value on Alpha/VMS, noop everywere else). + -- of the return value on Alpha/VMS, noop everywhere else). -- Comes_From_Source intercepts recursive expansion. if Vax_Float (Etype (N)) diff --git a/gcc/ada/exp_dbug.ads b/gcc/ada/exp_dbug.ads index 9a9d5377d83..2f8b3223368 100644 --- a/gcc/ada/exp_dbug.ads +++ b/gcc/ada/exp_dbug.ads @@ -358,7 +358,7 @@ package Exp_Dbug is -- the protected/non-locking version of the operation. -- Operations generated for protected entries follow the same encoding. - -- Each entry results in two suprograms: a procedure that holds the + -- Each entry results in two subprograms: a procedure that holds the -- entry body, and a function that holds the evaluation of the barrier. -- The names of these subprograms include the prefix '_E' or '_B' res- -- pectively. The names also include a numeric suffix to render them diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb index 973948c4287..c22239277bf 100644 --- a/gcc/ada/exp_dist.adb +++ b/gcc/ada/exp_dist.adb @@ -3087,7 +3087,7 @@ package body Exp_Dist is Set_Etype (Stubbed_Result, Stub_Type_Access); -- If the Address is Null_Address, then return a null object, unless - -- RACW_Type is null-excluding, in which case inconditionally raise + -- RACW_Type is null-excluding, in which case unconditionally raise -- CONSTRAINT_ERROR instead. declare diff --git a/gcc/ada/exp_smem.adb b/gcc/ada/exp_smem.adb index 0e3fc2379a4..60d1385f15a 100644 --- a/gcc/ada/exp_smem.adb +++ b/gcc/ada/exp_smem.adb @@ -300,7 +300,7 @@ package body Exp_Smem is -- with Ent. Instantiation : Node_Id; - -- Package instanciation node for SVP_Instance + -- Package instantiation node for SVP_Instance -- Start of processing for Make_Shared_Var_Procs @@ -308,7 +308,7 @@ package body Exp_Smem is Build_Full_Name (Ent, Vnm); -- We turn off Shared_Passive during construction and analysis of - -- the generic package instantition, to avoid improper attempts to + -- the generic package instantiation, to avoid improper attempts to -- process the variable references within these instantiation. Set_Is_Shared_Passive (Ent, False); diff --git a/gcc/ada/g-socket.ads b/gcc/ada/g-socket.ads index 7ebf243904e..58255f0880e 100644 --- a/gcc/ada/g-socket.ads +++ b/gcc/ada/g-socket.ads @@ -788,7 +788,7 @@ package GNAT.Sockets is Status : out Selector_Status); -- Accept a new connection on Server using Accept_Socket, waiting no longer -- than the given timeout duration. Status is set to indicate whether the - -- operation completed successully, timed out, or was aborted. If Selector + -- operation completed successfully, timed out, or was aborted. If Selector -- is not null, the designated selector is used to wait for the socket to -- become available, else a private selector object is created by this -- procedure and destroyed before it returns. @@ -816,7 +816,7 @@ package GNAT.Sockets is Status : out Selector_Status); -- Connect Socket to the given Server address using Connect_Socket, waiting -- no longer than the given timeout duration. Status is set to indicate - -- whether the operation completed successully, timed out, or was aborted. + -- whether the operation completed successfully, timed out, or was aborted. -- If Selector is not null, the designated selector is used to wait for the -- socket to become available, else a private selector object is created -- by this procedure and destroyed before it returns. @@ -1049,7 +1049,7 @@ package GNAT.Sockets is -- it is used in the visible part of GNAT.Sockets.Thin_Common. This is -- really an inversion of abstraction. The private part of GNAT.Sockets -- needs to have visibility on this type, but since Thin_Common is a child - -- of Sokcets, the type can't be declared there. The correct fix would + -- of Sockets, the type can't be declared there. The correct fix would -- be to move the thin sockets binding outside of GNAT.Sockets altogether, -- e.g. by renaming it to GNAT.Sockets_Thin. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index d40d0e86199..2aac8e8297b 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -6134,7 +6134,7 @@ use @option{L} parameter witout any integer value after that, because any digit following @option{-} in the parameter string of the @option{-gnaty} option will be threated as canceling indentation check. The same is true for @option{M} parameter. @option{y} and @option{N} parameters are not -alloved after @option{-}. +allowed after @option{-}. @item + This causes any subsequent options in the string to enable the corresponding @@ -20401,7 +20401,7 @@ gnat_rm, GNAT Reference Manual}). Note, that in case of gnatcheck 's' parameter, that corresponds to the GNAT @option{-gnatws} option, disables all the specific warnings, but not suppresses the warning mode, and 'e' parameter, corresponding to @option{-gnatwe} that means -"therat warnings as errors", does not have any effect. +"treat warnings as errors", does not have any effect. @end table @@ -26224,7 +26224,7 @@ package body ada_main is -- a-except.ads/adb for full details of how zero cost -- exception handling works. This procedure, the call to -- it, and the two following tables are all omitted if the - -- build is in longjmp/setjump exception mode. + -- build is in longjmp/setjmp exception mode. @findex SDP_Table_Build @findex Zero Cost Exceptions @@ -26299,7 +26299,7 @@ package body ada_main is -- Call SDP_Table_Build to build the top level procedure -- table for zero cost exception handling (omitted in - -- longjmp/setjump mode). + -- longjmp/setjmp mode). SDP_Table_Build (ST'Address, 23, EA'Address, 23); diff --git a/gcc/ada/s-osinte-rtems.ads b/gcc/ada/s-osinte-rtems.ads index 8d5483b6c38..6d28ec5ef30 100644 --- a/gcc/ada/s-osinte-rtems.ads +++ b/gcc/ada/s-osinte-rtems.ads @@ -146,7 +146,7 @@ package System.OS_Interface is SA_SIGINFO : constant := 16#02#; SA_ONSTACK : constant := 16#00#; - -- SA_ONSTACK is not defined on RTEMS, but it is refered to in the POSIX + -- SA_ONSTACK is not defined on RTEMS, but it is referred to in the POSIX -- implementation of System.Interrupt_Management. Therefore we define a -- dummy value of zero here so that setting this flag is a nop. diff --git a/gcc/ada/s-shasto.ads b/gcc/ada/s-shasto.ads index 8046fd5b2f6..2fd0341b7b6 100644 --- a/gcc/ada/s-shasto.ads +++ b/gcc/ada/s-shasto.ads @@ -79,7 +79,7 @@ -- The approach is as follows: --- For each shared variable, var, an instanciation of the below generic +-- For each shared variable, var, an instantiation of the below generic -- package is created which provides Read and Write supporting procedures. -- The routine Shared_Var_ROpen in package System.Shared_Storage @@ -214,7 +214,7 @@ package System.Shared_Storage is -- the shared storage. procedure Write; - -- Shared passive variable assignement routine. Each assignment to + -- Shared passive variable assignment routine. Each assignment to -- the shared variable, V, is followed by a call to the corresponding -- Write procedure, which writes the new value to the shared storage. diff --git a/gcc/ada/s-stausa.adb b/gcc/ada/s-stausa.adb index 07668da318e..700c685ea27 100644 --- a/gcc/ada/s-stausa.adb +++ b/gcc/ada/s-stausa.adb @@ -261,7 +261,7 @@ package body System.Stack_Usage is Current_Stack_Level : aliased Integer; begin - -- Reajust the pattern size. When we arrive in this function, there is + -- Readjust the pattern size. When we arrive in this function, there is -- already a given amount of stack used, that we won't analyze. Analyzer.Stack_Used_When_Filling := diff --git a/gcc/ada/s-stausa.ads b/gcc/ada/s-stausa.ads index 7c500bffaec..8a6e2b67cb5 100644 --- a/gcc/ada/s-stausa.ads +++ b/gcc/ada/s-stausa.ads @@ -216,7 +216,7 @@ package System.Stack_Usage is -- Max_Pattern_Size is the size of the pattern zone, might be smaller than -- the full stack size in order to take into account e.g. the secondary -- stack and a guard against overflow. The actual size taken will be - -- reajusted with data already used at the time the stack is actually + -- readjusted with data already used at the time the stack is actually -- filled. Is_Enabled : Boolean := False; diff --git a/gcc/ada/sem_cat.adb b/gcc/ada/sem_cat.adb index 3e4a036fb8d..367f25555c1 100644 --- a/gcc/ada/sem_cat.adb +++ b/gcc/ada/sem_cat.adb @@ -1394,7 +1394,7 @@ package body Sem_Cat is elsif Ekind (Param_Type) = E_Anonymous_Access_Type or else Ekind (Param_Type) = E_Anonymous_Access_Subprogram_Type then - -- From RM E.2.2(14), no anonumous access parameter other than + -- From RM E.2.2(14), no anonymous access parameter other than -- controlling ones may be used (because an anonymous access -- type never supports external streaming). diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 4a7c91f1c95..cae84097d1a 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -454,7 +454,7 @@ package body Sem_Ch12 is Inst : Node_Id) return Boolean; -- True if the instantiation Inst and the given freeze_node F_Node appear -- within the same declarative part, ignoring subunits, but with no inter- - -- vening suprograms or concurrent units. If true, the freeze node + -- vening subprograms or concurrent units. If true, the freeze node -- of the instance can be placed after the freeze node of the parent, -- which it itself an instance. diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index f0065b73901..b6ccb6028fc 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -11339,7 +11339,7 @@ package body Sem_Ch3 is and then Is_Tagged_Type (Tagged_Type) and then Has_Interfaces (Tagged_Type)); - -- Step 1: Transfer to the full-view primitives asociated with the + -- Step 1: Transfer to the full-view primitives associated with the -- partial-view that cover interface primitives. Conceptually this -- work should be done later by Process_Full_View; done here to -- simplify its implementation at later stages. It can be safely diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index b59cd4b5186..e14fb436d6b 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -2246,7 +2246,7 @@ package body Sem_Ch4 is end if; -- If the call has been transformed into a slice, it is of the form - -- F (Subtype) where F is paramterless. The node has ben rewritten in + -- F (Subtype) where F is parameterless. The node has been rewritten in -- Try_Indexed_Call and there is nothing else to do. if Is_Indexed diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 640a20d0a54..0116a83517c 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -1370,7 +1370,7 @@ package body Sem_Ch6 is Plist : List_Id; function Is_Inline_Pragma (N : Node_Id) return Boolean; - -- True when N is a pragma Inline or Inline_Awlays that applies + -- True when N is a pragma Inline or Inline_Always that applies -- to this subprogram. ----------------------- @@ -3555,7 +3555,7 @@ package body Sem_Ch6 is if not Is_Overriding_Operation (Op) then Error_Msg_N ("\\primitive % defined #", Typ); else - Error_Msg_N ("\\overridding operation % with " & + Error_Msg_N ("\\overriding operation % with " & "convention % defined #", Typ); end if; diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index 6ebb647b86f..c5edce6d085 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -1729,7 +1729,7 @@ package body Sem_Ch8 is then -- Input stream functions are abstract if the object type is -- abstract. Similarly, all default stream functions for an - -- interface type are abstract. However, these suprograms may + -- interface type are abstract. However, these subprograms may -- receive explicit declarations in representation clauses, making -- the attribute subprograms usable as defaults in subsequent -- type extensions. @@ -3851,7 +3851,7 @@ package body Sem_Ch8 is Only_One_Visible := False; All_Overloadable := All_Overloadable and Is_Overloadable (E2); - -- Ada 2005 (AI-262): Protect against a form of Beujolais effect + -- Ada 2005 (AI-262): Protect against a form of Beaujolais effect -- that can occur in private_with clauses. Example: -- with A; diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index bbd4c864a3e..64d5cfb674b 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -942,8 +942,8 @@ package Sem_Util is -- Returns True if the names of both entities correspond with matching -- primitives. This routine includes support for the case in which one -- or both entities correspond with entities built by Derive_Subprogram - -- with a special name to avoid being overriden (ie. return true in case - -- of entities with names "nameP" and "name" or viceversa). + -- with a special name to avoid being overridden (i.e. return true in case + -- of entities with names "nameP" and "name" or vice versa). function Private_Component (Type_Id : Entity_Id) return Entity_Id; -- Returns some private component (if any) of the given Type_Id. diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index c2043b1153a..29404b2332b 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -3266,7 +3266,7 @@ package Sinfo is -- to Ada 2005 (AI-287). ---------------------------------- - -- 4.3.1 Cmmponent Choice List -- + -- 4.3.1 Component Choice List -- ---------------------------------- -- COMPONENT_CHOICE_LIST ::= diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index 8dd445fd8cd..4d10940370e 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -95,7 +95,7 @@ static tree handle_type_generic_attribute (tree *, tree, tree, int, bool *); static tree fake_attribute_handler (tree *, tree, tree, int, bool *); /* Table of machine-independent internal attributes for Ada. We support - this minimal set ot attributes to accomodate the needs of builtins. */ + this minimal set of attributes to accommodate the needs of builtins. */ const struct attribute_spec gnat_internal_attribute_table[] = { /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ diff --git a/gcc/ada/vms_data.ads b/gcc/ada/vms_data.ads index 545080f11f6..3270e8f55b5 100644 --- a/gcc/ada/vms_data.ads +++ b/gcc/ada/vms_data.ads @@ -6601,7 +6601,7 @@ package VMS_Data is -- -- Output the execution time - S_Sync_Details : aliased constant S := "/DETAILs=" & + S_Sync_Details : aliased constant S := "/DETAILS=" & "MEDIUM " & "-om " & "SHORT " & diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index a92272bdb38..8d0772dbe8b 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -141,6 +141,7 @@ extern int ix86_cfun_abi (void); extern int ix86_function_abi (const_tree); extern int ix86_function_type_abi (const_tree); extern void ix86_call_abi_override (const_tree); +extern int ix86_reg_parm_stack_space (const_tree); extern void ix86_split_fp_branch (enum rtx_code code, rtx, rtx, rtx, rtx, rtx, rtx); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index b159ce42928..81dcacd41e0 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1697,6 +1697,14 @@ static int ix86_regparm; extern int ix86_force_align_arg_pointer; static const char ix86_force_align_arg_pointer_string[] = "force_align_arg_pointer"; +static rtx (*ix86_gen_leave) (void); +static rtx (*ix86_gen_pop1) (rtx); +static rtx (*ix86_gen_add3) (rtx, rtx, rtx); +static rtx (*ix86_gen_sub3) (rtx, rtx, rtx); +static rtx (*ix86_gen_sub3_carry) (rtx, rtx, rtx, rtx); +static rtx (*ix86_gen_one_cmpl2) (rtx, rtx); +static rtx (*ix86_gen_monitor) (rtx, rtx, rtx); + /* Preferred alignment for stack boundary in bits. */ unsigned int ix86_preferred_stack_boundary; @@ -2766,6 +2774,27 @@ override_options (void) if (!TARGET_64BIT || DEFAULT_ABI == MS_ABI) targetm.expand_builtin_va_start = NULL; + if (TARGET_64BIT) + { + ix86_gen_leave = gen_leave_rex64; + ix86_gen_pop1 = gen_popdi1; + ix86_gen_add3 = gen_adddi3; + ix86_gen_sub3 = gen_subdi3; + ix86_gen_sub3_carry = gen_subdi3_carry_rex64; + ix86_gen_one_cmpl2 = gen_one_cmpldi2; + ix86_gen_monitor = gen_sse3_monitor64; + } + else + { + ix86_gen_leave = gen_leave; + ix86_gen_pop1 = gen_popsi1; + ix86_gen_add3 = gen_addsi3; + ix86_gen_sub3 = gen_subsi3; + ix86_gen_sub3_carry = gen_subsi3_carry; + ix86_gen_one_cmpl2 = gen_one_cmplsi2; + ix86_gen_monitor = gen_sse3_monitor; + } + #ifdef USE_IX86_CLD /* Use -mcld by default for 32-bit code if configured with --enable-cld. */ if (!TARGET_64BIT) @@ -3542,7 +3571,7 @@ ix86_must_pass_in_stack (enum machine_mode mode, const_tree type) /* It returns the size, in bytes, of the area reserved for arguments passed in registers for the function represented by fndecl dependent to the used abi format. */ -unsigned int +int ix86_reg_parm_stack_space (const_tree fndecl) { int call_abi = 0; @@ -3611,7 +3640,7 @@ ix86_call_abi_override (const_tree fndecl) cfun->machine->call_abi = DEFAULT_ABI; else cfun->machine->call_abi = ix86_function_type_abi (TREE_TYPE (fndecl)); - if (TARGET_64BIT && cfun->machine->call_abi == MS_ABI && call_used_regs) + if (TARGET_64BIT && cfun->machine->call_abi == MS_ABI) { if (call_used_regs[4 /*RSI*/] != 0 || call_used_regs[5 /*RDI*/] != 0) { @@ -3620,7 +3649,7 @@ ix86_call_abi_override (const_tree fndecl) init_regs (); } } - else if (TARGET_64BIT && call_used_regs) + else if (TARGET_64BIT) { if (call_used_regs[4 /*RSI*/] != 1 || call_used_regs[5 /*RDI*/] != 1) { @@ -6029,10 +6058,7 @@ ix86_file_end (void) xops[0] = gen_rtx_REG (Pmode, regno); xops[1] = gen_rtx_MEM (Pmode, stack_pointer_rtx); - if (TARGET_64BIT) - output_asm_insn ("mov{q}\t{%1, %0|%0, %1}", xops); - else - output_asm_insn ("mov{l}\t{%1, %0|%0, %1}", xops); + output_asm_insn ("mov%z0\t{%1, %0|%0, %1}", xops); output_asm_insn ("ret", xops); } @@ -6072,12 +6098,7 @@ output_set_got (rtx dest, rtx label ATTRIBUTE_UNUSED) xops[2] = gen_rtx_LABEL_REF (Pmode, label ? label : gen_label_rtx ()); if (!flag_pic) - { - if (TARGET_64BIT) - output_asm_insn ("mov{q}\t{%2, %0|%0, %2}", xops); - else - output_asm_insn ("mov{l}\t{%2, %0|%0, %2}", xops); - } + output_asm_insn ("mov%z0\t{%2, %0|%0, %2}", xops); else output_asm_insn ("call\t%a2", xops); @@ -6092,12 +6113,7 @@ output_set_got (rtx dest, rtx label ATTRIBUTE_UNUSED) CODE_LABEL_NUMBER (XEXP (xops[2], 0))); if (flag_pic) - { - if (TARGET_64BIT) - output_asm_insn ("pop{q}\t%0", xops); - else - output_asm_insn ("pop{l}\t%0", xops); - } + output_asm_insn ("pop%z0\t%0", xops); } else { @@ -6123,19 +6139,9 @@ output_set_got (rtx dest, rtx label ATTRIBUTE_UNUSED) return ""; if (!flag_pic || TARGET_DEEP_BRANCH_PREDICTION) - { - if (TARGET_64BIT) - output_asm_insn ("add{q}\t{%1, %0|%0, %1}", xops); - else - output_asm_insn ("add{l}\t{%1, %0|%0, %1}", xops); - } + output_asm_insn ("add%z0\t{%1, %0|%0, %1}", xops); else - { - if (TARGET_64BIT) - output_asm_insn ("add{q}\t{%1+[.-%a2], %0|%0, %1+(.-%a2)}", xops); - else - output_asm_insn ("add{l}\t{%1+[.-%a2], %0|%0, %1+(.-%a2)}", xops); - } + output_asm_insn ("add%z0\t{%1+[.-%a2], %0|%0, %1+(.-%a2)}", xops); return ""; } @@ -6860,16 +6866,14 @@ ix86_expand_epilogue (int style) /* If not an i386, mov & pop is faster than "leave". */ else if (TARGET_USE_LEAVE || optimize_size || !cfun->machine->use_fast_prologue_epilogue) - emit_insn (TARGET_64BIT ? gen_leave_rex64 () : gen_leave ()); + emit_insn ((*ix86_gen_leave) ()); else { pro_epilogue_adjust_stack (stack_pointer_rtx, hard_frame_pointer_rtx, const0_rtx, style); - if (TARGET_64BIT) - emit_insn (gen_popdi1 (hard_frame_pointer_rtx)); - else - emit_insn (gen_popsi1 (hard_frame_pointer_rtx)); + + emit_insn ((*ix86_gen_pop1) (hard_frame_pointer_rtx)); } } else @@ -6889,22 +6893,15 @@ ix86_expand_epilogue (int style) for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) if (ix86_save_reg (regno, false)) - { - if (TARGET_64BIT) - emit_insn (gen_popdi1 (gen_rtx_REG (Pmode, regno))); - else - emit_insn (gen_popsi1 (gen_rtx_REG (Pmode, regno))); - } + emit_insn ((*ix86_gen_pop1) (gen_rtx_REG (Pmode, regno))); if (frame_pointer_needed) { /* Leave results in shorter dependency chains on CPUs that are able to grok it fast. */ if (TARGET_USE_LEAVE) - emit_insn (TARGET_64BIT ? gen_leave_rex64 () : gen_leave ()); - else if (TARGET_64BIT) - emit_insn (gen_popdi1 (hard_frame_pointer_rtx)); + emit_insn ((*ix86_gen_leave) ()); else - emit_insn (gen_popsi1 (hard_frame_pointer_rtx)); + emit_insn ((*ix86_gen_pop1) (hard_frame_pointer_rtx)); } } @@ -9170,12 +9167,17 @@ print_operand (FILE *file, rtx x, int code) case 8: if (GET_MODE_CLASS (GET_MODE (x)) == MODE_INT) { + if (MEM_P (x)) + { #ifdef GAS_MNEMONICS - putc ('q', file); + putc ('q', file); #else - putc ('l', file); - putc ('l', file); + putc ('l', file); + putc ('l', file); #endif + } + else + putc ('q', file); } else putc ('l', file); @@ -16258,10 +16260,7 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx) QImode, 1, end_0_label); /* Increment the address. */ - if (TARGET_64BIT) - emit_insn (gen_adddi3 (out, out, const1_rtx)); - else - emit_insn (gen_addsi3 (out, out, const1_rtx)); + emit_insn ((*ix86_gen_add3) (out, out, const1_rtx)); /* Not needed with an alignment of 2 */ if (align != 2) @@ -16271,10 +16270,7 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx) emit_cmp_and_jump_insns (mem, const0_rtx, EQ, NULL, QImode, 1, end_0_label); - if (TARGET_64BIT) - emit_insn (gen_adddi3 (out, out, const1_rtx)); - else - emit_insn (gen_addsi3 (out, out, const1_rtx)); + emit_insn ((*ix86_gen_add3) (out, out, const1_rtx)); emit_label (align_3_label); } @@ -16282,10 +16278,7 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx) emit_cmp_and_jump_insns (mem, const0_rtx, EQ, NULL, QImode, 1, end_0_label); - if (TARGET_64BIT) - emit_insn (gen_adddi3 (out, out, const1_rtx)); - else - emit_insn (gen_addsi3 (out, out, const1_rtx)); + emit_insn ((*ix86_gen_add3) (out, out, const1_rtx)); } /* Generate loop to check 4 bytes at a time. It is not a good idea to @@ -16295,10 +16288,7 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx) mem = change_address (src, SImode, out); emit_move_insn (scratch, mem); - if (TARGET_64BIT) - emit_insn (gen_adddi3 (out, out, GEN_INT (4))); - else - emit_insn (gen_addsi3 (out, out, GEN_INT (4))); + emit_insn ((*ix86_gen_add3) (out, out, GEN_INT (4))); /* This formula yields a nonzero result iff one of the bytes is zero. This saves three branches inside loop and many cycles. */ @@ -16354,10 +16344,7 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx) /* Not in the first two. Move two bytes forward. */ emit_insn (gen_lshrsi3 (tmpreg, tmpreg, GEN_INT (16))); - if (TARGET_64BIT) - emit_insn (gen_adddi3 (out, out, const2_rtx)); - else - emit_insn (gen_addsi3 (out, out, const2_rtx)); + emit_insn ((*ix86_gen_add3) (out, out, const2_rtx)); emit_label (end_2_label); @@ -16367,10 +16354,7 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx) tmpreg = gen_lowpart (QImode, tmpreg); emit_insn (gen_addqi3_cc (tmpreg, tmpreg, tmpreg)); cmp = gen_rtx_LTU (Pmode, gen_rtx_REG (CCmode, FLAGS_REG), const0_rtx); - if (TARGET_64BIT) - emit_insn (gen_subdi3_carry_rex64 (out, out, GEN_INT (3), cmp)); - else - emit_insn (gen_subsi3_carry (out, out, GEN_INT (3), cmp)); + emit_insn ((*ix86_gen_sub3_carry) (out, out, GEN_INT (3), cmp)); emit_label (end_0_label); } @@ -16412,10 +16396,7 @@ ix86_expand_strlen (rtx out, rtx src, rtx eoschar, rtx align) /* strlensi_unroll_1 returns the address of the zero at the end of the string, like memchr(), so compute the length by subtracting the start address. */ - if (TARGET_64BIT) - emit_insn (gen_subdi3 (out, out, addr)); - else - emit_insn (gen_subsi3 (out, out, addr)); + emit_insn ((*ix86_gen_sub3) (out, out, addr)); } else { @@ -16438,16 +16419,8 @@ ix86_expand_strlen (rtx out, rtx src, rtx eoschar, rtx align) unspec = gen_rtx_UNSPEC (Pmode, gen_rtvec (4, src, eoschar, align, scratch4), UNSPEC_SCAS); emit_insn (gen_strlenqi_1 (scratch1, scratch3, unspec)); - if (TARGET_64BIT) - { - emit_insn (gen_one_cmpldi2 (scratch2, scratch1)); - emit_insn (gen_adddi3 (out, scratch2, constm1_rtx)); - } - else - { - emit_insn (gen_one_cmplsi2 (scratch2, scratch1)); - emit_insn (gen_addsi3 (out, scratch2, constm1_rtx)); - } + emit_insn ((*ix86_gen_one_cmpl2) (scratch2, scratch1)); + emit_insn ((*ix86_gen_add3) (out, scratch2, constm1_rtx)); } return 1; } @@ -21542,10 +21515,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, op1 = copy_to_mode_reg (SImode, op1); if (!REG_P (op2)) op2 = copy_to_mode_reg (SImode, op2); - if (!TARGET_64BIT) - emit_insn (gen_sse3_monitor (op0, op1, op2)); - else - emit_insn (gen_sse3_monitor64 (op0, op1, op2)); + emit_insn ((*ix86_gen_monitor) (op0, op1, op2)); return 0; case IX86_BUILTIN_MWAIT: @@ -23221,10 +23191,7 @@ x86_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED, /* Put the this parameter into %eax. */ xops[0] = this_param; xops[1] = this_reg = gen_rtx_REG (Pmode, AX_REG); - if (TARGET_64BIT) - output_asm_insn ("mov{q}\t{%0, %1|%1, %0}", xops); - else - output_asm_insn ("mov{l}\t{%0, %1|%1, %0}", xops); + output_asm_insn ("mov%z1\t{%0, %1|%1, %0}", xops); } else this_reg = NULL_RTX; @@ -23266,10 +23233,7 @@ x86_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED, xops[0] = gen_rtx_MEM (Pmode, this_reg); xops[1] = tmp; - if (TARGET_64BIT) - output_asm_insn ("mov{q}\t{%0, %1|%1, %0}", xops); - else - output_asm_insn ("mov{l}\t{%0, %1|%1, %0}", xops); + output_asm_insn ("mov%z1\t{%0, %1|%1, %0}", xops); /* Adjust the this parameter. */ xops[0] = gen_rtx_MEM (Pmode, plus_constant (tmp, vcall_offset)); @@ -23282,10 +23246,7 @@ x86_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED, xops[0] = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, tmp, tmp2)); } xops[1] = this_reg; - if (TARGET_64BIT) - output_asm_insn ("add{q}\t{%0, %1|%1, %0}", xops); - else - output_asm_insn ("add{l}\t{%0, %1|%1, %0}", xops); + output_asm_insn ("add%z1\t{%0, %1|%1, %0}", xops); } /* If necessary, drop THIS back to its stack slot. */ @@ -23293,10 +23254,7 @@ x86_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED, { xops[0] = this_reg; xops[1] = this_param; - if (TARGET_64BIT) - output_asm_insn ("mov{q}\t{%0, %1|%1, %0}", xops); - else - output_asm_insn ("mov{l}\t{%0, %1|%1, %0}", xops); + output_asm_insn ("mov%z1\t{%0, %1|%1, %0}", xops); } xops[0] = XEXP (DECL_RTL (function), 0); diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 552515fc6c3..68e67f9bb92 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1641,8 +1641,6 @@ enum reg_class #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) (ix86_function_type_abi (FNTYPE) == MS_ABI ? 1 : 0) -extern unsigned int ix86_reg_parm_stack_space (const_tree); - /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. FUNDECL is the declaration node of the function (as a tree), diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index ba438fee50f..00a16d988e1 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -630,6 +630,11 @@ ;; Instruction suffix for REX 64bit operators. (define_mode_attr rex64suffix [(SI "") (DI "{q}")]) + +;; This mode iterator allows :P to be used for patterns that operate on +;; pointer-sized quantities. Exactly one of the two alternatives will match. +(define_mode_iterator P [(SI "Pmode == SImode") (DI "Pmode == DImode")]) + ;; Scheduling descriptions @@ -2735,17 +2740,9 @@ (define_split [(set (match_operand:DF 0 "push_operand" "") (match_operand:DF 1 "any_fp_register_operand" ""))] - "!TARGET_64BIT && reload_completed" - [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (const_int -8))) - (set (mem:DF (reg:SI SP_REG)) (match_dup 1))] - "") - -(define_split - [(set (match_operand:DF 0 "push_operand" "") - (match_operand:DF 1 "any_fp_register_operand" ""))] - "TARGET_64BIT && reload_completed" - [(set (reg:DI SP_REG) (plus:DI (reg:DI SP_REG) (const_int -8))) - (set (mem:DF (reg:DI SP_REG)) (match_dup 1))] + "reload_completed" + [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (const_int -8))) + (set (mem:DF (reg:P SP_REG)) (match_dup 1))] "") (define_split @@ -3198,17 +3195,9 @@ (define_split [(set (match_operand:XF 0 "push_operand" "") (match_operand:XF 1 "any_fp_register_operand" ""))] - "!TARGET_64BIT" - [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (match_dup 2))) - (set (mem:XF (reg:SI SP_REG)) (match_dup 1))] - "operands[2] = GEN_INT (TARGET_128BIT_LONG_DOUBLE ? -16 : -12);") - -(define_split - [(set (match_operand:XF 0 "push_operand" "") - (match_operand:XF 1 "any_fp_register_operand" ""))] - "TARGET_64BIT" - [(set (reg:DI SP_REG) (plus:DI (reg:DI SP_REG) (match_dup 2))) - (set (mem:XF (reg:DI SP_REG)) (match_dup 1))] + "" + [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (match_dup 2))) + (set (mem:XF (reg:P SP_REG)) (match_dup 1))] "operands[2] = GEN_INT (TARGET_128BIT_LONG_DOUBLE ? -16 : -12);") ;; Do not use integer registers when optimizing for size @@ -3951,16 +3940,9 @@ (define_split [(set (match_operand:DF 0 "push_operand" "") (float_extend:DF (match_operand:SF 1 "fp_register_operand" "")))] - "!TARGET_64BIT" - [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (const_int -8))) - (set (mem:DF (reg:SI SP_REG)) (float_extend:DF (match_dup 1)))]) - -(define_split - [(set (match_operand:DF 0 "push_operand" "") - (float_extend:DF (match_operand:SF 1 "fp_register_operand" "")))] - "TARGET_64BIT" - [(set (reg:DI SP_REG) (plus:DI (reg:DI SP_REG) (const_int -8))) - (set (mem:DF (reg:DI SP_REG)) (float_extend:DF (match_dup 1)))]) + "" + [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (const_int -8))) + (set (mem:DF (reg:P SP_REG)) (float_extend:DF (match_dup 1)))]) (define_insn "*dummy_extendsfxf2" [(set (match_operand:XF 0 "push_operand" "=<") @@ -3972,32 +3954,16 @@ [(set (match_operand:XF 0 "push_operand" "") (float_extend:XF (match_operand:SF 1 "fp_register_operand" "")))] "" - [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (match_dup 2))) - (set (mem:XF (reg:SI SP_REG)) (float_extend:XF (match_dup 1)))] - "operands[2] = GEN_INT (TARGET_128BIT_LONG_DOUBLE ? -16 : -12);") - -(define_split - [(set (match_operand:XF 0 "push_operand" "") - (float_extend:XF (match_operand:SF 1 "fp_register_operand" "")))] - "TARGET_64BIT" - [(set (reg:DI SP_REG) (plus:DI (reg:DI SP_REG) (match_dup 2))) - (set (mem:DF (reg:DI SP_REG)) (float_extend:XF (match_dup 1)))] + [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (match_dup 2))) + (set (mem:XF (reg:P SP_REG)) (float_extend:XF (match_dup 1)))] "operands[2] = GEN_INT (TARGET_128BIT_LONG_DOUBLE ? -16 : -12);") (define_split [(set (match_operand:XF 0 "push_operand" "") (float_extend:XF (match_operand:DF 1 "fp_register_operand" "")))] "" - [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (match_dup 2))) - (set (mem:DF (reg:SI SP_REG)) (float_extend:XF (match_dup 1)))] - "operands[2] = GEN_INT (TARGET_128BIT_LONG_DOUBLE ? -16 : -12);") - -(define_split - [(set (match_operand:XF 0 "push_operand" "") - (float_extend:XF (match_operand:DF 1 "fp_register_operand" "")))] - "TARGET_64BIT" - [(set (reg:DI SP_REG) (plus:DI (reg:DI SP_REG) (match_dup 2))) - (set (mem:XF (reg:DI SP_REG)) (float_extend:XF (match_dup 1)))] + [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (match_dup 2))) + (set (mem:DF (reg:P SP_REG)) (float_extend:XF (match_dup 1)))] "operands[2] = GEN_INT (TARGET_128BIT_LONG_DOUBLE ? -16 : -12);") (define_expand "extendsfdf2" diff --git a/gcc/config/m68k/m68k-protos.h b/gcc/config/m68k/m68k-protos.h index 33025f8f34a..596d4ec8e03 100644 --- a/gcc/config/m68k/m68k-protos.h +++ b/gcc/config/m68k/m68k-protos.h @@ -50,6 +50,7 @@ extern bool strict_low_part_peephole_ok (enum machine_mode mode, rtx first_insn, extern int standard_68881_constant_p (rtx); extern void print_operand_address (FILE *, rtx); extern void print_operand (FILE *, rtx, int); +extern bool m68k_output_addr_const_extra (FILE *, rtx); extern void notice_update_cc (rtx, rtx); extern bool m68k_legitimate_base_reg_p (rtx, bool); extern bool m68k_legitimate_index_reg_p (rtx, bool); diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 52a60da0664..a1437d29c36 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -2059,9 +2059,30 @@ legitimize_pic_address (rtx orig, enum machine_mode mode ATTRIBUTE_UNUSED, { gcc_assert (reg); - pic_ref = gen_rtx_MEM (Pmode, - gen_rtx_PLUS (Pmode, - pic_offset_table_rtx, orig)); + if (TARGET_COLDFIRE && TARGET_XGOT) + /* When compiling with -mxgot switch the code for the above + example will look like this: + + movel a5, a0 + addl _foo@GOT, a0 + movel a0@, a0 + movel #12345, a0@ */ + { + rtx pic_offset; + + /* Wrap ORIG in UNSPEC_GOTOFF to tip m68k_output_addr_const_extra + to put @GOT after reference. */ + pic_offset = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, orig), + UNSPEC_GOTOFF); + pic_offset = gen_rtx_CONST (Pmode, pic_offset); + emit_move_insn (reg, pic_offset); + emit_insn (gen_addsi3 (reg, reg, pic_offset_table_rtx)); + pic_ref = gen_rtx_MEM (Pmode, reg); + } + else + pic_ref = gen_rtx_MEM (Pmode, + gen_rtx_PLUS (Pmode, + pic_offset_table_rtx, orig)); crtl->uses_pic_offset_table = 1; MEM_READONLY_P (pic_ref) = 1; emit_move_insn (reg, pic_ref); @@ -3869,6 +3890,20 @@ print_operand (FILE *file, rtx op, int letter) } } +/* m68k implementation of OUTPUT_ADDR_CONST_EXTRA. */ + +bool +m68k_output_addr_const_extra (FILE *file, rtx x) +{ + if (GET_CODE (x) != UNSPEC || XINT (x, 1) != UNSPEC_GOTOFF) + return false; + + output_addr_const (file, XVECEXP (x, 0, 0)); + /* ??? What is the non-MOTOROLA syntax? */ + fputs ("@GOT", file); + return true; +} + /* A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index 521ad849716..7a68595a334 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -1079,6 +1079,12 @@ do { if (cc_prev_status.flags & CC_IN_68881) \ #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) +#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL) \ +do { \ + if (! m68k_output_addr_const_extra (FILE, (X))) \ + goto FAIL; \ +} while (0); + /* Values used in the MICROARCH argument to M68K_DEVICE. */ enum uarch_type { diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 56c459e68b0..9effb344ec5 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -116,6 +116,7 @@ (UNSPEC_GOT 3) (UNSPEC_IB 4) (UNSPEC_TIE 5) + (UNSPEC_GOTOFF 6) ]) ;; UNSPEC_VOLATILE usage: diff --git a/gcc/config/m68k/m68k.opt b/gcc/config/m68k/m68k.opt index 23a3c09c6c5..bc0fb2c9939 100644 --- a/gcc/config/m68k/m68k.opt +++ b/gcc/config/m68k/m68k.opt @@ -178,3 +178,7 @@ Do not use unaligned memory references mtune= Target RejectNegative Joined Tune for the specified target CPU or architecture + +mxgot +Target Report Mask(XGOT) +Support more than 8192 GOT entries on ColdFire diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 6dbd19ea2f9..ece9d9d5fc0 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -607,7 +607,8 @@ Objective-C and Objective-C++ Dialects}. -mnobitfield -mrtd -mno-rtd -mdiv -mno-div -mshort @gol -mno-short -mhard-float -m68881 -msoft-float -mpcrel @gol -malign-int -mstrict-align -msep-data -mno-sep-data @gol --mshared-library-id=n -mid-shared-library -mno-id-shared-library} +-mshared-library-id=n -mid-shared-library -mno-id-shared-library @gol +-mxgot -mno-xgot} @emph{M68hc1x Options} @gccoptlist{-m6811 -m6812 -m68hc11 -m68hc12 -m68hcs12 @gol @@ -11776,6 +11777,38 @@ compiled. Specifying a value of 0 will generate more compact code, specifying other values will force the allocation of that number to the current library but is no more space or time efficient than omitting this option. +@item -mxgot +@itemx -mno-xgot +@opindex mxgot +@opindex mno-xgot +When generating position-independent code for ColdFire, generate code +that works if the GOT has more than 8192 entries. This code is +larger and slower than code generated without this option. On M680x0 +processors, this option is not needed; @option{-fPIC} suffices. + +GCC normally uses a single instruction to load values from the GOT@. +While this is relatively efficient, it only works if the GOT +is smaller than about 64k. Anything larger causes the linker +to report an error such as: + +@cindex relocation truncated to fit (ColdFire) +@smallexample +relocation truncated to fit: R_68K_GOT16O foobar +@end smallexample + +If this happens, you should recompile your code with @option{-mxgot}. +It should then work with very large GOTs. However, code generated with +@option{-mxgot} is less efficient, since it takes 4 instructions to fetch +the value of a global symbol. + +Note that some linkers, including newer versions of the GNU linker, +can create multiple GOTs and sort GOT entries. If you have such a linker, +you should only need to use @option{-mxgot} when compiling a single +object file that accesses more than 8192 GOT entries. Very few do. + +These options have no effect unless GCC is generating +position-independent code. + @end table @node M68hc1x Options diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1f319a0e120..a2f746c8198 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,23 @@ +2008-06-04 Joseph Myers <joseph@codesourcery.com> + Maxim Kuvyrkov <maxim@codesourcery.com> + + * gcc.target/m68k/xgot-1.c: New test. + +2008-06-04 Richard Guenther <rguenther@suse.de> + + * gcc.c-torture/execute/20080604-1.c: New testcase. + +2008-06-03 Andy Hutchinson <hutchinsonandy@aim.com> + + PR/34880 + * gcc.c-torture/execute/float-floor.c: Adjust test for 4 byte + doubles. + +2008-06-03 Eric Botcazou <ebotcazou@adacore.com> + + * gnat.dg/aliasing1.ad[sb]: New test. + * gnat.dg/aliasing2.ad[sb]: Likewise. + 2008-06-02 Andy Hutchinson <hutchinsonandy@aim.com> * gcc.target/avr/avr.exp: Add avr testsuite. diff --git a/gcc/testsuite/gcc.c-torture/execute/20080604-1.c b/gcc/testsuite/gcc.c-torture/execute/20080604-1.c new file mode 100644 index 00000000000..5ba35cb2cf5 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20080604-1.c @@ -0,0 +1,32 @@ +struct barstruct { char const* some_string; } x; +extern void abort (void); +void __attribute__((noinline)) +foo(void) +{ + if (!x.some_string) + abort (); +} +void baz(int b) +{ + struct barstruct bar; + struct barstruct* barptr; + if (b) + barptr = &bar; + else + { + barptr = &x + 1; + barptr = barptr - 1; + } + barptr->some_string = "Everything OK"; + foo(); + barptr->some_string = "Everything OK"; +} +int main() +{ + x.some_string = (void *)0; + baz(0); + if (!x.some_string) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.c-torture/execute/float-floor.c b/gcc/testsuite/gcc.c-torture/execute/float-floor.c index 4225c49a729..fedc1f73f43 100644 --- a/gcc/testsuite/gcc.c-torture/execute/float-floor.c +++ b/gcc/testsuite/gcc.c-torture/execute/float-floor.c @@ -1,4 +1,10 @@ + +#if(__SIZEOF_DOUBLE__==8) double d = 1024.0 - 1.0 / 32768.0; +#else +double d = 1024.0 - 1.0 / 16384.0; +#endif + extern double floor(double); extern float floorf(float); extern void abort(); diff --git a/gcc/testsuite/gcc.target/m68k/xgot-1.c b/gcc/testsuite/gcc.target/m68k/xgot-1.c new file mode 100644 index 00000000000..f7dd6c939ac --- /dev/null +++ b/gcc/testsuite/gcc.target/m68k/xgot-1.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-fpic -mxgot" } */ +/* { dg-final { scan-assembler "foo@GOT,\%\[ad\]\[0-7\]" } } */ + +extern int foo; + +int +bar (void) +{ + return foo; +} diff --git a/gcc/testsuite/gnat.dg/aliasing1.adb b/gcc/testsuite/gnat.dg/aliasing1.adb new file mode 100644 index 00000000000..5d928bbc0c0 --- /dev/null +++ b/gcc/testsuite/gnat.dg/aliasing1.adb @@ -0,0 +1,22 @@ +-- { dg-do compile } +-- { dg-options "-O2 -gnatp -fdump-tree-final_cleanup" } + +-- The raise statement must be optimized away by +-- virtue of DECL_NONADDRESSABLE_P set on R.I. + +package body Aliasing1 is + + function F (P : Ptr) return Integer is + begin + R.I := 0; + P.all := 1; + if R.I /= 0 then + raise Program_Error; + end if; + return 0; + end; + +end Aliasing1; + +-- { dg-final { scan-tree-dump-not "__gnat_rcheck" "final_cleanup" } } +-- { dg-final { cleanup-tree-dump "final_cleanup" } } diff --git a/gcc/testsuite/gnat.dg/aliasing1.ads b/gcc/testsuite/gnat.dg/aliasing1.ads new file mode 100644 index 00000000000..9ebfd6206b4 --- /dev/null +++ b/gcc/testsuite/gnat.dg/aliasing1.ads @@ -0,0 +1,13 @@ +package Aliasing1 is + + type Rec is record + I : Integer; + end record; + + type Ptr is access all Integer; + + R : Rec; + + function F (P : Ptr) return Integer; + +end Aliasing1; diff --git a/gcc/testsuite/gnat.dg/aliasing2.adb b/gcc/testsuite/gnat.dg/aliasing2.adb new file mode 100644 index 00000000000..abfc6e11a3f --- /dev/null +++ b/gcc/testsuite/gnat.dg/aliasing2.adb @@ -0,0 +1,22 @@ +-- { dg-do compile } +-- { dg-options "-O2 -gnatp -fdump-tree-final_cleanup" } + +-- The raise statement must be optimized away by +-- virtue of TYPE_NONALIASED_COMPONENT set on A. + +package body Aliasing2 is + + function F (P : Ptr) return Integer is + begin + A (1) := 0; + P.all := 1; + if A(1) /= 0 then + raise Program_Error; + end if; + return 0; + end; + +end Aliasing2; + +-- { dg-final { scan-tree-dump-not "__gnat_rcheck" "final_cleanup" } } +-- { dg-final { cleanup-tree-dump "final_cleanup" } } diff --git a/gcc/testsuite/gnat.dg/aliasing2.ads b/gcc/testsuite/gnat.dg/aliasing2.ads new file mode 100644 index 00000000000..7a7e411fa58 --- /dev/null +++ b/gcc/testsuite/gnat.dg/aliasing2.ads @@ -0,0 +1,10 @@ +package Aliasing2 is + + type Arr is Array (1..4) of Integer; + type Ptr is access all Integer; + + A : Arr; + + function F (P : Ptr) return Integer; + +end Aliasing2; diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index 109bd416e28..c667867404e 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -698,7 +698,7 @@ static inline bool is_global_var (const_tree t) { if (MTAG_P (t)) - return (TREE_STATIC (t) || MTAG_GLOBAL (t)); + return MTAG_GLOBAL (t); else return (TREE_STATIC (t) || DECL_EXTERNAL (t)); } @@ -875,10 +875,7 @@ factoring_name_p (const_tree name) static inline bool is_call_clobbered (const_tree var) { - if (!MTAG_P (var)) - return var_ann (var)->call_clobbered; - else - return bitmap_bit_p (gimple_call_clobbered_vars (cfun), DECL_UID (var)); + return var_ann (var)->call_clobbered; } /* Mark variable VAR as being clobbered by function calls. */ @@ -886,8 +883,7 @@ static inline void mark_call_clobbered (tree var, unsigned int escape_type) { var_ann (var)->escape_mask |= escape_type; - if (!MTAG_P (var)) - var_ann (var)->call_clobbered = true; + var_ann (var)->call_clobbered = true; bitmap_set_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var)); } @@ -899,8 +895,7 @@ clear_call_clobbered (tree var) ann->escape_mask = 0; if (MTAG_P (var)) MTAG_GLOBAL (var) = 0; - if (!MTAG_P (var)) - var_ann (var)->call_clobbered = false; + var_ann (var)->call_clobbered = false; bitmap_clear_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var)); } diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 1523aebac17..05c123c0e99 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -305,10 +305,7 @@ mark_non_addressable (tree var) mpt = memory_partition (var); - if (!MTAG_P (var)) - var_ann (var)->call_clobbered = false; - - bitmap_clear_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var)); + clear_call_clobbered (var); TREE_ADDRESSABLE (var) = 0; if (mpt) @@ -2003,22 +2000,13 @@ reset_alias_info (void) bitmap_set_bit (all_nmts, DECL_UID (var)); /* Since we are about to re-discover call-clobbered - variables, clear the call-clobbered flag. Variables that - are intrinsically call-clobbered (globals, local statics, - etc) will not be marked by the aliasing code, so we can't - remove them from CALL_CLOBBERED_VARS. - - NB: STRUCT_FIELDS are still call clobbered if they are for a - global variable, so we *don't* clear their call clobberedness - just because they are tags, though we will clear it if they - aren't for global variables. */ - if (TREE_CODE (var) == NAME_MEMORY_TAG - || TREE_CODE (var) == SYMBOL_MEMORY_TAG - || TREE_CODE (var) == MEMORY_PARTITION_TAG - || !is_global_var (var)) - clear_call_clobbered (var); + variables, clear the call-clobbered flag. */ + clear_call_clobbered (var); } + /* There should be no call-clobbered variable left. */ + gcc_assert (bitmap_empty_p (gimple_call_clobbered_vars (cfun))); + /* Clear flow-sensitive points-to information from each SSA name. */ for (i = 1; i < num_ssa_names; i++) { @@ -2830,6 +2818,8 @@ set_pt_anything (tree ptr) struct ptr_info_def *pi = get_ptr_info (ptr); pi->pt_anything = 1; + /* Anything includes global memory. */ + pi->pt_global_mem = 1; pi->pt_vars = NULL; /* The pointer used to have a name tag, but we now found it pointing @@ -2926,12 +2916,12 @@ create_tag_raw (enum tree_code code, tree type, const char *prefix) tmp_var = build_decl (code, create_tmp_var_name (prefix), type); - /* Make the variable writable. */ + /* Memory tags are always writable and non-static. */ TREE_READONLY (tmp_var) = 0; + TREE_STATIC (tmp_var) = 0; /* It doesn't start out global. */ MTAG_GLOBAL (tmp_var) = 0; - TREE_STATIC (tmp_var) = 0; TREE_USED (tmp_var) = 1; return tmp_var; @@ -3365,7 +3355,7 @@ may_be_aliased (tree var) /* Globally visible variables can have their addresses taken by other translation units. */ if (MTAG_P (var) - && (MTAG_GLOBAL (var) || TREE_PUBLIC (var))) + && MTAG_GLOBAL (var)) return true; else if (!MTAG_P (var) && (DECL_EXTERNAL (var) || TREE_PUBLIC (var))) diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 0e422146f9b..570c173b3a9 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -3531,8 +3531,7 @@ handle_ptr_arith (VEC (ce_s, heap) *lhsc, tree expr) unsigned int i = 0; unsigned int j = 0; VEC (ce_s, heap) *temp = NULL; - unsigned int rhsoffset = 0; - bool unknown_addend = false; + unsigned HOST_WIDE_INT rhsunitoffset, rhsoffset; if (TREE_CODE (expr) != POINTER_PLUS_EXPR) return false; @@ -3541,13 +3540,18 @@ handle_ptr_arith (VEC (ce_s, heap) *lhsc, tree expr) op1 = TREE_OPERAND (expr, 1); gcc_assert (POINTER_TYPE_P (TREE_TYPE (op0))); - get_constraint_for (op0, &temp); + /* If the offset is not a non-negative integer constant that fits + in a HOST_WIDE_INT, we cannot handle it here. */ + if (!host_integerp (op1, 1)) + return false; - /* Handle non-constants by making constraints from integer. */ - if (TREE_CODE (op1) == INTEGER_CST) - rhsoffset = TREE_INT_CST_LOW (op1) * BITS_PER_UNIT; - else - unknown_addend = true; + /* Make sure the bit-offset also fits. */ + rhsunitoffset = TREE_INT_CST_LOW (op1); + rhsoffset = rhsunitoffset * BITS_PER_UNIT; + if (rhsunitoffset != rhsoffset / BITS_PER_UNIT) + return false; + + get_constraint_for (op0, &temp); for (i = 0; VEC_iterate (ce_s, lhsc, i, c); i++) for (j = 0; VEC_iterate (ce_s, temp, j, c2); j++) @@ -3564,30 +3568,6 @@ handle_ptr_arith (VEC (ce_s, heap) *lhsc, tree expr) c2->var = temp->id; c2->offset = 0; } - else if (unknown_addend) - { - /* Can't handle *a + integer where integer is unknown. */ - if (c2->type != SCALAR) - { - struct constraint_expr intc; - intc.var = integer_id; - intc.offset = 0; - intc.type = SCALAR; - process_constraint (new_constraint (*c, intc)); - } - else - { - /* We known it lives somewhere within c2->var. */ - varinfo_t tmp = get_varinfo (c2->var); - for (; tmp; tmp = tmp->next) - { - struct constraint_expr tmpc = *c2; - c2->var = tmp->id; - c2->offset = 0; - process_constraint (new_constraint (*c, tmpc)); - } - } - } else c2->offset = rhsoffset; process_constraint (new_constraint (*c, *c2)); diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1132ddd49da..d06e303f343 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,54 @@ +2008-06-04 Benjamin Kosnik <bkoz@redhat.com> + + * include/ext/pb_ds/assoc_container.hpp: Change allocator typedef + to allocator_type, as per existing conventions. + * include/ext/pb_ds/detail/binomial_heap_base_/ + binomial_heap_base_.hpp: Same. + * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Same. + * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Same. + * include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp: Same. + * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Same. + * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Same. + * include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp: Same. + * include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp: Same. + * include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp: Same. + * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ + left_child_next_sibling_heap_.hpp: Same. + * include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp: Same. + * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Same. + * include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp: Same. + * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: Same. + * include/ext/pb_ds/detail/rc_binomial_heap_/ + rc_binomial_heap_.hpp: Same. + * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp: Same. + * include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp: Same. + * include/ext/pb_ds/list_update_policy.hpp: Same. + * include/ext/pb_ds/exception.hpp: Same. + * include/ext/pb_ds/tree_policy.hpp: Same. + * include/ext/pb_ds/trie_policy.hpp: Same. + * include/ext/pb_ds/priority_queue.hpp: Same. + * testsuite/util/regression/trait/assoc/trait.hpp: Same. + * testsuite/util/regression/trait/assoc/type_trait.hpp: Same. + * testsuite/util/regression/rand/priority_queue/detail/ + defs_fn_imps.hpp: Same. + * testsuite/util/regression/rand/priority_queue/detail/ + operator_fn_imps.hpp: Same. + * testsuite/util/regression/rand/priority_queue/ + container_rand_regression_test.hpp: Same. + * testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp: Same. + * testsuite/util/regression/rand/assoc/detail/ + operator_fn_imps.hpp: Same. + * testsuite/util/regression/rand/assoc/ + container_rand_regression_test.hpp: Same. + * testsuite/util/native_type/assoc/native_multimap.hpp: Same. + * testsuite/util/native_type/assoc/native_hash_multimap.hpp: Same. + * testsuite/util/common_type/assoc/detail/ + tree_supports_order_statistics.hpp: Same. + * testsuite/util/common_type/assoc/detail/ + trie_supports_prefix_search.hpp: Same. + * testsuite/util/common_type/assoc/detail/ + trie_supports_order_statistics.hpp: Same. + 2008-06-02 Sandra Loosemore <sandra@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> diff --git a/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp b/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp index e2ac37c11cc..8dbb43a9030 100644 --- a/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp +++ b/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp @@ -71,13 +71,13 @@ namespace __gnu_pbds public: typedef Tag container_category; - typedef Allocator allocator; - typedef typename allocator::size_type size_type; - typedef typename allocator::difference_type difference_type; + typedef Allocator allocator_type; + typedef typename allocator_type::size_type size_type; + typedef typename allocator_type::difference_type difference_type; // key_type - typedef typename allocator::template rebind<Key>::other::value_type key_type; - typedef typename allocator::template rebind<key_type>::other key_rebind; + typedef typename allocator_type::template rebind<Key>::other::value_type key_type; + typedef typename allocator_type::template rebind<key_type>::other key_rebind; typedef typename key_rebind::reference key_reference; typedef typename key_rebind::const_reference const_key_reference; typedef typename key_rebind::pointer key_pointer; @@ -85,7 +85,7 @@ namespace __gnu_pbds // mapped_type typedef Mapped mapped_type; - typedef typename allocator::template rebind<mapped_type>::other mapped_rebind; + typedef typename allocator_type::template rebind<mapped_type>::other mapped_rebind; typedef typename mapped_rebind::reference mapped_reference; typedef typename mapped_rebind::const_reference const_mapped_reference; typedef typename mapped_rebind::pointer mapped_pointer; @@ -93,7 +93,7 @@ namespace __gnu_pbds // value_type typedef typename base_type::value_type value_type; - typedef typename allocator::template rebind<value_type>::other value_rebind; + typedef typename allocator_type::template rebind<value_type>::other value_rebind; typedef typename value_rebind::reference reference; typedef typename value_rebind::const_reference const_reference; typedef typename value_rebind::pointer pointer; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp index 6e46cedbbe9..587cfe06dcb 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp @@ -241,7 +241,7 @@ namespace __gnu_pbds typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Node_And_It_Traits::node_update node_update; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp index cf10195d28c..310ddadf28b 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp @@ -178,7 +178,7 @@ namespace __gnu_pbds typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; public: diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp index 8f1826ef164..3641faad2a9 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp @@ -93,7 +93,7 @@ namespace __gnu_pbds typedef typename base_type::const_iterator const_iterator; typedef typename base_type::iterator iterator; typedef typename base_type::cmp_fn cmp_fn; - typedef typename base_type::allocator allocator; + typedef typename base_type::allocator_type allocator_type; binomial_heap_(); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp index acd1c3cf4dc..c77063618e5 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp @@ -138,7 +138,7 @@ namespace __gnu_pbds typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; public: diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp index 3a772fa1df8..71c7327120e 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp @@ -167,7 +167,7 @@ namespace __gnu_pbds #undef PB_DS_GEN_POS public: - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; typedef Hash_Fn hash_fn; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp index 8da31e70e8a..2fcb25c8310 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp @@ -168,7 +168,7 @@ namespace __gnu_pbds #undef PB_DS_GEN_POS public: - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; typedef Hash_Fn hash_fn; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp index 196ae3010ca..a200b7e3672 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp @@ -194,7 +194,7 @@ namespace __gnu_pbds typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; public: diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp index 267beccceaf..8b8b1cffe90 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp @@ -154,7 +154,7 @@ namespace __gnu_pbds typedef cond_dealtor<entry, Allocator> cond_dealtor_t; public: - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; typedef Eq_Fn eq_fn; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp index 421a6bea617..3abb259a789 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp @@ -158,7 +158,7 @@ namespace __gnu_pbds public: - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp index 6d3790653a4..4ad1e4115d2 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp @@ -137,7 +137,7 @@ namespace __gnu_pbds typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; pairing_heap_(); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp index 00a00d34bce..eb55ea52e01 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp @@ -164,7 +164,7 @@ namespace __gnu_pbds public: typedef pat_trie_tag container_category; - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp index b5d50a92ae8..6d638395bac 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp @@ -124,7 +124,7 @@ namespace __gnu_pbds public: typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; typedef typename base_type::key_type key_type; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp index fc90ea7dea2..a0832bf97b6 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp @@ -62,24 +62,24 @@ namespace __gnu_pbds class rc { private: - typedef Allocator allocator; + typedef Allocator allocator_type; - typedef typename allocator::size_type size_type; + typedef typename allocator_type::size_type size_type; typedef Node node; typedef - typename allocator::template rebind< + typename allocator_type::template rebind< node>::other::pointer node_pointer; typedef - typename allocator::template rebind< + typename allocator_type::template rebind< node_pointer>::other::pointer entry_pointer; typedef - typename allocator::template rebind< + typename allocator_type::template rebind< node_pointer>::other::const_pointer const_entry_pointer; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp index 5b4a3b4122f..729dccf3c77 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp @@ -112,7 +112,7 @@ namespace __gnu_pbds typedef typename base_type::cmp_fn cmp_fn; - typedef typename base_type::allocator allocator; + typedef typename base_type::allocator_type allocator_type; public: diff --git a/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp index 1642abb068f..10be0c2a4cf 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp @@ -145,7 +145,7 @@ namespace __gnu_pbds typedef typename base_type::node_pointer node_pointer; public: - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; typedef Cmp_Fn cmp_fn; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp index ee874e823be..9eb617dcf09 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp @@ -137,7 +137,7 @@ namespace __gnu_pbds typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; + typedef Allocator allocator_type; public: diff --git a/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp index 2a1319a4629..c1146303616 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp @@ -85,9 +85,9 @@ namespace __gnu_pbds typedef E_Access_Traits e_access_traits; - typedef Allocator allocator; + typedef Allocator allocator_type; - typedef typename allocator::size_type size_type; + typedef typename allocator_type::size_type size_type; typedef null_node_metadata metadata_type; diff --git a/libstdc++-v3/include/ext/pb_ds/exception.hpp b/libstdc++-v3/include/ext/pb_ds/exception.hpp index 77d3f2d6927..4a35931b3c5 100644 --- a/libstdc++-v3/include/ext/pb_ds/exception.hpp +++ b/libstdc++-v3/include/ext/pb_ds/exception.hpp @@ -61,7 +61,7 @@ namespace __gnu_pbds // An entry cannot be inserted into a container object for logical // reasons (not, e.g., if memory is unabvailable, in which case - // the allocator's exception will be thrown). + // the allocator_type's exception will be thrown). struct insert_error : public container_error { }; // A join cannot be performed logical reasons (i.e., the ranges of diff --git a/libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp b/libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp index 5a63a3e16dc..67a4e883fa7 100644 --- a/libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp +++ b/libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp @@ -66,13 +66,13 @@ namespace __gnu_pbds class move_to_front_lu_policy { public: - typedef Allocator allocator; + typedef Allocator allocator_type; // Metadata on which this functor operates. typedef null_lu_metadata metadata_type; // Reference to metadata on which this functor operates. - typedef typename allocator::template rebind<metadata_type>::other metadata_rebind; + typedef typename allocator_type::template rebind<metadata_type>::other metadata_rebind; typedef typename metadata_rebind::reference metadata_reference; // Creates a metadata object. @@ -103,14 +103,14 @@ namespace __gnu_pbds : private detail::counter_lu_policy_base<typename Allocator::size_type> { public: - typedef Allocator allocator; + typedef Allocator allocator_type; enum { max_count = Max_Count }; - typedef typename allocator::size_type size_type; + typedef typename allocator_type::size_type size_type; // Metadata on which this functor operates. typedef detail::counter_lu_metadata<size_type> metadata_type; diff --git a/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp b/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp index 90ffafffefa..3433f5116fe 100644 --- a/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp +++ b/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp @@ -68,11 +68,11 @@ namespace __gnu_pbds typedef Value_Type value_type; typedef Cmp_Fn cmp_fn; typedef Tag container_category; - typedef Allocator allocator; - typedef typename allocator::size_type size_type; - typedef typename allocator::difference_type difference_type; + typedef Allocator allocator_type; + typedef typename allocator_type::size_type size_type; + typedef typename allocator_type::difference_type difference_type; - typedef typename allocator::template rebind<value_type>::other value_rebind; + typedef typename allocator_type::template rebind<value_type>::other value_rebind; typedef typename value_rebind::reference reference; typedef typename value_rebind::const_reference const_reference; typedef typename value_rebind::pointer pointer; diff --git a/libstdc++-v3/include/ext/pb_ds/tree_policy.hpp b/libstdc++-v3/include/ext/pb_ds/tree_policy.hpp index dedabec5c48..1f3da0ee481 100644 --- a/libstdc++-v3/include/ext/pb_ds/tree_policy.hpp +++ b/libstdc++-v3/include/ext/pb_ds/tree_policy.hpp @@ -80,8 +80,8 @@ namespace __gnu_pbds public: typedef Cmp_Fn cmp_fn; - typedef Allocator allocator; - typedef typename allocator::size_type size_type; + typedef Allocator allocator_type; + typedef typename allocator_type::size_type size_type; typedef typename base_type::key_type key_type; typedef typename base_type::const_key_reference const_key_reference; @@ -120,7 +120,7 @@ namespace __gnu_pbds // Const pointer to the container's value-type. typedef typename base_type::const_pointer const_pointer; - typedef typename allocator::template rebind<metadata_type>::other metadata_rebind; + typedef typename allocator_type::template rebind<metadata_type>::other metadata_rebind; // Const metadata reference. typedef typename metadata_rebind::const_reference const_metadata_reference; diff --git a/libstdc++-v3/include/ext/pb_ds/trie_policy.hpp b/libstdc++-v3/include/ext/pb_ds/trie_policy.hpp index b18de195ed8..642c5300a66 100644 --- a/libstdc++-v3/include/ext/pb_ds/trie_policy.hpp +++ b/libstdc++-v3/include/ext/pb_ds/trie_policy.hpp @@ -167,10 +167,10 @@ namespace __gnu_pbds typedef typename e_access_traits::const_iterator const_e_iterator; // Allocator type. - typedef Allocator allocator; + typedef Allocator allocator_type; // Size type. - typedef typename allocator::size_type size_type; + typedef typename allocator_type::size_type size_type; typedef detail::null_node_metadata metadata_type; typedef Const_Node_Iterator const_node_iterator; typedef Node_Iterator node_iterator; @@ -256,8 +256,8 @@ namespace __gnu_pbds public: typedef E_Access_Traits e_access_traits; typedef typename e_access_traits::const_iterator const_e_iterator; - typedef Allocator allocator; - typedef typename allocator::size_type size_type; + typedef Allocator allocator_type; + typedef typename allocator_type::size_type size_type; typedef typename base_type::key_type key_type; typedef typename base_type::const_key_reference const_key_reference; diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp index f4b23110491..c219271a8c4 100644 --- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp @@ -69,7 +69,7 @@ namespace __gnu_pbds typename Tree_Cntnr::const_node_iterator, typename Tree_Cntnr::node_iterator, typename Tree_Cntnr::cmp_fn, - typename Tree_Cntnr::allocator> >::value + typename Tree_Cntnr::allocator_type> >::value }; }; diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp index c23708f23cc..82d47804286 100644 --- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp @@ -69,7 +69,7 @@ namespace __gnu_pbds typename Tree_Cntnr::const_node_iterator, typename Tree_Cntnr::node_iterator, typename Tree_Cntnr::e_access_traits, - typename Tree_Cntnr::allocator> >::value + typename Tree_Cntnr::allocator_type> >::value }; }; diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp index 0adf029507e..5b8c4f3759d 100644 --- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp @@ -69,7 +69,7 @@ namespace __gnu_pbds typename Tree_Cntnr::const_node_iterator, typename Tree_Cntnr::node_iterator, typename Tree_Cntnr::e_access_traits, - typename Tree_Cntnr::allocator> >::value + typename Tree_Cntnr::allocator_type> >::value }; }; diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp index a3f82ba8a75..f644ae2de1a 100644 --- a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp +++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp @@ -76,12 +76,12 @@ namespace __gnu_pbds public: typedef native_hash_tag container_category; - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename base_type::iterator iterator; typedef typename base_type::const_iterator const_iterator; typedef - typename allocator::template rebind<pair_type>::other::const_reference + typename allocator_type::template rebind<pair_type>::other::const_reference const_reference; native_hash_multimap() : base_type(Init_Size) diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp index 906fca3244e..c9e12114296 100644 --- a/libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp +++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp @@ -70,7 +70,7 @@ namespace __gnu_pbds public: typedef native_tree_tag container_category; - typedef Allocator allocator; + typedef Allocator allocator_type; typedef typename Allocator::template rebind< diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp index 7eaa3968f9a..af0a8e17b7e 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp @@ -129,7 +129,7 @@ namespace detail private: typedef Cntnr cntnr; - typedef typename cntnr::allocator allocator; + typedef typename cntnr::allocator_type allocator_type; typedef typename cntnr::size_type size_type; typedef regression_test_traits<Cntnr> test_traits; typedef typename test_traits::key_type key_type; diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp index 0acb20cd62e..f3e01d97fac 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp @@ -180,7 +180,7 @@ void PB_DS_CLASS_C_DEC:: policy_defs() { - typedef typename Cntnr::allocator test_allocator; + typedef typename Cntnr::allocator_type test_allocator; policy_defs(typename Cntnr::container_category()); } diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/operator_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/operator_fn_imps.hpp index 323376480d3..8c11f765766 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/operator_fn_imps.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/operator_fn_imps.hpp @@ -71,7 +71,7 @@ operator()() for (m_i = 0; m_i < m_n; ++m_i) { PB_DS_TRACE("Op #" << static_cast<unsigned long>(m_i)); - allocator::set_label(m_i); + allocator_type::set_label(m_i); switch (m_i) { case 0: diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp index eeedc27bdca..dadf8b4d7b5 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp @@ -141,7 +141,7 @@ namespace __gnu_pbds private: typedef Cntnr cntnr; - typedef typename cntnr::allocator allocator; + typedef typename cntnr::allocator_type allocator_type; typedef typename cntnr::size_type size_type; diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/defs_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/defs_fn_imps.hpp index 85bc6b0a14e..ae406937337 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/defs_fn_imps.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/defs_fn_imps.hpp @@ -50,15 +50,10 @@ PB_DS_CLASS_C_DEC:: defs() { // General container types. - typedef typename Cntnr::size_type test_size_type; - typedef typename Cntnr::difference_type difference_type; - value_defs(); - iterator_defs(); - policy_defs(); } @@ -68,13 +63,9 @@ PB_DS_CLASS_C_DEC:: value_defs() { typedef typename Cntnr::value_type test_value_type; - typedef typename Cntnr::reference test_reference; - typedef typename Cntnr::const_reference test_const_reference; - typedef typename Cntnr::pointer test_pointer; - typedef typename Cntnr::const_pointer test_const_pointer; } @@ -92,11 +83,8 @@ PB_DS_CLASS_C_DEC:: iterator_defs() { typedef typename Cntnr::point_iterator test_point_iterator; - typedef typename Cntnr::const_point_iterator const_test_point_iterator; - typedef typename Cntnr::iterator test_iterator; - typedef typename Cntnr::const_iterator const_test_iterator; } @@ -105,7 +93,6 @@ void PB_DS_CLASS_C_DEC:: policy_defs() { - typedef typename Cntnr::allocator test_allocator; - + typedef typename Cntnr::allocator_type test_allocator; typedef typename Cntnr::cmp_fn test_cmp_fn; } diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/operator_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/operator_fn_imps.hpp index 7a34b812167..61869919843 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/operator_fn_imps.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/operator_fn_imps.hpp @@ -71,7 +71,7 @@ operator()() for (m_i = 0; m_i < m_n; ++m_i) { PB_DS_TRACE("Op #" << static_cast<unsigned long>(m_i)); - allocator::set_label(m_i); + allocator_type::set_label(m_i); switch(m_i) { case 0: diff --git a/libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp b/libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp index e8791a4472a..5e97aea41e5 100644 --- a/libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp +++ b/libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp @@ -76,7 +76,7 @@ namespace detail #define PB_DS_NATIVE_TYPE_TRAITS_C_DEC \ native_type_traits<typename PB_DS_TYPE_TRAITS_C_DEC::key_type, \ typename PB_DS_TYPE_TRAITS_C_DEC::mapped_type, \ - typename Cntnr::allocator> + typename Cntnr::allocator_type> #define PB_DS_RESIZE_TRAITS_C_DEC \ regression_test_resize_traits<Cntnr, typename Cntnr::container_category> diff --git a/libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp b/libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp index 5c0682de38f..b9db4a71b3d 100644 --- a/libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp +++ b/libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp @@ -82,12 +82,12 @@ namespace __gnu_pbds { return extract_key_imp(r_val); } private: - typedef typename cntnr::allocator::template rebind<basic_type>::other + typedef typename cntnr::allocator_type::template rebind<basic_type>::other basic_type_rebind; typedef typename basic_type_rebind::const_reference basic_type_const_reference; - typedef typename cntnr::allocator::template rebind<std::pair<basic_type, basic_type> >::other pair_type_rebind; + typedef typename cntnr::allocator_type::template rebind<std::pair<basic_type, basic_type> >::other pair_type_rebind; typedef typename pair_type_rebind::const_reference pair_type_const_reference; template<typename Gen> |