Re: [patch][cris] Clean up some cris-aout remnants

2012-06-08 Thread Hans-Peter Nilsson
On Tue, 5 Jun 2012, Steven Bosscher wrote: > This patch just cleans up some remaining code for removed cris-aout > subtarget by folding away code that was conditional on TARGET_ELF. > > Tested with a x86_64-linux X cris-elf cross-compiler. OK for trunk? Woohoo, that's a lot of left-over cruft! @@

Committed: fix CRIS build errors with --enable-build-with-cxx.

2012-06-09 Thread Hans-Peter Nilsson
Trying --enable-build-with-cxx revealed a build regression for cris-elf from the recent atomic support bits. Tested the same, no regressions. Casting those INTVAL's would've been a tiny bit uglier than using a temp, thus. Hey, those were stashed there as ints so what's wrong with passing them as

inc-dec (was: Re: [RFC, ivopts] fix bugs in ivopts address cost computation)

2012-06-10 Thread Hans-Peter Nilsson
On Sun, 10 Jun 2012, Oleg Endo wrote: > I've tried some of the cases mentioned in > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50749 > with Sandra's patch applied. Unfortunately it didn't help much. But thanks for checking! > There > seem to be other things going wrong with auto-inc-dec. Yeah

Re: [RFA:] Caveat for ARM in gcc-4.7/changes.html: unaligned accesses

2012-06-10 Thread Hans-Peter Nilsson
> From: Michael Hope > Date: Mon, 11 Jun 2012 00:04:19 +0200 > On 8 June 2012 16:53, Hans-Peter Nilsson wrote: > >> From: Hans-Peter Nilsson > >> Date: Fri, 8 Jun 2012 06:29:04 +0200 > > > >> > From: Michael Hope > >> > Date:

Re: [RFA:] Caveat for ARM in gcc-4.7/changes.html: unaligned accesses

