gcc/testsuite/
2011-10-14 David Alan Gilbert <david.gilbert@linaro.org>
* gcc.dg/di-longlong64-sync-1.c: New test.
* gcc.dg/di-sync-multithread.c: New test.
* gcc.target/arm/di-longlong64-sync-withhelpers.c: New test.
* gcc.target/arm/di-longlong64-sync-withldrexd.c: New test.
* lib/target-supports.exp: (arm_arch_*_ok): Series of effective-target
tests for v5, v6, v6k, and v7-a, and add-options helpers.
(check_effective_target_arm_arm_ok): New helper.
(check_effective_target_sync_longlong): New helper.
From-SVN: r179983
gcc/
2011-10-14 David Alan Gilbert <david.gilbert@linaro.org>
* config/arm/linux-atomic-64bit.c: New (based on linux-atomic.c).
* config/arm/linux-atomic.c: Change comment to point to 64bit version.
(SYNC_LOCK_RELEASE): Instantiate 64bit version.
* config/arm/t-linux-eabi: Pull in linux-atomic-64bit.c.
From-SVN: r179982
gcc/
2011-10-14 David Alan Gilbert <david.gilbert@linaro.org>
* config/arm/arm.c (arm_output_ldrex): Support ldrexd.
(arm_output_strex): Support strexd.
(arm_output_it): New helper to output it in Thumb2 mode only.
(arm_output_sync_loop): Support DI mode. Change comment to
not support const_int.
(arm_expand_sync): Support DI mode.
* config/arm/arm.h (TARGET_HAVE_LDREXBHD): Split into LDREXBH
and LDREXD.
* config/arm/iterators.md (NARROW): move from sync.md.
(QHSD): New iterator for all current ARM integer modes.
(SIDI): New iterator for SI and DI modes only.
* config/arm/sync.md (sync_predtab): New mode_attr.
(sync_compare_and_swapsi): Fold into sync_compare_and_swap<mode>.
(sync_lock_test_and_setsi): Fold into sync_lock_test_and_setsi<mode>.
(sync_<sync_optab>si): Fold into sync_<sync_optab><mode>.
(sync_nandsi): Fold into sync_nand<mode>.
(sync_new_<sync_optab>si): Fold into sync_new_<sync_optab><mode>.
(sync_new_nandsi): Fold into sync_new_nand<mode>.
(sync_old_<sync_optab>si): Fold into sync_old_<sync_optab><mode>.
(sync_old_nandsi): Fold into sync_old_nand<mode>.
(sync_compare_and_swap<mode>): Support SI & DI.
(sync_lock_test_and_set<mode>): Likewise.
(sync_<sync_optab><mode>): Likewise.
(sync_nand<mode>): Likewise.
(sync_new_<sync_optab><mode>): Likewise.
(sync_new_nand<mode>): Likewise.
(sync_old_<sync_optab><mode>): Likewise.
(sync_old_nand<mode>): Likewise.
(arm_sync_compare_and_swapsi): Turn into iterator on SI & DI.
(arm_sync_lock_test_and_setsi): Likewise.
(arm_sync_new_<sync_optab>si): Likewise.
(arm_sync_new_nandsi): Likewise.
(arm_sync_old_<sync_optab>si): Likewise.
(arm_sync_old_nandsi): Likewise.
(arm_sync_compare_and_swap<mode> NARROW): use sync_predtab, fix indent.
(arm_sync_lock_test_and_setsi<mode> NARROW): Likewise.
(arm_sync_new_<sync_optab><mode> NARROW): Likewise.
(arm_sync_new_nand<mode> NARROW): Likewise.
(arm_sync_old_<sync_optab><mode> NARROW): Likewise.
(arm_sync_old_nand<mode> NARROW): Likewise.
From-SVN: r179981
* gimple.c (walk_stmt_load_store_addr_ops): Call visit_addr
also on COND_EXPR/VEC_COND_EXPR comparison operands if they are
ADDR_EXPRs.
From-SVN: r179969
In gcc/:
2011-10-14 Nicola Pero <nicola.pero@meta-innovation.com>
* gengtype.c (files_rules): Added rules for objc/objc-map.h and
objc/objc-map.c.
In gcc/objc/:
2011-10-14 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-map.h: New file.
* objc-map.c: New file.
* config-lang.in (gtfiles): Added objc-map.h.
* Make-lang.in (OBJC_OBJS): Added objc-map.o.
(objc/objc-map.o): New rule.
(objc/objc-act.o): Depend on objc/objc-map.h.
* objc-next-runtime-abi-02.c: Added a TODO comment.
* objc-act.c: Include objc-map.h.
(nst_method_hash_list, cls_method_hash_list): Removed.
(instance_method_map, class_method_map): New.
(cls_name_hash_list, als_name_hash_list): Removed.
(class_name_map, alias_name_map): Removed.
(ivar_offset_hash_list): Removed.
(hash_class_name_enter, hash_class_name_lookup, hash_enter,
hash_lookup, hash_add_attr, add_method_to_hash_list): Removed.
(interface_hash_init): New.
(objc_init): Call interface_hash_init.
(objc_write_global_declarations): Iterate over class_method_map
and instance_method_map instead of cls_method_hash_list and
nst_method_hash_list.
(objc_declare_alias): Use alias_name_map instead of
cls_name_hash_list.
(objc_is_class_name): Use class_name_map and alias_name_map
instead of cls_name_hash_list and als_name_hash_list.
(interface_tuple, interface_htab, hash_interface, eq_interface):
Removed.
(interface_map): New.
(add_class): Renamed to add_interface. Use interface_map instead
of interface_htab.
(lookup_interface): Use interface_map instead of interface_htab.
(check_duplicates): Changed first argument to be a tree,
potentially a TREE_VEC, instead of a hash. Changed implementation
to match.
(lookup_method_in_hash_lists): Use class_method_map and
instance_method_map instead of cls_method_hash_list and
nst_method_hash_list.
(objc_build_selector_expr): Likewise.
(hash_func): Removed.
(hash_init): Create instance_method_map, class_method_map,
class_name_map, and alias_name_map. Do not create
nst_method_hash_list, cls_method_hash_list, cls_name_hash_list,
als_name_hash_list, and ivar_offset_hash_list.
(insert_method_into_method_map): New.
(objc_add_method): Use insert_method_into_method_map instead of
add_method_to_hash_list.
(start_class): Call add_interface instead of add_class.
* objc-act.h (cls_name_hash_list, als_name_hash_list,
nst_method_hash_list, cls_method_hash_list): Removed.
In gcc/objcp/:
2011-10-14 Nicola Pero <nicola.pero@meta-innovation.com>
* Make-lang.in (OBJCXX_OBJS): Added objc-map.o.
(objcp/objc-map.o): New rule.
(objcp/objcp-act.o): Depend on objc/objc-map.h.
* config-lang.in (gtfiles): Added objc-map.h.
From-SVN: r179965
2011-10-14 Jonathan Yong <jon_y@users.sourceforge.net>
* configure.host: Use config/os/mingw32-w64 instead of
config/os/mingw32 if vendor key is "w64".
* config/os/mingw32-w64: Duplicate from config/os/mingw32.
* config/os/mingw32-w64/os_defines.h: Enable
_GLIBCXX_FULLY_DYNAMIC_STRING if undefined.
* acinclude.m4: Set fully-dynamic-string to 1 when enabled,
0 when disabled or undefined if unset by user.
* include/bits/basic_string.h: Check if
_GLIBCXX_FULLY_DYNAMIC_STRING is set to 0 instead of undefined.
include/bits/basic_string.tcc: Likewise.
* configure: Regenerated.
* config.h.in: Likewise.
From-SVN: r179961
PR c++/50614
* cp-tree.h (VAR_TEMPL_TYPE_FIELD_OR_FUNCTION_DECL_CHECK): New.
(DECL_TEMPLATE_INFO): Use it.
* pt.c (tsubst_decl) [FIELD_DECL]: Set DECL_TEMPLATE_INFO
if the decl has an NSDMI.
* init.c (perform_member_init): Use it.
From-SVN: r179945
* config/sparc/sparc.md (UNSPEC_FPMERGE): Delete.
(UNSPEC_MUL16AU, UNSPEC_MUL8, UNSPEC_MUL8SU, UNSPEC_MULDSU): New
unspecs.
(fpmerge_vis): Remove inaccurate comment, represent using vec_select
of a vec_concat.
(vec_interleave_lowv8qi, vec_interleave_highv8qi): New insns.
(fmul8x16_vis, fmul8x16au_vis, fmul8sux16_vis, fmuld8sux16_vis):
Reimplement as unspecs and remove inaccurate comments.
(vis3_shift_patname): New code attr.
(<vis3_shift_insn><vbits>_vis): Rename to "v<vis3_shift_patname><mode>3".
(vis3_addsub_ss_patname): New code attr.
(<vis3_addsub_ss_insn><vbits>_vis): Rename to
"<vis3_addsub_ss_patname><mode>3".
* config/sparc/sparc.c (sparc_vis_init_builtins): Update to
accommodate pattern name changes.
From-SVN: r179943
* tree-ssa.c (maybe_optimize_var): Drop TREE_ADDRESSABLE
from vector or complex vars even if their DECL_UID is in not_reg_needs
bitmap.
Co-Authored-By: Richard Guenther <rguenther@suse.de>
From-SVN: r179930
* config/i386/sse.md (reduc_umin_v8hi): New pattern.
* config/i386/i386.c (ix86_build_const_vector): Handle
also V32QI, V16QI, V16HI and V8HI modes.
(emit_reduc_half): New function.
(ix86_expand_reduc): Use phminposuw insn for V8HImode UMIN.
Use emit_reduc_half helper function.
* gcc.target/i386/sse4_1-phminposuw-2.c: New test.
* gcc.target/i386/sse4_1-phminposuw-3.c: New test.
* gcc.target/i386/avx-vphminposuw-2.c: New test.
* gcc.target/i386/avx-vphminposuw-3.c: New test.
From-SVN: r179929
2011-10-12 Lawrence Crowl <crowl@google.com>
Diego Novillo <dnovillo@google.com>
* lto-streamer-in.c (input_struct_function_base): Factor out of ...
(input_function): ... here.
* lto-streamer-out.c (output_struct_function_base): Factor out of ...
(output_function): ... here.
Co-Authored-By: Diego Novillo <dnovillo@google.com>
From-SVN: r179928
2011-10-12 Gabriel Charette <gchare@google.com>
Diego Novillo <dnovillo@google.com>
* streamer-hooks.h (struct streamer_hooks): Add hooks
input_location and output_location.
* lto-streamer-in.c (lto_input_location): Use
streamer_hooks.input_location, if set.
* lto-streamer-out.c (lto_output_location): Use
streamer_hooks.output_location, if set.
Co-Authored-By: Diego Novillo <dnovillo@google.com>
From-SVN: r179927
2011-10-13 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50712
* ipa-split.c (split_function): Always re-gimplify parameters
when they are not gimple vals before passing them. Properly
check for type compatibility.
* gcc.target/i386/pr50712.c: New testcase.
From-SVN: r179919
2011-10-13 Ed Schonberg <schonberg@adacore.com>
* sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
New predicate to determine whether some operations on an array
type are available when the full view of its component may differ
from the view of the point of the array declaration.
* sem_ch4.adb (Find_Equality_Types): Use
Available_Full_View_Of_Component.
* sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
2011-10-13 Ed Schonberg <schonberg@adacore.com>
* sem_ch9.adb: Analyze aspects while discriminants of protected
type are visible.
2011-10-13 Geert Bosch <bosch@adacore.com>
* Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
longer depend on an external library.
* gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
Update dependencies.
* gcc-interface/Make-lang.in: Update dependencies.
From-SVN: r179914
2011-10-13 Cyrille Comar <comar@adacore.com>
* gnat_ugn.texi: Minor editing.
2011-10-13 Vincent Celier <celier@adacore.com>
* projects.texi: Add documentation on packages and attributes
that are inherited from a project being extended into the
extended project.
2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Build_Master): Rewritten.
(Expand_N_Full_Type_Declaration): Reformat the declarative
region. Update the call to Build_Master_Renaming.
(Expand_Previous_Access_Type): Rewritten.
* exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
Add local constant Result_Subt and update related usage.
(Expand_N_Extended_Return_Statement): Add local constant
Result_Subt and update related usage.
* exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
new context detection mechanism.
(Build_Class_Wide_Master):
Use Insert_Action to add the renaming into the tree.
(Build_Master_Entity): Rewritten to use the new context detection
mechanism.
(Build_Master_Renaming): Add formal parameter Ins_Nod
and related usage. Use Insert_Action to add the renaming into the
tree.
(Find_Enclosing_Context): New subsidiary routine. Rather
than relying on enclosing scopes, this routine looks at the
tree structure to figure out the proper context for a _master
or a _chain. This approach eliminates the issues with transient
scopes which have not been converted into blocks.
* exp_ch9.ads (Build_Master_Entity): Change parameter profile
to better reflect the new usage. Update the related comment.
(Build_Master_Renaming): Add formal parameter Ins_Nod. Update
the comment on usage.
* sem_ch3.adb (Access_Definition): Update the calls to
Build_Master_Entity and Build_Master_Renaming.
* sem_ch6.adb (Create_Extra_Formals): Add local variable
Full_Subt. Code reformatting.
* sem_util.adb (Is_Iterator): Alphabetized.
(Is_LHS): Alphabetized.
(Is_Limited_Class_Wide_Type): New routine.
* sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
From-SVN: r179913
2011-10-13 Geert Bosch <bosch@adacore.com>
* a-ngrear.adb (Solve): Make generic and move to
System.Generic_Array_Operations.
* s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
New generic solvers to compute a vector resp. matrix Y such
that A * Y = X, approximately.
* s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
Implement using Forward_Eliminate and Back_Substitute
* a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
on BLAS and LAPACK.
* a-ngcoar.ads ("abs"): Fix return type to be real.
From-SVN: r179912
2011-10-13 Geert Bosch <bosch@adacore.com>
* s-gearop.ads (Forward_Eliminate): Add "abs" formal function
returning a Real.
* s-gearop.adb (Forward_Eliminate): Remove local "abs" function
and use formal.
* a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
new profile.
From-SVN: r179910