RE: [Ping] RE: CR16 Port addition
On Tue, 14 Feb 2012, Jayant R. Sonar wrote: I have not worked on these changes before. Therefore, can you please review the attached patch and let me know if any changes are required to be done in it. Index: wwwdocs/htdocs/gcc-4.7/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v retrieving revision 1.79 diff -r1.79 changes.html 587a588,592 h3CR16/h3 ul liSupport has been added for the National Semiconductor's CR16 architecture./li This line is too long (try not to exceed about 76 columns) and omit either the or 's. The whole patchset is fine with these changes. Thanks, Gerald PS: Next step: gcc/doc/contrib.texi if you like. :-)
Re: [patch, testsuite] PR 52229, testsuite failure
Ping? ... * gfortran.dg/vect/pr32380.f: XFAIL on PowerPC and ia-64. This fixes the failure on powerpc-apple-darwin9 (see http://gcc.gnu.org/ml/gcc-testresults/2012-02/msg01809.html ). The fix is a little bit brutal since two loops are vectorized on powerpc-apple-darwin9, but I don't think a refined test is worth the trouble. Unless someone complains in the coming day, I think you can consider your patch as approved. Thanks, Dominique
Re: [PATCH] MIPS16 TLS support for GCC
Richard Henderson r...@redhat.com writes: On 02/04/2012 02:06 AM, Richard Sandiford wrote: Actually I had that idea of a link-once function too, but it turned out quite complicated to do without rewriting some generic parts of GCC as it is currently not prepared to emit link-once functions outside C++ compilations. It's been a while and I did lots of other stuff meanwhile, so please excuse me if I got anything wrong here. Hmm, OK, I wouldn't have expected that. But if you've tried making __mips16_rdhwr link-once and had a bad experience with it, then yeah, let's go with the hidden libgcc function. It's just a shame that we're having to force static linking of libgcc for this one case. The i386 target does it all the time for its __x86.get_pc_thunk.?x thingys. Thanks for the pointer. Here's a patch that takes the same approach. There's no problem relying on comdat groups here, since MIPS16 TLS requires 2.22 gas and ld anyway. Tested on mips64-linux-gnu, mips-sde-elf and various other mips*-elf targets. Applied. Richard gcc/ * config/mips/mips.c (mips_need_mips16_rdhwr_p): New variable. (mips_get_tp): Set it. Record that __mips16_rdhwr binds locally. (mips_start_unique_function, mips_output_mips16_rdhwr) (mips_code_end): New functions. (TARGET_ASM_CODE_END): Define. libgcc/ * config.host (mips64*-*-linux*, mipsisa64*-*-linux*) (mips*-*-linux*): Remove t-slibgcc-libgcc. * config/mips/t-mips16 (LIB1ASMFUNCS): Remove __mips16_rdhwr. * config/mips/mips16.S (__mips16_rdhwr): Delete. Index: gcc/config/mips/mips.c === --- gcc/config/mips/mips.c 2012-02-18 18:11:13.0 + +++ gcc/config/mips/mips.c 2012-02-19 16:27:26.198924095 + @@ -592,6 +592,9 @@ struct target_globals *mips16_globals; and returned from mips_sched_reorder2. */ static int cached_can_issue_more; +/* True if the output uses __mips16_rdhwr. */ +static bool mips_need_mips16_rdhwr_p; + /* Index R is the smallest register class that contains register R. */ const enum reg_class mips_regno_to_class[FIRST_PSEUDO_REGISTER] = { LEA_REGS,LEA_REGS, M16_REGS, V1_REG, @@ -2842,7 +2845,9 @@ mips_get_tp (void) tp = gen_reg_rtx (Pmode); if (TARGET_MIPS16) { + mips_need_mips16_rdhwr_p = true; fn = mips16_stub_function (__mips16_rdhwr); + SYMBOL_REF_FLAGS (fn) |= SYMBOL_FLAG_LOCAL; if (!call_insn_operand (fn, VOIDmode)) fn = force_reg (Pmode, fn); emit_insn (PMODE_INSN (gen_tls_get_tp_mips16, (tp, fn))); @@ -5827,6 +5832,33 @@ mips_gimplify_va_arg_expr (tree valist, return addr; } +/* Declare a unique, locally-binding function called NAME, then start + its definition. */ + +static void +mips_start_unique_function (const char *name) +{ + tree decl; + + decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL, +get_identifier (name), +build_function_type_list (void_type_node, NULL_TREE)); + DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL, + NULL_TREE, void_type_node); + TREE_PUBLIC (decl) = 1; + TREE_STATIC (decl) = 1; + + DECL_COMDAT_GROUP (decl) = DECL_ASSEMBLER_NAME (decl); + + targetm.asm_out.unique_section (decl, 0); + switch_to_section (get_named_section (decl, NULL, 0)); + + targetm.asm_out.globalize_label (asm_out_file, name); + fputs (\t.hidden\t, asm_out_file); + assemble_name (asm_out_file, name); + putc ('\n', asm_out_file); +} + /* Start a definition of function NAME. MIPS16_P indicates whether the function contains MIPS16 code. */ @@ -5865,6 +5897,26 @@ mips_end_function_definition (const char } } +/* Output a definition of the __mips16_rdhwr function. */ + +static void +mips_output_mips16_rdhwr (void) +{ + const char *name; + + name = __mips16_rdhwr; + mips_start_unique_function (name); + mips_start_function_definition (name, false); + fprintf (asm_out_file, + \t.set\tpush\n + \t.set\tmips32r2\n + \t.set\tnoreorder\n + \trdhwr\t$3,$29\n + \t.set\tpop\n + \tj\t$31\n); + mips_end_function_definition (name); +} + /* Return true if calls to X can use R_MIPS_CALL* relocations. */ static bool @@ -8467,6 +8519,15 @@ mips_file_start (void) ASM_COMMENT_START, mips_small_data_threshold, mips_arch_info-name, mips_isa); } + +/* Implement TARGET_ASM_CODE_END. */ + +static void +mips_code_end (void) +{ + if (mips_need_mips16_rdhwr_p) +mips_output_mips16_rdhwr (); +} /* Make the last instruction frame-related and note that it performs the operation described by FRAME_PATTERN. */ @@ -17357,6 +17418,8 @@ #define TARGET_PREFERRED_RELOAD_CLASS mi #define TARGET_ASM_FILE_START mips_file_start #undef TARGET_ASM_FILE_START_FILE_DIRECTIVE #define
Re: [PR52001] too many cse reverse equiv exprs (take2)
Alexandre Oliva aol...@redhat.com writes: On Feb 15, 2012, Richard Sandiford rdsandif...@googlemail.com wrote: I'm fine with putting it in and seeing what breaks. But I'd really prefer if we knew in theory. :-) Ok, I dove into the problem without a testcase, and I managed to trigger it on other platforms after tweaking get_addr a bit so as use loc lists form canonical values, and to avoid returning other VALUEs if other alternatives exist. Like I say, my understanding before this patch series went in was that cselib values weren't supposed to be cyclic. Now that they are, what should consumers like memrefs_conflict_p do to avoid getting stuck? I'm now testing the following heuristic: only use an expr instead of a value if the expr doesn't reference any value whose uid is greater than that of the value. This worked for libgcc so far; regstrapping now. Here's the revised patch that addresses Jakub's and your comments, that regstrapped on x86_64-linux-gnu and i686-linux-gnu, followed by the patch I'm testing now on both platforms. Thanks for tackling this. I agree it looks like the patch should work. I have to admit I still don't like these changes, and it still isn't obvious to me when canonical_cselib_val is supposed to be used. I'd much rather we kept to the original dag. But I realise that probably isn't a useful attitude to take, and I don't know vartracking well enough to understand the constraints, so I'll shut up now. Richard
[v3] libstdc++/52309
Hi, this is what I'm going to apply. Seems straightforward enough to go in now. Tested x86_64-linux. Thanks, Paolo. /// 2012-02-19 Paolo Carlini paolo.carl...@oracle.com PR libstdc++/52309 * include/bits/hashtable_policy.h (_Equality_base, true,:: _M_equal(const _Hashtable)): Compare values with operator==. * testsuite/23_containers/unordered_set/operators/52309.cc: New. Index: include/bits/hashtable_policy.h === --- include/bits/hashtable_policy.h (revision 184380) +++ include/bits/hashtable_policy.h (working copy) @@ -1113,7 +1113,7 @@ for (auto __itx = __this-begin(); __itx != __this-end(); ++__itx) { const auto __ity = __other.find(_ExtractKey()(*__itx)); - if (__ity == __other.end() || *__ity != *__itx) + if (__ity == __other.end() || !(*__ity == *__itx)) return false; } return true; Index: testsuite/23_containers/unordered_set/operators/52309.cc === --- testsuite/23_containers/unordered_set/operators/52309.cc(revision 0) +++ testsuite/23_containers/unordered_set/operators/52309.cc(revision 0) @@ -0,0 +1,28 @@ +// { dg-do compile } +// { dg-options -std=gnu++0x } + +// Copyright (C) 2012 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// http://www.gnu.org/licenses/. + +#include unordered_set + +// libstdc++/52309 +struct value {}; +struct hash { std::size_t operator()(const value) const; }; +bool operator==(value const, value const); +std::unordered_setvalue, hash set; +bool z = (set == set);
New Swedish PO file for 'gcc' (version 4.7-b20120128)
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Swedish team of translators. The file is available at: http://translationproject.org/latest/gcc/sv.po (This file, 'gcc-4.7-b20120128.sv.po', has just now been sent to you in a separate email.) All other PO files for your package are available in: http://translationproject.org/latest/gcc/ Please consider including all of these in your next release, whether official or a pretest. Whenever you have a new distribution with a new version number ready, containing a newer POT file, please send the URL of that distribution tarball to the address below. The tarball may be just a pretest or a snapshot, it does not even have to compile. It is just used by the translators when they need some extra translation context. The following HTML page has been updated: http://translationproject.org/domain/gcc.html If any question arises, please contact the translation coordinator. Thank you for all your work, The Translation Project robot, in the name of your translation coordinator. coordina...@translationproject.org
Re: [committed] invoke.texi: fix hyphenation of floating point and related terms
On Sun, 19 Feb 2012, Gerald Pfeifer wrote: I know when ahead and committed this patch Ahem, make this: I now went ahead... Gerald
Re: [google/gcc-4_6_2-mobile] PATCH: PR other/46770: Replace .ctors/.dtors with .init_array/.fini_array on targets supporting them
Hey, Jing, you broke the google/gcc-4_6 branch by checking the new header file into the wrong directory. Fixed via r184386. Ollie On Fri, Feb 17, 2012 at 10:25 PM, Jing Yu jin...@google.com wrote: OK. Thanks for porting the patch. I will commit the patch into google/gcc-4_6_2-mobile for you. I would also like to commit it into google/gcc-4_6 branch if all tests pass. This patch is almost the same as Google Ref 47894. Thanks, Jing On Fri, Feb 17, 2012 at 5:20 PM, H.J. Lu hongjiu...@intel.com wrote: Hi, This patch backports the fix from trunk: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770 for google/gcc-4_6_2-mobile branch. This is needed to support C++ global constructors/destructiors on Android/x86. OK for google/gcc-4_6_2-mobile branch? Thanks. H.J. --- 2011-08-20 H.J. Lu hongjiu...@intel.com PR other/46770 * config.gcc (tm_file): Add initfini-array.h if .init_arrary/.fini_array are supported. * crtstuff.c: Don't generate .ctors nor .dtors sections if USE_INITFINI_ARRAY is defined. * output.h (default_elf_init_array_asm_out_constructor): New. (default_elf_fini_array_asm_out_destructor): Likewise. * varasm.c (elf_init_array_section): Likewise. (elf_fini_array_section): Likewise. (get_elf_initfini_array_priority_section): Likewise. (default_elf_init_array_asm_out_constructor): Likewise. (default_elf_fini_array_asm_out_destructor): Likewise. * config/initfini-array.h: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177933 138bc75d-0d04-0410-961f-82ee72b054a4 Conflicts: gcc/ChangeLog --- gcc/ChangeLog.hjl | 21 +++ gcc/config.gcc | 5 +++ gcc/config/initfini-array.h | 37 +++ gcc/crtstuff.c | 11 +++- gcc/output.h | 2 + gcc/varasm.c | 58 +++ 6 files changed, 133 insertions(+), 1 deletions(-) create mode 100644 gcc/ChangeLog.hjl create mode 100644 gcc/config/initfini-array.h diff --git a/gcc/ChangeLog.hjl b/gcc/ChangeLog.hjl new file mode 100644 index 000..3527b27 --- /dev/null +++ b/gcc/ChangeLog.hjl @@ -0,0 +1,21 @@ +2011-12-07 H.J. Lu hongjiu...@intel.com + + Backport from mainline + 2011-08-20 H.J. Lu hongjiu...@intel.com + + PR other/46770 + * config.gcc (tm_file): Add initfini-array.h if + .init_arrary/.fini_array are supported. + + * crtstuff.c: Don't generate .ctors nor .dtors sections if + USE_INITFINI_ARRAY is defined. + + * output.h (default_elf_init_array_asm_out_constructor): New. + (default_elf_fini_array_asm_out_destructor): Likewise. + * varasm.c (elf_init_array_section): Likewise. + (elf_fini_array_section): Likewise. + (get_elf_initfini_array_priority_section): Likewise. + (default_elf_init_array_asm_out_constructor): Likewise. + (default_elf_fini_array_asm_out_destructor): Likewise. + + * config/initfini-array.h: New. diff --git a/gcc/config.gcc b/gcc/config.gcc index d9ac0fa..b386424 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -3176,6 +3176,11 @@ if test x$with_schedule = x; then esac fi +# Support --enable-initfini-array. +if test x$enable_initfini_array = xyes; then + tm_file=${tm_file} initfini-array.h +fi + # Validate and mark as valid any --with options supported # by this target. In order to use a particular --with option # you must list it in supported_defaults; validating the value diff --git a/gcc/config/initfini-array.h b/gcc/config/initfini-array.h new file mode 100644 index 000..8aaadf6 --- /dev/null +++ b/gcc/config/initfini-array.h @@ -0,0 +1,37 @@ +/* Definitions for ELF systems with .init_array/.fini_array section + support. + Copyright (C) 2011 + Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3, or (at your + option) any later version. + + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + http://www.gnu.org/licenses/. */ + +#define USE_INITFINI_ARRAY + +#undef INIT_SECTION_ASM_OP +#undef FINI_SECTION_ASM_OP + +#undef INIT_ARRAY_SECTION_ASM_OP +#define INIT_ARRAY_SECTION_ASM_OP + +#undef