2012-06-10 Thread Hans-Peter Nilsson
> From: Gerald Pfeifer > Date: Mon, 11 Jun 2012 00:27:21 +0200 > This is only a review wearing my web hat; it is orthogonal to the > discussion with the ARM guys. ;-) > > On Fri, 8 Jun 2012, Hans-Peter Nilsson wrote: > > +On ARM, when compiling for ARMv6 (b

Re: [RFC] Target-specific limits on vector alignment

2012-06-11 Thread Hans-Peter Nilsson
> From: Richard Earnshaw > Date: Mon, 11 Jun 2012 15:16:50 +0200 > The ARM ABI states that vectors larger than 64 bits in size still have > 64-bit alignment; never-the-less, the HW supports alignment hints of up > to 128-bits in some cases and will trap in a vector has an alignment > that less th

Re: [SH] PR 50749 - Auto-inc-dec does not find subsequent contiguous mem accesses

2012-06-11 Thread Hans-Peter Nilsson
On Tue, 12 Jun 2012, Kaz Kojima wrote: > Oleg Endo wrote: > > Some of the tests pass, some of them don't because > > of the auto-inc-dec issues mentioned in the PR. > > I thought that the tests which are known to fail are marked > with XFAIL, Yes, with a clear reference to the PR at the xfail. T

Re: [RFA:] Caveat for ARM in gcc-4.7/changes.html: unaligned accesses

2012-06-12 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Mon, 11 Jun 2012 00:59:57 +0200 > > From: Michael Hope > > Date: Mon, 11 Jun 2012 00:04:19 +0200 > > > On 8 June 2012 16:53, Hans-Peter Nilsson > > wrote: > > >> From: Hans-Peter Nilsson > > >>

Re: Committed: atomic support for CRIS

2012-06-12 Thread Hans-Peter Nilsson
> From: Richard Henderson > Date: Tue, 12 Jun 2012 23:04:02 +0200 > On 2012-05-31 22:58, Hans-Peter Nilsson wrote: > > +(define_expand "atomic_compare_and_swap" > > + [(match_operand:SI 0 "register_operand") > > + (match_operand:BWD 1 &

Re: [RFA:] Caveat for ARM in gcc-4.7/changes.html: unaligned accesses

2012-06-12 Thread Hans-Peter Nilsson
> From: Michael Hope > Date: Wed, 13 Jun 2012 00:43:47 +0200 > On 13 June 2012 02:32, Hans-Peter Nilsson wrote: > >> From: Hans-Peter Nilsson > >> Date: Mon, 11 Jun 2012 00:59:57 +0200 > >> > > user-space code".  Maybe the kernel too, I can't

Re: [RFA:] Caveat for ARM in gcc-4.7/changes.html: unaligned accesses

2012-06-13 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Mon, 11 Jun 2012 01:16:09 +0200 > +to be compiled with -mno-unaligned-accesses. Better spelled as "-mno-unaligned-access". Bah. brgds, H-P

Re: Committed: atomic support for CRIS

2012-06-13 Thread Hans-Peter Nilsson
96.62.19 > 76.96.62.24 > Content-Transfer-Encoding: 8bit > MIME-Version: 1.0 > > On Jun 12, 2012, at 4:47 PM, Hans-Peter Nilsson wrote: > >> From: Richard Henderson > >> Date: Tue, 12 Jun 2012 23:04:02 +0200 > > Putting a lot of trust onto users and libr

Re: [PATCH 1/3] Add atomic_compare_and_swap, atomic_exchange and atomic_fetch_add patterns.

2012-06-14 Thread Hans-Peter Nilsson
On Thu, 14 Jun 2012, Maxim Kuvyrkov wrote: > On 14/06/2012, at 6:33 AM, Richard Sandiford wrote: > > Maxim Kuvyrkov writes: > >> +/* Subroutines of the mips_process_sync_loop. > >> + Emit barriers as needed for the memory MODEL. */ > >> + > >> +static bool > >> +mips_emit_pre_atomic_barrier_p (

Re: [PATCH 1/3] Add atomic_compare_and_swap, atomic_exchange and atomic_fetch_add patterns.

2012-06-14 Thread Hans-Peter Nilsson
On Fri, 15 Jun 2012, Maxim Kuvyrkov wrote: > On 15/06/2012, at 8:51 AM, Hans-Peter Nilsson wrote: > > While you're editing in these parts, how about making this > > "bool emit_atomic_barrier_p (enum memmodel, bool pre)" and move it to > > the middle-end, say

Ping*2: [RFA:] fix bug in configure header-probing for stack protector support in target C library

2012-06-14 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Fri, 8 Jun 2012 02:31:10 +0200 > > From: Hans-Peter Nilsson > > Date: Fri, 1 Jun 2012 01:38:22 +0200 > > > gcc: > > Fix configure test for "stack protector support in target C library". > > * configure

[RFA:] Caveat for ARM in gcc-4.7/changes.html: unaligned accesses, take 2

2012-06-14 Thread Hans-Peter Nilsson
Y is 28 for introduction of the quoted code in arch/arm/mm/alignment.c, AFAICT, so how about this one, ok now? Index: changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v retrieving revision 1.113 diff -p -u -r1.1

Re: [patch] Deal with #ident without

2012-06-19 Thread Hans-Peter Nilsson
On Tue, 19 Jun 2012, Steven Bosscher wrote: > I've now committed this, see r188791. Breaking cris-elf. Just try rebuilding cc1: ./gcc/gcc/../libdecnumber/dpd -I../libdecnumber\ /tmp/hpautotest-gcc1/gcc/gcc/config/cris/cris.c -o cris.o /tmp/hpautotest-gcc1/gcc/gcc/config/cr

Re: [patch] Remove NO_IMPLICIT_EXTERN_C target macro

2012-06-19 Thread Hans-Peter Nilsson
On Mon, 18 Jun 2012, Steven Bosscher wrote: > The attached patch removes NO_IMPLICIT_EXTERN_C, and replaces its sole > user with IMPLICIT_EXTERN_C to avoid the double negations (#ifndef > NO_IMPLICIT_EXTERN_C, etc.). > > Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk? I saw it w

Re: [Ping] Fix gcc/gcov.c and libgcc/libgcov.c to fix build on VxWorks

2012-06-21 Thread Hans-Peter Nilsson
On Wed, 20 Jun 2012, rbmj wrote: > There is an alternate solution- I could use fixincludes to add a macro to wrap > over mkdir on VxWorks. A couple of possible ways to do this: > > 1. Define a normal macro to posix-ify it, i.e. #define mkdir(a, b) > ((mkdir)(a)). Since this would hide single-arg

Ping: [RFA:] Caveat for ARM in gcc-4.7/changes.html: unaligned accesses, take 2

2012-06-21 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Fri, 15 Jun 2012 04:07:23 +0200 A ping. > Y is 28 for introduction of the quoted code in > arch/arm/mm/alignment.c, AFAICT, so how about this one, ok now? > > Index: changes.html > =

Ping*3: [RFA:] fix bug in configure header-probing for stack protector support in target C library

2012-06-21 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Fri, 15 Jun 2012 03:48:35 +0200 > > From: Hans-Peter Nilsson > > Date: Fri, 8 Jun 2012 02:31:10 +0200 > > > From: Hans-Peter Nilsson > > > Date: Fri, 1 Jun 2012 01:38:22 +0200 > > > > > gcc: > > >

Re: [patch] Remove and poison a few more old target macros

2012-06-24 Thread Hans-Peter Nilsson
On Sun, 24 Jun 2012, Steven Bosscher wrote: > * doc/tm.texi.in: Remove UNALIGNED_INT_ASM_OP reference from the > documentation. > * doc/tm.texi: Regenerate. > * doc/cpp.texi: Make example for #error generic. > * config/frv/frv.h: Fix example text to match tm.texi. FWI

Re: Ping: [RFA:] Caveat for ARM in gcc-4.7/changes.html: unaligned accesses, take 2

2012-06-29 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Fri, 22 Jun 2012 04:24:01 +0200 > > From: Hans-Peter Nilsson > > Date: Fri, 15 Jun 2012 04:07:23 +0200 > > A ping. And another ping, now CCing ARM maintainers, <http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00983.html>. >

Ping*4: [RFA:] fix bug in configure header-probing for stack protector support in target C library

2012-06-29 Thread Hans-Peter Nilsson
> From: "Joseph S. Myers" > Date: Fri, 22 Jun 2012 13:09:42 +0200 > On Fri, 22 Jun 2012, Hans-Peter Nilsson wrote: > > > > > > Fix configure test for "stack protector support in target C > > > > > library". > > >

Fix gcc.dg/lower-subreg-1.c failure, revisited.

2012-07-07 Thread Hans-Peter Nilsson
> From: Richard Sandiford > Date: Wed, 9 May 2012 11:14:49 +0200 > Hans-Peter Nilsson writes: > >> From: Richard Sandiford > >> Date: Tue, 1 May 2012 16:46:38 +0200 > > > >> To repeat: as things stand, very few targets define proper rtx costs >

Ping again: [RFA:] Caveat for ARM in gcc-4.7/changes.html: unaligned accesses, take 2

2012-07-07 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Fri, 29 Jun 2012 15:06:44 +0200 > > From: Hans-Peter Nilsson > > Date: Fri, 22 Jun 2012 04:24:01 +0200 > > > > From: Hans-Peter Nilsson > > > Date: Fri, 15 Jun 2012 04:07:23 +0200 > > > > A ping. >

Re: PR 51094 - fprint_w() in output_addr_const() reinstated

2012-07-11 Thread Hans-Peter Nilsson
On Mon, 9 Jul 2012, Dimitrios Apostolou wrote: > Since output_addr_const() shows pretty hot in the compiler, I reinstated the > fprint_w() call in place of fprintf(). > > This patch relies on two things: 2's complement representation for negative > int and that HOST_WIDE_INT is at least as large ty

Re: [PATCH] [LM32] Fix lm32-elf-gcc build error by remove unnecessary constant legitimate check.

2012-07-11 Thread Hans-Peter Nilsson
On Tue, 10 Jul 2012, Jia Liu wrote: > Hi all, > > When I build lm32-elf-gcc, it failed at libgcc configure due to > lm32-elf-cc1 segment fault when compile conftest.c: > > void bar (); > void clean (int *); > void foo () > { > int i __attribute__ ((cleanup (clean))); > bar(); > } > > Then I fin

Re: [PATCH] [LM32] Fix lm32-elf-gcc build error by remove unnecessary constant legitimate check.

2012-07-12 Thread Hans-Peter Nilsson
On Thu, 12 Jul 2012, Jia Liu wrote: > May you > give me more comment? I wanna fix it. Sorry, I'll leave that to the lm32 maintainer, I just wasnted to clear a misunderstanding regarding TARGET_LEGITIMATE_CONSTANT_P. brgds, H-P

Re: Fix gcc.dg/lower-subreg-1.c failure, revisited.

2012-07-12 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Sun, 8 Jul 2012 01:02:34 +0200 PR rtl-optimization/53176 > * rtlanal.c (rtx_cost): Adjust default cost for X with a > UNITS_PER_WORD factor for all X according to the size of > its mode, not just for SUBREGs with

Re: Fix PR53908

2012-07-12 Thread Hans-Peter Nilsson
> From: Richard Sandiford > Date: Thu, 12 Jul 2012 21:18:54 +0200 > if (CALL_P (insn)) > { > if (RTL_CONST_OR_PURE_CALL_P (insn)) > /* Pure functions can read from memory. Const functions can > read from arguments that the ABI has forced onto the stack.

Re: Fix PR53908

2012-07-13 Thread Hans-Peter Nilsson
> From: Richard Guenther > Date: Fri, 13 Jul 2012 09:37:13 +0200 > On Fri, Jul 13, 2012 at 9:21 AM, Steven Bosscher > wrote: > > On Fri, Jul 13, 2012 at 8:47 AM, Hans-Peter Nilsson > > wrote: > >>> From: Richard Sandiford > >>> Date: Thu, 12 J

Re: Fix PR53908

2012-07-13 Thread Hans-Peter Nilsson
> From: Richard Guenther > Date: Fri, 13 Jul 2012 10:08:05 +0200 > On Fri, Jul 13, 2012 at 9:59 AM, Hans-Peter Nilsson > wrote: > > Ok for 4.7 too? > > Of course. Committed to trunk as follows, including the test-case which doesn't fail on trunk but does on 4.6

CRIS atomics revisited 0/4: summary

2012-07-15 Thread Hans-Peter Nilsson
These were spotted while debugging usage of atomics within glibc. The kind of changes are microoptimizations, nanooptimizations, a buglet and a major issue. Micro: the load-store-conditional sequence for compare-and-swap I originally committed was an earlier version improved later. Nanooptimizati

CRIS atomics revisited 1/4: use need_atomic_barrier_p.

2012-07-15 Thread Hans-Peter Nilsson
Use the new need_atomic_barrier_p. gcc: * config/cris/sync.md ("atomic_fetch_") ("atomic_compare_and_swap"): Gate expand_mem_thread_fence calls on result of call to need_atomic_barrier_p. Index: config/cris/sync.md ==

CRIS atomics revisited 2/4: don't allow a memory operand (with possible side-effects)

2012-07-15 Thread Hans-Peter Nilsson
Buglet in "atomic_compare_and_swap", allowing (in theory) a volatile or post-increment memory operand. Simplest and safest fixed by excluding all memory operands. gcc: * config/cris/sync.md ("atomic_compare_and_swap"): Change predicate to nonmemory_operand for operand 3. Add FIXM

CRIS atomics revisited 3/4: pattern improvements

2012-07-15 Thread Hans-Peter Nilsson
Microoptimizations for the atomic patterns themselves. Constant operands are so common that it seems wasteful not to handle the most common cases and avoid wasting a register. gcc/testsuite: * gcc.target/cris/20011127-1.c: Adjust to %P being a valid register operand output modifie

CRIS atomics revisited 4/4: give up on alignment of atomic data, RFC for is_lock_free hook

2012-07-15 Thread Hans-Peter Nilsson
Well, give up by default that is, and fix it up in a helper function in glibc to hold a global byte-sized atomic lock for the duration. (Sorry!) Yes, this means that fold_builtin_atomic_always_lock_free is wrong. It knows about alignment in general but doesn't handle the case where the default a

Fixing gcc.c-torture/compile/pr44707.c for CRIS v32 1/2.

2012-07-15 Thread Hans-Peter Nilsson
Buglet in cris_preferred_reload_class, incidental, apparently without effect at least regarding failing test-cases. A class disjunct from the input was returned as "preferred". It could arguably be gcc_asserted as a sanity-check by the caller that the returned class is a subset of the original cl

Fixing gcc.c-torture/compile/pr44707.c for CRIS v32 2/2: RFC: CONSTANT_ADDRESS_P and its default are evil!

2012-07-15 Thread Hans-Peter Nilsson
I think CONSTANT_ADDRESS_P can and should be eliminated, replaced by something like CONSTANT_P (x) && targetm.legitimate_address_p (QImode, x, false) (or QImode replaced by the known used mode) in the code currently calling it. It should, because the default definition is redundant and evil; easy

Re: CRIS atomics revisited 4/4: give up on alignment of atomic data

2012-07-15 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Mon, 16 Jul 2012 05:49:00 +0200 > gcc: > * config/cris/sync.md ("atomic_fetch_") > ("cris_atomic_fetch__1") > ("atomic_compare_and_swap") > ("cris_atomic_compare_and_swap_1"):

Re: CRIS atomics revisited 4/4: give up on alignment of atomic data, RFC for is_lock_free hook

2012-07-17 Thread Hans-Peter Nilsson
> From: Andrew MacLeod > Date: Tue, 17 Jul 2012 14:24:48 +0200 > On 07/15/2012 11:49 PM, Hans-Peter Nilsson wrote: > > Well, give up by default that is, and fix it up in a helper > > function in glibc to hold a global byte-sized atomic lock for > > the duration. (So

Re: CRIS atomics revisited 4/4: give up on alignment of atomic data, RFC for is_lock_free hook

2012-07-17 Thread Hans-Peter Nilsson
> From: Andrew MacLeod > Date: Tue, 17 Jul 2012 14:24:48 +0200 > Any PR's you open related this this, copy me on them and I'll try to get > them addressed. I could separate the issues I saw into PRs 54003-6. That's all, hopefully ...at least for now. :) BTW, your @gcc.gnu.org account doesn't

Re: Commit: ARM: Document -munaligned-access

2012-07-19 Thread Hans-Peter Nilsson
> From: Nick Clifton > Date: Wed, 18 Jul 2012 08:51:16 +0200 > 2012-07-18 Nick Clifton > > * doc/invoke.texi (ARM Options): Document -munaligned-access. > > Index: gcc/doc/invoke.texi > === > --- gcc/doc/invoke.texi

Re: Commit: ARM: Document -munaligned-access

2012-07-20 Thread Hans-Peter Nilsson
> From: nick clifton > Date: Fri, 20 Jul 2012 09:18:52 +0200 > "approved - please apply". Thanks! I see the last sentence could do with better punctuation, so I added the obvious comma. Installed as follows. Index: changes.html =

Committed, CRIS: remove unused variables from cris_asm_output_ident

2012-07-20 Thread Hans-Peter Nilsson
Looks like these were left from Steven's ident-cleanup. Steven, for future reference, you might want to use contrib/warn_summary on the build-logs. ;) Incidentally, the magic option to increase diff context for svn is -x -U as in "-x -U5" below, just to show there's not much else in that function.

Yet another gcc.c-torture/execute/20101011-1.c DO_TEST 0

2012-07-20 Thread Hans-Peter Nilsson
The #elif defined ... #define DO_TEST 0 exceptions are accumulating. Maybe the DO_TEST = 1 case should be the exception... Committed. gcc/testsuite: * gcc.c-torture/execute/20101011-1.c (DO_TEST): Define as 0 for CRIS. Index: gcc.c-torture/execute/20101011-1.c

Re: [RESEND-2][PATCH] Allow printing of escaped curly braces in assembler directives with operands

2012-07-20 Thread Hans-Peter Nilsson
On Wed, 18 Jul 2012, Siddhesh Poyarekar wrote: > Hi, > > Resending. I did not get any responses the last two times and I too > forgot about it. Can someone please review this? This is *not* an approver-review. > An assembler directive with an operand is filtered through > output_asm_insn (or asm

Committed: executable-stack note for CRIS

2012-07-22 Thread Hans-Peter Nilsson
Tested crisv32-linux (much as you can do without actually installing a new /lib/ld.so.1 with the changed defaults). Yep, this is actually a change of the default in glibc (port to be submitted), but changing it this way is safe: with old libraries lacking a note, they default to not having an execu

Committed: testsuite updates for recent changes in atomics for cris*-linux*

2012-07-22 Thread Hans-Peter Nilsson
I changed the defaults for cris*-linux*, but didn't fix the test-suite to go with that, so with unaligned accesses working, the test-suite still checked that they trapped, doh. Here's the update, checked trunk cris-elf and crisv32-elf (because of difference in atomics) and crisv32-linux* on the lo

Re: Commit: ARM: Document -munaligned-access

2012-07-22 Thread Hans-Peter Nilsson
On Fri, 20 Jul 2012, Ryan Mansfield wrote: > On 12-07-19 05:33 PM, Hans-Peter Nilsson wrote: > > > > Index: changes.html > > > > +some source codes generates code that accesses memory on unaligned > > > > +adresses. This will require the kernel

Re: [patch] Move lowering of switches to bit tests to GIMPLE

2012-07-25 Thread Hans-Peter Nilsson
On Tue, 24 Jul 2012, Richard Henderson wrote: > On 07/21/2012 06:10 AM, Oleg Endo wrote: > > I think on SH the cost test in lshift_cheap_p with > > gen_rtx_ASHIFT (word_mode, const1_rtx, reg), speed_p); > > > > will always 'fail', because of sh.c (shiftcosts): > > /* There is no pattern for co

Re: [RFC] Target-specific limits on vector alignment

2012-07-25 Thread Hans-Peter Nilsson
> From: Ulrich Weigand > Date: Tue, 24 Jul 2012 19:38:15 +0200 > > > I've implemented this as a separate hook, rather than using the existing > > > hooks because there's a strong likelihood of breaking some existing ABIs > > > if I did it another way. > > > > > > There are a couple of tests that

Re: [PATCH/MIPS] Emit stack executable note

2012-07-26 Thread Hans-Peter Nilsson
On Wed, 25 Jul 2012, Andrew Pinski wrote: > Hi, > The Linux kernel already supports non-executable stack since around > February 2010. This patch has GCC emit the notes that are associated > with non-executable stack. What does the kernel do when the note isn't present? > OK? Bootstrapped and

Re: [PATCH v2] Target-specific limits on vector alignment

2012-07-29 Thread Hans-Peter Nilsson
> From: Ulrich Weigand > Date: Fri, 27 Jul 2012 17:24:08 +0200 > Richard (Earnshaw) has asked me to take over working on this patch now. > > I've now made the change requested above and removed the size argument. > The target is now simply asked to return the required alignment for the > given v

Re: [PATCH,mmix] convert to constraints.md

2012-08-03 Thread Hans-Peter Nilsson
On Thu, 2 Aug 2012, Nathan Froyd wrote: > As $SUBJECT says. There's not too much interesting here. I did a > fairly literal-minded conversion, so it's possible there's smarter ways > to do some things. Doesn't look too bad though, but ... > Compiled with cross to mmix-knuth-mmixware and spot-ch

Re: Assembly output optimisations (was: PR 51094 - fprint_w() in output_addr_const() reinstated)

2012-08-06 Thread Hans-Peter Nilsson
On Tue, 7 Aug 2012, Dimitrios Apostolou wrote: > Thanks Andreas, hp, Mike, for your comments. Mike I'd appreciate if you > elaborated on how to speed-up sprint_uw_rev(), I don't think I understood what > you have in mind. I just commented on comments and just above the nit-level; formatting and co

Re: add strnlen to libiberty (was Re: Assembly output optimisations)

2012-08-07 Thread Hans-Peter Nilsson
On Mon, 6 Aug 2012, Ian Lance Taylor wrote: > On Mon, Aug 6, 2012 at 10:44 PM, Dimitrios Apostolou wrote: > > > > What else is missing to make this patch appropriate for libiberty? Should I > > change the prolog in strnlen.c, since I only copied it intact from gnulib? > > We generally try to avoid

Re: Add __builtin_clrsb, similar to clz/ctz

2011-07-11 Thread Hans-Peter Nilsson
On Mon, 20 Jun 2011, Bernd Schmidt wrote: > New patch below. Retested on i686 and bfin. Yay, bikeshedding opportunity! :P Can we call them "leading *repeated* sign bits"? (in docs and comments) Calling them "redundant" makes you think the representation is not two's complement but new and improv

Re: Ping: C-family stack check for threads

2011-07-13 Thread Hans-Peter Nilsson
On Sun, 3 Jul 2011, Thomas Klein wrote: > Ye Joey wrote: > > Thomas, > > > > I think your are working on a very useful feature. I have ARM MCU > > applications running of out stack space and resulting strange > > behaviors silently. I'd like to try your patch and probably give > > further comm

Re: Fix PR48542: reload register contents reuse crossing setjmp

2011-07-18 Thread Hans-Peter Nilsson
On Thu, 14 Jul 2011, Ulrich Weigand wrote: > Jeff Law wrote: > > On 06/15/11 21:46, Hans-Peter Nilsson wrote: > > > PR rtl-optimization/48542 > > > * reload.c (find_equiv_reg): Stop looking when finding a > > > setjmp-type call. > > > * reload

Re: [MMIX] Hookize PRINT_OPERAND, PRINT_OPERAND_ADDRESS and PRINT_OPERAND_PUNCT_VALID_P

2011-07-24 Thread Hans-Peter Nilsson
On Mon, 25 Jul 2011, Anatoly Sokolov wrote: > Hi. > > This patch removes obsolete PRINT_OPERAND, PRINT_OPERAND_ADDRESS and > PRINT_OPERAND_PUNCT_VALID_P macros from MMIX back end in the GCC and > introduces equivalent TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS and > TARGET_PRINT_OPERAND_P

Re: Split insn-attr.h

2011-07-24 Thread Hans-Peter Nilsson
On Tue, 28 Jun 2011, Joseph S. Myers wrote: > (In checking for such files - > there aren't that many - I also noticed that the target macro > DELAY_SLOTS_FOR_EPILOGUE is used and documented but not defined by any > target, so the code relating to that macro is ripe for removal and > poisoning of th

Re: [CFT, delay slots] Fix middle-end/49977

2011-08-05 Thread Hans-Peter Nilsson
On Thu, 4 Aug 2011, Richard Henderson wrote: > This seems to do the trick for sim testing of sh-elf and cris-elf. > > I'm interested in advice re debugging experiences with delay slots. > It seems like for calls there's no alternative but to have the unwind > info be incorrect when stopped at the c

Re: PATCH: Add -mavx2 and properly check numbers of mask bits

2011-08-07 Thread Hans-Peter Nilsson
On Sun, 7 Aug 2011, H.J. Lu wrote: > Hi, > > opth-gen.awk has > > print "#define " mask name " (1 << " masknum[vname]++ ")" > > and int has 32bits. We should check > > if (masknum[var] > 32) > > instead of > > if (masknum[var] > 31) IIUC the (int32_t) sign-bit is supposed to be reserved and this i

Re: [MMIX] Hookize REGISTER_MOVE_COST

2011-08-08 Thread Hans-Peter Nilsson
On Mon, 8 Aug 2011, Anatoly Sokolov wrote: > Hi. > > This patch removes obsolete REGISTER_MOVE_COST macro from MMIX back end in > the GCC and introduces equivalent TARGET_REGISTER_MOVE_COST target hook. ...and removed a comment about a moot issue (perfectly ok). > > Regression tested on mmix-

Re: [MMIX] Remove REG_OK_FOR_BASE_P and REG_OK_FOR_INDEX_P macros

2011-08-08 Thread Hans-Peter Nilsson
On Mon, 8 Aug 2011, Anatoly Sokolov wrote: > Hello. > > This patch remove unused REG_OK_FOR_BASE_P and REG_OK_FOR_INDEX_P macros > from the MMIX back end. > > Regression tested on mmix-knuth-mmixware. > > OK to install? > > * config/mmix/mmix.h (REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P):

Re: [build] Move gthr to toplevel libgcc

2011-08-08 Thread Hans-Peter Nilsson
On Mon, 8 Aug 2011, Rainer Orth wrote: > * SUPPORTS_WEAK is probably best detected with autoconf. We have > libgfortran/acinclude.m4 (LIBGFOR_GTHREAD_WEAK), but should probably > go for m4/ax_sys_weak_alias.m4 from the autoconf-archive instead. If > we're lucky, that macro can detect suppor

Re: [PATCH] Fix PR49937

2011-08-09 Thread Hans-Peter Nilsson
On Tue, 9 Aug 2011, Richard Guenther wrote: > > This fixes PR49937 - callers of get_{pointer,object}_alignment > probably should not use BIGGEST_ALIGNMENT to limit what these > functions return (why do they do that? Maybe because formerly > the routines returned TYPE_ALIGN? But why wasn't that bo

Re: [Patch,AVR]: Fix PR49903

2011-08-12 Thread Hans-Peter Nilsson
On Thu, 11 Aug 2011, Georg-Johann Lay wrote: > This is an optimization in machine dependent reorg to > remove redundant comparisons like in > >cc0 = compare (Reg, Num) >if (cc0 == 0) > goto L1 > >cc0 = compare (Reg, Num) >if (cc0 > 0) > goto L2 > > The second comparison

Re: [Patch,AVR]: Fix PR49903

2011-08-13 Thread Hans-Peter Nilsson
On Sat, 13 Aug 2011, Georg-Johann Lay wrote: > Hans-Peter Nilsson schrieb: > > A glance at AVR makes me think this should already be handled by > > the NOTICE_UPDATE_CC machinery. Any analysis why this doesn't > > happen? With the same test-case (at -Os) I don't

Re: Allow match_test to be used for .md attribute tests

2011-08-13 Thread Hans-Peter Nilsson
On Sat, 13 Aug 2011, Richard Sandiford wrote: > If the patch is OK, I'd like to make corresponding changes to each port's > .md files. Are they simple enough to count as obvious, or should I get > persmission for each one? Preapproved for CRIS and MMIX. brgds, H-P

Fix spurious match testsuite regressions from "[PATCH, middle end]: Introduce BUILT_IN_I{CEIL_FLOOR_ROUND_RINT} FP-to-int conversion functions"

2011-08-14 Thread Hans-Peter Nilsson
This patch: > 2011-08-11 Uros Bizjak > > * builtins.def (BUILT_IN_ICEIL{,F,L}, BUILT_IN_IFLOOR{,F,L}, > BUILT_IN_IRINT{,F,L}, BUILT_IN_IROUND{,F,L}: New builtin definitions. > * convert.c (convert_to_integer): Convert to BUILT_IN_ICEIL, > BUILT_IN_IFLOOR, BUILT_IN_IRINT

Re: Fix spurious match testsuite regressions from "[PATCH, middle end]: Introduce BUILT_IN_I{CEIL_FLOOR_ROUND_RINT} FP-to-int conversion functions"

2011-08-15 Thread Hans-Peter Nilsson
> Date: Mon, 15 Aug 2011 10:43:35 +0200 (CEST) > From: Richard Guenther > On Mon, 15 Aug 2011, Hans-Peter Nilsson wrote: > > So, ok as is? > > If not, would you preapprove tree-dumping decl_uids only at a > > higher dump verbosity level? > > Ok. Yes, definitely

Committed: fix cris-elf fallout from libgcc move

2011-11-03 Thread Hans-Peter Nilsson
Committed after testing cross to cris-elf and crisv32-elf; for the former back to the two regressions before the recent libgcc move. Ironically, the *reference* in the quoted failure: > complex-1.c:(.text+0x9e): undefined reference to `__nesf2' should not have been there in the first place, as the

ping*2: [RFA:] testsuite infrastructure for options implied by dg-final methods

2011-11-04 Thread Hans-Peter Nilsson
Ping again, CC:ing testsuite maintainers. Honza thought this was a good idea, if that helps. > From: Hans-Peter Nilsson > Date: Fri, 28 Oct 2011 16:34:07 +0200 > Subject changed from '[RFA:] fix breakage with "Update testsuite > to run with slim LTO"' exce

Re: ping*2: [RFA:] testsuite infrastructure for options implied by dg-final methods

2011-11-04 Thread Hans-Peter Nilsson
> From: Mike Stump > Date: Fri, 4 Nov 2011 17:53:05 +0100 > On Nov 4, 2011, at 6:47 AM, Hans-Peter Nilsson > wrote: > > Ping again, CC:ing testsuite maintainers. > > With the number of qualified individuals commenting in the > thread, I was going to stay out of it.

Re: ping*2: [RFA:] testsuite infrastructure for options implied by dg-final methods

2011-11-04 Thread Hans-Peter Nilsson
> From: Mike Stump > Date: Fri, 4 Nov 2011 18:54:22 +0100 > On Nov 4, 2011, at 10:41 AM, Hans-Peter Nilsson wrote: > > I'll wait a few days. > > No need to wait. :-) If someone finds a way and is > motivated, they will fix this and the other instances. :-

Re: [CRIS] Convert CRIS to constraints.md

2011-11-04 Thread Hans-Peter Nilsson
> From: Anatoly Sokolov > Date: Wed, 2 Nov 2011 20:37:12 +0100 > Comments? OK to install? > > * config/cris/constraints.md: New file. Whee! > * config/cris/cris.h (REG_CLASS_FROM_LETTER, CONSTRAINT_LEN, > CRIS_CONST_OK_FOR_LETTER_P, CONST_OK_FOR_CONSTRAINT_P, >

Re: cxx-mem-model merge [6 of 9] - libstdc++-v3

2011-11-06 Thread Hans-Peter Nilsson
> From: Andrew MacLeod > Date: Fri, 4 Nov 2011 00:50:47 +0100 > These are the changes to libstdc++ to make use of the new atomics. I > changed the files to use the new atomics, and bkoz did a shuffling of > the include file layout to better suit the new c++ approach. > > previously, libstdc++ p

Re: cxx-mem-model merge [6 of 9] - libstdc++-v3

2011-11-07 Thread Hans-Peter Nilsson
> From: Andrew MacLeod > Date: Mon, 7 Nov 2011 05:25:15 +0100 > On 11/06/2011 07:38 PM, Hans-Peter Nilsson wrote: > > > > This (formally a change in the range 181027:181034) got me three > > libstdc++ regressions for cris-elf, which has no "atomic" > >

Re: cxx-mem-model merge [6 of 9] - libstdc++-v3

2011-11-07 Thread Hans-Peter Nilsson
> From: Andrew MacLeod > Date: Mon, 7 Nov 2011 15:44:47 +0100 > Actually, this target has no lock free support whatsoever? ie, no > compare_and_swap instruction, nor an implementation of > sync_lock_test_and_set and sync_lock_release? In CRIS versions where such support would make sense: of c

Re: cxx-mem-model merge [6 of 9] - libstdc++-v3

2011-11-07 Thread Hans-Peter Nilsson
> From: "Joseph S. Myers" > Date: Mon, 7 Nov 2011 17:24:04 +0100 > On Mon, 7 Nov 2011, Andrew MacLeod wrote: > > > Actually, this target has no lock free support whatsoever? ie, no > > compare_and_swap instruction, nor an implementation of > > sync_lock_test_and_set > > and sync_lock_release?

Re: cxx-mem-model merge [6 of 9] - libstdc++-v3

2011-11-07 Thread Hans-Peter Nilsson
> From: Andrew MacLeod > Date: Mon, 7 Nov 2011 19:08:26 +0100 > So, what DO we do if there is no basic level of atomic > support... I just realized I may be feeding you an inconsistent configuration, see the atomicity stuff in libstdc++-v3/config/cpu/cris. Is that just obsolete and unused now o

Re: cxx-mem-model merge [6 of 9] - libstdc++-v3

2011-11-08 Thread Hans-Peter Nilsson
> From: Andrew MacLeod > Date: Mon, 7 Nov 2011 15:44:47 +0100 > >> On 11/06/2011 07:38 PM, Hans-Peter Nilsson wrote: > >>> This (formally a change in the range 181027:181034) got me three > >>> libstdc++ regressions for cris-elf, > >> yes, I ha

Re: PowerPC shrink-wrap support 3 of 3

2011-11-09 Thread Hans-Peter Nilsson
> From: Alan Modra > Date: Tue, 1 Nov 2011 16:33:40 +0100 > On Tue, Nov 01, 2011 at 12:57:22AM +1030, Alan Modra wrote: > * function.c (bb_active_p): Delete. > (dup_block_and_redirect, active_insn_between): New functions. > (convert_jumps_to_returns, emit_return_for_exit)

Re: [CRIS] Hookize FUNCTION_VALUE_REGNO_P

2011-11-10 Thread Hans-Peter Nilsson
> From: Anatoly Sokolov > Date: Wed, 9 Nov 2011 22:42:53 +0100 > This patch removes obsolete FUNCTION_VALUE_REGNO_P macro from CRIS back end > in the GCC and introduces equivalent TARGET_FUNCTION_VALUE_REGNO_P target > hook. > > Regression tested on cris-axis-elf. > > OK to install? Pl

Revert "PowerPC shrink-wrap support 3 of 3"

2011-11-10 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Wed, 9 Nov 2011 09:55:59 +0100 > > From: Alan Modra > > Date: Tue, 1 Nov 2011 16:33:40 +0100 > > > On Tue, Nov 01, 2011 at 12:57:22AM +1030, Alan Modra wrote: > > > * function.c (bb_active_p): Delete.

Re: Revert "PowerPC shrink-wrap support 3 of 3"

2011-11-10 Thread Hans-Peter Nilsson
> From: Richard Guenther > Date: Thu, 10 Nov 2011 12:22:56 +0100 > On Thu, Nov 10, 2011 at 11:38 AM, Hans-Peter Nilsson > wrote: > >> From: Hans-Peter Nilsson > >> Date: Wed, 9 Nov 2011 09:55:59 +0100 > > > >> > From: Alan Modra > >>

Re: Revert "PowerPC shrink-wrap support 3 of 3"

2011-11-10 Thread Hans-Peter Nilsson
> From: Bernd Schmidt > Date: Thu, 10 Nov 2011 14:29:04 +0100 > HP, can you run full tests? Cross-test to cris-elf in progress. Thanks! brgds, H-P

Re: Revert "PowerPC shrink-wrap support 3 of 3"

2011-11-10 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Thu, 10 Nov 2011 15:12:54 +0100 > > From: Bernd Schmidt > > Date: Thu, 10 Nov 2011 14:29:04 +0100 > > > HP, can you run full tests? > > Cross-test to cris-elf in progress. > Thanks! Works, no regressions compared to b

Re: [PATCH] pr51038 atomic_flag on targets with no atomic support.

2011-11-10 Thread Hans-Peter Nilsson
> From: Andrew MacLeod > Date: Thu, 10 Nov 2011 17:52:44 +0100 > On 11/10/2011 11:48 AM, Andrew MacLeod wrote: > > Justa minute > > > > Andrew > doh. sorry about that Test cross to cris-elf in progress for your second take (at r181254 + Bernd's patch to unbreak the tree for arm-linux-gnueabi an

Re: [PATCH] pr51038 atomic_flag on targets with no atomic support.

2011-11-10 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Thu, 10 Nov 2011 19:06:26 +0100 > > From: Andrew MacLeod > > Date: Thu, 10 Nov 2011 17:52:44 +0100 > > On 11/10/2011 11:48 AM, Andrew MacLeod wrote: > > > Justa minute > > > > > > Andrew > > doh. sor

Re: cxx-mem-model merge [6 of 9] - libstdc++-v3

2011-11-11 Thread Hans-Peter Nilsson
> From: Benjamin Kosnik > Date: Fri, 11 Nov 2011 06:43:29 +0100 > So, all: > > config/cpu/*/atomicity.h And config/cpu/*/atomic_word.h presumably? > Should go. I'll look in to peeling off this cruft sharpish. brgds, H-P

Re: cxx-mem-model merge [6 of 9] - libstdc++-v3

2011-11-11 Thread Hans-Peter Nilsson
> From: Andrew MacLeod > Date: Fri, 11 Nov 2011 18:45:11 +0100 > On 11/11/2011 12:43 AM, Benjamin Kosnik wrote: > I think there is also an argument for single threaded-ness vs multi > threaded. If there is no atomic support and its single threaded, we > don't really need the lock... and I'm no

Re: Revert "PowerPC shrink-wrap support 3 of 3"

2011-11-11 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Thu, 10 Nov 2011 18:52:39 +0100 > > From: Hans-Peter Nilsson > > Date: Thu, 10 Nov 2011 15:12:54 +0100 > > > > From: Bernd Schmidt > > > Date: Thu, 10 Nov 2011 14:29:04 +0100 > > > > > HP, can you run f

CFG review needed for fix of "PowerPC shrink-wrap support 3 of 3"

2011-11-14 Thread Hans-Peter Nilsson
> From: Bernd Schmidt > Date: Mon, 14 Nov 2011 10:51:56 +0100 > On 11/11/11 20:13, Hans-Peter Nilsson wrote: > > AFAICT, your patch has got sufficiently testing now (on three > > targets to boot) to be considered safe to check in. Or is > > something amiss? > >

Re: CFG review needed for fix of "PowerPC shrink-wrap support 3 of 3"

2011-11-14 Thread Hans-Peter Nilsson
> From: Richard Henderson > Date: Mon, 14 Nov 2011 18:48:03 +0100 > On 11/14/2011 04:10 AM, Hans-Peter Nilsson wrote: > > Looks like all we need is a positive review of > > <http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01409.html> and a > > ChangeLog entry

Re: CFG review needed for fix of "PowerPC shrink-wrap support 3 of 3"

2011-11-14 Thread Hans-Peter Nilsson
> From: Alan Modra > Date: Mon, 14 Nov 2011 22:56:48 +0100 > I haven't really looked into what Bernd's fix does. I know this one > fixes what I broke.. Hm... Oh well, I'm trusting RTH and Bernd that it fixed a real issue. Thanks for looking (and a belated thanks to RTH for the review). brgds,

Re: [CRIS] Hookize FUNCTION_VALUE_REGNO_P

2011-11-14 Thread Hans-Peter Nilsson
> From: Anatoly Sokolov > Date: Wed, 9 Nov 2011 22:42:53 +0100 > Regression tested on cris-axis-elf. > > OK to install? > > * config/cris/cris.c (cris_function_value_regno_p): Make static. > (TARGET_FUNCTION_VALUE_REGNO_P): Define. > * config/cris/cris.h (FUNCTION_VA

<    1   2   3   4   5   6   7   8   9   10   >