[PATCH] Speedup df_insn_refs_verify

2017-05-22 Thread Richard Biener
When not verifying we can actually short-circuit verifying the individual chains. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2017-05-22 Richard Biener * df-scan.c (df_insn_refs_verify): Speedup when not verifying. Index: gcc/df-scan.c ==

[Ada] Add check for sys/capability.h

2017-05-22 Thread Eric Botcazou
In preparation for an upcoming improvement. Tested on x86_64-suse-linux, applied on the mainline. 2017-05-22 Eric Botcazou libada/ * configure.ac: Add check for sys/capability.h header. (have_capability): New substitution. * configure: Regenerate. * Makefile.i

Re: [PATCH] Try harder to fix recently introduced crashes in ggc_collect

2017-05-22 Thread Richard Biener
On Fri, May 19, 2017 at 7:41 PM, Dominique d'Humières wrote: > >> Le 19 mai 2017 à 19:26, Bernd Edlinger a écrit : >> >> No, unfortunately it looks like incremental does not work in this case. >> >> You can try to remove gcc/s-gtyp-input, maybe it un-breaks your >> build. However, I gave up at t

Re: Move "(A & C) == D is false when D & ~C != 0" to match.pd

2017-05-22 Thread Richard Biener
On Sat, May 20, 2017 at 8:27 PM, Marc Glisse wrote: > Hello, > > as asked, I am adding some replacement in match.pd instead of just deleting > this (redundant with CCP). It is not clear how general the match.pd version > needs to be. (for instance it could handle some casts in addition to what I >

Re: [PATCH, GCC/testsuite/ARM] Add MOVT testing for ARMv8-M Baseline

2017-05-22 Thread Thomas Preudhomme
Ping? Best regards, Thomas On 11/05/17 16:13, Thomas Preudhomme wrote: Hi, When ARMv8-M Baseline support was introduced no testcase was added for support of the MOVT instruction because GCC would always prefer a load from literal pool. With the recent work to fix -mslow-flash-data by Andre Si

[Ada] Relax restrictions on volatile components

2017-05-22 Thread Eric Botcazou
GNAT has historically enforced strong restrictions on volatile components, but this is no basis for that in the RM. Tested on x86_64-suse-linux, applied on the mainline. 2017-05-22 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict alignment for

Re: [PATCH, GCC/testsuite/ARM] Add MOVT testing for ARMv8-M Baseline

2017-05-22 Thread Kyrill Tkachov
On 22/05/17 08:48, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 11/05/17 16:13, Thomas Preudhomme wrote: Hi, When ARMv8-M Baseline support was introduced no testcase was added for support of the MOVT instruction because GCC would always prefer a load from literal pool. With the re

[Ada] Remove restriction on inlining in related units

2017-05-22 Thread Eric Botcazou
This change makes it possible for the compiler to inline into a child package a subprogram declared in a parent package, even if the parent package has a with clause for the child package in the body. It also fixes segfaults that can occur when inlining into a package a subprogram coming from an u

More of ipa-inline-analysis cleanups

2017-05-22 Thread Jan Hubicka
Hi, this is rather boring patch to turn some of inline summary manipulatotions into member functions. More work is needed on this. Bootstrapped/regtested x86_64-linux, comitted. Honza * ipa-inline-analysis.c (account_size_time): Rename to ... (inline_summary::account_size_time):

[Ada] Fix ICE on subprogram defined with null exclusion

2017-05-22 Thread Eric Botcazou
It's a regression present on the mainline and 7 branch: the compiler aborts on a package containing a declaration of a subprogram taking an access parameter with null exclusion and a reference to the Access attribute applied to this subprogram. Tested on x86_64-suse-linux, applied on the mainli

Re: [PATCH] Avoid signed overflow in num_get::_M_extract_int (PR libstdc++/67214)

2017-05-22 Thread Jonathan Wakely
On 20/05/17 15:10 +0800, Xi Ruoyao wrote: On 2017-05-19 15:38 +0100, Jonathan Wakely wrote: On 18/05/17 19:10 +0800, Xi Ruoyao wrote: > This UB has been hiding so long... Indeed! Thanks for the patch. > 2017-03-11  Xi Ruoyao   > >PR libstdc++/67214 >* include/bits/locale_facets.tcc (_M

Drop self_time from inline_summary

2017-05-22 Thread Jan Hubicka
Hi, self_time is currently write only and there is quite good reason for it (one should not care about running time of unoptimized body without context at all). Bootstrapped/regtested x86_64-linux, comitted. Honza * ipa-inline-analysis.c (inline_summary::reset): Do not reset self

[C++ PATCH] namespace pushing/popping

2017-05-22 Thread Nathan Sidwell
name-lookup.c is somewhat messy in which functions are external interfaces and which are internal workers. One impact is the conditional timekeeping code. In an attempt to clean that up, I'm trying to move the external interfaces to the end of the file and consistently name worker functions

[C++ PATCH] make eh fn nodes global trees

2017-05-22 Thread Nathan Sidwell
This patch neatens up the recent change in except.c to register GTY roots. I've made them all global trees. Whilst there I noticed except's declare_library_fn could be doing more work, rather than its callers repeat themselves. Also renamed a couple of global trees to be more mnemonic and co

[patch,avr] Simplify genmultilib.awk

2017-05-22 Thread Georg-Johann Lay
This patch simplifies genmultilib.awk so that it generates MULTILIB_REQUIRED instead of the complement, MULTILIB_EXCEPTIONS. The current awk script dates back to the days when we mapped all the > 200 devices to the mmcu core and also parts of --help=target to list all devices were generated from

Re: [patch,avr] Simplify genmultilib.awk

2017-05-22 Thread Denis Chertykov
2017-05-22 15:37 GMT+04:00 Georg-Johann Lay : > This patch simplifies genmultilib.awk so that it generates > MULTILIB_REQUIRED instead of the complement, MULTILIB_EXCEPTIONS. > > The current awk script dates back to the days when we mapped > all the > 200 devices to the mmcu core and also parts of

Re: [PTX] simplify movs

2017-05-22 Thread Nathan Sidwell
On 05/21/2017 03:35 AM, Tom de Vries wrote: On 12/02/2015 04:09 PM, Nathan Sidwell wrote: +/* Output a pattern for a move instruction. */ + +const char * +nvptx_output_mov_insn (rtx dst, rtx src) +{ src_inner uses dst_mode rather than GET_MODE (src). I'm trying to understand if that is inten

[C++ PATCH] config-lang.in

2017-05-22 Thread Nathan Sidwell
gtfiles in config-lang.in is a massive line of confusion. While very rarely modified, it's completely impossible^W^Wreally hard to tell what's changed. Committed this patch to break the line and sort it. Although sh can cope with newlines in the middle of a string, the value gets fed to mak

[DUMP PATCH]: Move fdump-translation-unit to C++ FE only

2017-05-22 Thread Nathan Sidwell
This patch moves the -fdump-translation-unit into the new langhook for registering dumps. On the way the option gets renamed to -fdump-lang-raw. Committed as obvious. nathan -- Nathan Sidwell 2017-05-22 Nathan Sidwell gcc/ * doc/invoke.texi (fdump-translation-unit): Delete documentation.

libgomp nvptx plugin: Debugging output for cuInit failure

2017-05-22 Thread Thomas Schwinge
Hi! OK for trunk? commit 7b2f06b7d2fd23b20d81fda8be6ec7453e8b3fe3 Author: Thomas Schwinge Date: Thu Dec 22 08:30:04 2016 +0100 libgomp nvptx plugin: Debugging output for cuInit failure libgomp/ * plugin/plugin-nvptx.c (nvptx_get_num_devices): Debugging output

Re: [PATCH] Implement non-trivial std::random_device::entropy (PR libstdc++/67578)

2017-05-22 Thread Jonathan Wakely
On 18/05/17 19:27 +0800, Xi Ruoyao wrote: This patch use ioctl to get entropy of std::random_device using /dev/random and /dev/urandom. This is a nice addition, thanks. N.B. I couldn't apply your patch, several lines had U+00A0 (i.e. NO-BREAK SPACE) characters where normal spaces should be. I

Re: [Patch] SFINAE on is_same first in variant's _Tp&& constructor

2017-05-22 Thread Jonathan Wakely
On 19/05/17 22:40 -0700, Tim Shen via libstdc++ wrote: diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant index 0e04a820d69..b9824a5182c 100644 --- a/libstdc++-v3/include/std/variant +++ b/libstdc++-v3/include/std/variant @@ -936,9 +936,9 @@ _GLIBCXX_BEGIN_NAMESPACE_

Re: [PATCH] Implement non-trivial std::random_device::entropy (PR libstdc++/67578)

2017-05-22 Thread Xi Ruoyao
On 2017-05-22 14:00 +0100, Jonathan Wakely wrote: > On 18/05/17 19:27 +0800, Xi Ruoyao wrote: > > This patch use ioctl to get entropy of std::random_device using > > /dev/random and /dev/urandom. > > This is a nice addition, thanks. > > N.B. I couldn't apply your patch, several lines had U+00A0 (

Re: [PATCH] Implement non-trivial std::random_device::entropy (PR libstdc++/67578)

2017-05-22 Thread Jonathan Wakely
On 22/05/17 21:41 +0800, Xi Ruoyao wrote: On 2017-05-22 14:00 +0100, Jonathan Wakely wrote: On 18/05/17 19:27 +0800, Xi Ruoyao wrote: > This patch use ioctl to get entropy of std::random_device using > /dev/random and /dev/urandom. This is a nice addition, thanks. N.B. I couldn't apply your pa

Re: [PATCH] Implement non-trivial std::random_device::entropy (PR libstdc++/67578)

2017-05-22 Thread Xi Ruoyao
On 2017-05-22 14:50 +0100, Jonathan Wakely wrote: > On 22/05/17 21:41 +0800, Xi Ruoyao wrote: > > On 2017-05-22 14:00 +0100, Jonathan Wakely wrote: > > > On 18/05/17 19:27 +0800, Xi Ruoyao wrote: > > > > This patch use ioctl to get entropy of std::random_device using > > > > /dev/random and /dev/ur

[PATCH] Dump function on internal errors

2017-05-22 Thread Andi Kleen
From: Andi Kleen When a verification check fails it is useful to dump the current function to the dump file, so it's easier to figure out what actually went wrong. v2: Updated version now using a hook in internal_error, and also prints the pass name and the dump file name. gcc/: 2017-05-21 An

C/C++ OpenACC: acc_pcopyin, acc_pcreate

2017-05-22 Thread Thomas Schwinge
Hi! In , we currently describe acc_pcopyin, acc_pcreate as "old names", but they're not "old" but really "alternative names", with the intention to provide them at symbol level, not via "#define"s. OK for trunk? commit 89c6599cc343a2f3b087caf9cb47c2c42bb02074 Author: Thomas Schwinge Date: Wed

[PATCH v2] Implement non-trivial std::random_device::entropy (PR libstdc++/67578)

2017-05-22 Thread Xi Ruoyao
On 2017-05-22Mon的 14:50 +0100, Jonathan Wakely wrote: > On 22/05/17 21:41 +0800, Xi Ruoyao wrote: > > On 2017-05-22 14:00 +0100, Jonathan Wakely wrote: > > > On 18/05/17 19:27 +0800, Xi Ruoyao wrote: > > > > This patch use ioctl to get entropy of std::random_device using > > > > /dev/random and /de

Translate libgomp.oacc-c-c++-common/lib-32.c into Fortran (was: C/C++ OpenACC: acc_pcopyin, acc_pcreate)

2017-05-22 Thread Thomas Schwinge
Hi! On Mon, 22 May 2017 16:26:48 +0200, I wrote: > C/C++ OpenACC: acc_pcopyin, acc_pcreate > libgomp/ > [...] > * testsuite/libgomp.oacc-c-c++-common/lib-38.c: Remove, merging > its content into... > * testsuite/libgomp.oacc-c-c++-co

Re: Implementing OpenACC's Fortran module

2017-05-22 Thread Thomas Schwinge
Hi! On Thu, 13 Apr 2017 19:45:05 +0200, I wrote: > On Fri, 10 Oct 2014 12:42:06 +0200, I wrote: > > In the OpenACC Runtime Library, acc_pcopyin and acc_pcreate are to be > > aliases for acc_present_or_copyin and acc_present_or_create, > > respectively. > > > > This is implemented in openacc.f90 a

Re: [PATCH] [MSP430] PR78838: Do not add section name prefixes when section name is .lowtext

2017-05-22 Thread Jozef Lawrynowicz
On 19/05/2017 04:13, Martin Sebor wrote: On 05/18/2017 10:14 AM, Jozef Lawrynowicz wrote: A patch for this bug was originally posted here: https://gcc.gnu.org/ml/gcc-patches/2017-02/msg01054.html There were some issues with that patch which I've now fixed. The MSP430 target supports the automat

Re: [testsuite, committed, PR65941] Add and use effective target rdrand

2017-05-22 Thread Tom de Vries
On 05/11/2017 04:44 PM, Rainer Orth wrote: Hi Tom, 2017-05-01 Tom de Vries PR testsuite/65941 * lib/target-supports.exp (check_effective_target_rdrand): New proc. the new effective-target keyword needs documenting in sourcebuild.texi. Attached patch adds the missing docu

[C++ PATCH] Using directives

2017-05-22 Thread Nathan Sidwell
This is the first half of using directive cleanup. I split the current interface in two, one for namespace-level directives and one for local directives. That avoids the need for a load if 'if (namespace_level_p ())' tests in the bodies of the worker functions. I also merged and renamed do_u

[PING] [MSP430] Trunk patches required for gcc-6-branch to build for msp430

2017-05-22 Thread Jozef Lawrynowicz
Ping, original post: https://gcc.gnu.org/ml/gcc-patches/2017-03/msg01560.html --- For the msp430-elf target, the gcc-6-branch fails to build when configured to enable C++ support. The gcc-5-branch successfully builds with C++ support. Backporting r244727 and r243310 to the gcc-6-branch fixes

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-22 Thread Pedro Alves
On 05/20/2017 01:38 AM, DJ Delorie wrote: > > Pedro Alves writes: >> Ah, yeah. AFAICS, all the declaration checks in libiberty.h are >> HAVE_DECL checks. This suggests to me that this declaration guard >> should be HAVE_DECL too [1]. > > Except the ones in the $funcs list, which includes str

Re: [PATCH] Try harder to fix recently introduced crashes in ggc_collect

2017-05-22 Thread Martin Sebor
On 05/19/2017 11:26 AM, Bernd Edlinger wrote: On 05/19/17 19:05, Dominique d'Humières wrote: Hi Bernd, Your patches are causing troubles when I try to do "incremental updates »: After revision r248290 it fails with ../../work/gcc/cp/init.c:4916:10: fatal error: gt-cp-init.h: No such file or

Re: [RFC, testsuite] Add dg-save-linenr

2017-05-22 Thread Tom de Vries
On 05/16/2017 03:12 PM, Rainer Orth wrote: Hi Tom, sorry for chiming in so very late: I've been on vacation and sick in between... thanks for review anyway. On 04/24/2017 05:20 PM, David Malcolm wrote: On Sat, 2017-04-22 at 19:49 +0200, Tom de Vries wrote: Hi, there are currently two typ

Re: [Patch, Fortran, OOP] PR 80766: [7/8 Regression] ICE with type-bound procedure returning an array

2017-05-22 Thread Janus Weil
2017-05-21 23:56 GMT+02:00 Jerry DeLisle : > On 05/21/2017 09:14 AM, Janus Weil wrote: >> >> Hi all, >> >> the attached patch fixes an ICE-on-valid regression by making sure >> that the relevant vtype symbol is resolved properly (for further >> discussion see the PR). >> >> The patch regtests clean

Re: [PATCH GCC8][31/33]Set range information for niter bound of vectorized loop

2017-05-22 Thread Bin.Cheng
On Fri, May 19, 2017 at 1:51 PM, Richard Biener wrote: > On Mon, May 15, 2017 at 5:58 PM, Bin.Cheng wrote: >> On Thu, May 11, 2017 at 12:02 PM, Richard Biener >> wrote: >>> On Tue, Apr 18, 2017 at 12:54 PM, Bin Cheng wrote Hi, Based on vect_peeling algorithm, we know for sure that vec

OpenACC 1.0 compatibility: acc_async_wait, acc_async_wait_all

2017-05-22 Thread Thomas Schwinge
Hi! For OpenACC 1.0 compatibility, we need to provide the aliases acc_async_wait, and acc_async_wait_all for acc_wait, and acc_wait_all, respectively. OK for trunk? commit 0f8302913db6d2c23804a3463c51a47e623e76b2 Author: Thomas Schwinge Date: Mon May 22 19:22:24 2017 +0200 OpenACC 1.0 co

Re: MinGW compilation warnings in libiberty's include/environ.h

2017-05-22 Thread Pedro Alves
On 05/20/2017 02:27 AM, DJ Delorie wrote: > > Pedro Alves writes: >> That sounds to me like the root issue that should be fixed, >> so that these fallback definitions don't come into into play at all. >> I.e., why isn't HAVE_ENVIRON_DECL defined on mingw when >> setenv.o is built? Sounds like a

Re: [Patch] SFINAE on is_same first in variant's _Tp&& constructor

2017-05-22 Thread Tim Shen via gcc-patches
On Mon, May 22, 2017 at 6:21 AM, Jonathan Wakely wrote: > On 19/05/17 22:40 -0700, Tim Shen via libstdc++ wrote: >> >> diff --git a/libstdc++-v3/include/std/variant >> b/libstdc++-v3/include/std/variant >> index 0e04a820d69..b9824a5182c 100644 >> --- a/libstdc++-v3/include/std/variant >> +++ b/lib

Re: [Patch] SFINAE on is_same first in variant's _Tp&& constructor

2017-05-22 Thread Tim Shen via gcc-patches
On Mon, May 22, 2017 at 11:05 AM, Tim Shen wrote: > On Mon, May 22, 2017 at 6:21 AM, Jonathan Wakely wrote: > I suggest to cc a front-end person (Jason?) to take a look, as I > suggested in the bug, and the example: https://godbolt.org/g/AxUv16. See more discussion in pr80737. Basically in the g

Re: [PATCH] Try harder to fix recently introduced crashes in ggc_collect

2017-05-22 Thread Jason Merrill
On Mon, May 22, 2017 at 12:28 PM, Martin Sebor wrote: > On 05/19/2017 11:26 AM, Bernd Edlinger wrote: >> >> On 05/19/17 19:05, Dominique d'Humières wrote: >>> >>> Hi Bernd, >>> >>> Your patches are causing troubles when I try to do "incremental updates >>> »: >>> >>> After revision r248290 it fail

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-22 Thread Bernd Edlinger
On 05/19/17 05:17, Daniel Santos wrote: > On 05/18/2017 08:37 AM, Bernd Edlinger wrote: >> On 05/17/17 04:01, Daniel Santos wrote: - if (ignore_outlined && cfun->machine->call_ms2sysv - && in_hard_reg_set_p (stub_managed_regs, DImode, regno)) -return false; + if (igno

[PATCH], PR target/80718, Improve PowerPC splat double word

2017-05-22 Thread Michael Meissner
When I was comparing spec 2006 numbers between GCC 6.3 and 7.1, there was one benchmark that was noticeably slower (milc). In looking at the code generated, the #1 hot function (mult_adj_su3_mat_vec) had some cases where automatic vectorization generated splat of double from memory. The register

[committed] Fix OpenMP array reduction handling in orphaned workshare (PR middle-end/80853)

2017-05-22 Thread Jakub Jelinek
Hi! For pointer based array sections, we are not requiring the pointer to be shared in outer context and it might be not shared (e.g. function argument or just a private pointer initialized to point to something shared etc.), which is right, but we shouldn't require it during lowering either. Thi

[committed] Fix OpenMP VLA implicit determination in task (PR middle-end/80809)

2017-05-22 Thread Jakub Jelinek
Hi! If a VLA is shared e.g. on parallel or task construct, we firstprivatize a pointer pointing to it, and add a private VLA variable that will have a DECL_VALUE_EXPR for debug info purposes. But, standardwise, the VLA is still shared on the parallel/task, it is just implementation detail what we

[committed] Fix OpenMP VLA firstprivatization on task (PR middle-end/80809)

2017-05-22 Thread Jakub Jelinek
Hi! This PR shows another bug, the computation of the size argument for GOMP_task call could include uninitialized variable uses. The problem is that the task arg_size needs to be finalized only after mwe return from omp_low_1 of the task construct, thus it is hard to gimplify it somewhere, but i

[committed] Re: C PATCH to kill c_save_expr or towards delayed folding for the C FE

2017-05-22 Thread Jakub Jelinek
Hi! On Fri, May 12, 2017 at 09:48:28PM +0200, Jakub Jelinek wrote: > On Fri, May 12, 2017 at 09:37:27PM +0200, Marek Polacek wrote: > > @@ -565,6 +564,25 @@ c_fully_fold_internal (tree expr, bool in_init, bool > > *maybe_const_operands, > > appropriate in any particular case. */ > >

Re: MinGW compilation warnings in libiberty's waitpid.c

2017-05-22 Thread DJ Delorie
Eli Zaretskii writes: > Hmm... no, this doesn't solve the problem. The expansion of AC_LIBOBJ > for waitpid is gone from the configure script, but the value of > LIBOBJS in libiberty/Makefile still includes waitpid.o. What else is > related to this? After re-reading the sources a bit, I come t

[PATCH, rs6000, committed] Fix gcc.target/powerpc/p8-vec-xl-xst.c target selector

2017-05-22 Thread Bill Schmidt
Hi, The subject test requires little endian, but the target selector doesn't specify this. This patch fixes that. Tested on BE/LE P8 systems, committed as obvious. Thanks, Bill 2017-05-22 Bill Schmidt * gcc.target/powerpc/p8-vec-xl-xst.c: Fix target string to LE-only. In

Re: [PATCH, rs6000, committed] Fix gcc.target/powerpc/p8-vec-xl-xst.c target selector

2017-05-22 Thread Joseph Myers
On Mon, 22 May 2017, Bill Schmidt wrote: > Hi, > > The subject test requires little endian, but the target selector doesn't > specify this. This patch fixes that. Tested on BE/LE P8 systems, > committed as obvious. It's not obvious; it's wrong. You can configure for a BE default while suppor

Re: [Patch] SFINAE on is_same first in variant's _Tp&& constructor

2017-05-22 Thread Tim Song
On Mon, May 22, 2017 at 9:21 AM, Jonathan Wakely wrote: > On 19/05/17 22:40 -0700, Tim Shen via libstdc++ wrote: >> >> diff --git a/libstdc++-v3/include/std/variant >> b/libstdc++-v3/include/std/variant >> index 0e04a820d69..b9824a5182c 100644 >> --- a/libstdc++-v3/include/std/variant >> +++ b/lib

Re: [Patch] SFINAE on is_same first in variant's _Tp&& constructor

2017-05-22 Thread Tim Song
On Mon, May 22, 2017 at 4:14 PM, Tim Song wrote: > assuming core issue 1227's resolution Actually, 1227 doesn't touch default template arguments :( OTOH, the paragraph dealing with default template arguments seems to be full of issues - it says "invalid type" rather than "invalid type or expressi

Re: [PATCH] Try harder to fix recently introduced crashes in ggc_collect

2017-05-22 Thread Jason Merrill
On Mon, May 22, 2017 at 2:22 PM, Jason Merrill wrote: > On Mon, May 22, 2017 at 12:28 PM, Martin Sebor wrote: >> On 05/19/2017 11:26 AM, Bernd Edlinger wrote: >>> >>> On 05/19/17 19:05, Dominique d'Humières wrote: Hi Bernd, Your patches are causing troubles when I try to do "i

Re: [PATCH, rs6000, committed] Fix gcc.target/powerpc/p8-vec-xl-xst.c target selector

2017-05-22 Thread Segher Boessenkool
On Mon, May 22, 2017 at 08:14:13PM +, Joseph Myers wrote: > > The subject test requires little endian, but the target selector doesn't > > specify this. This patch fixes that. Tested on BE/LE P8 systems, > > committed as obvious. > > It's not obvious; it's wrong. You can configure for a BE

Re: [PATCH], PR target/80718, Improve PowerPC splat double word

2017-05-22 Thread Segher Boessenkool
On Mon, May 22, 2017 at 02:32:44PM -0400, Michael Meissner wrote: > The register allocator did not use the load with splat instruction (LXVDSX) > because all of the loads were register+offset. For the scalar values that it > could load into the FPR registers, it used the normal register+offset loa

[RFC 0/5] xtensa: support dynamic configuration

2017-05-22 Thread Max Filippov
Hi Sterling, this is an RFC series that makes xtensa gcc dynamically configurable, i.e. on a platform with shared library support single toolchain binary becomes capable of building code for arbitrary xtensa configuration. At the same time it fully preserves the traditional way of configuring usin

[RFC 1/5] gcc: xtensa: allow XCHAL_* macros to be non-constant

2017-05-22 Thread Max Filippov
XCHAL_* macros from the xtensa-config.h are used in a number of places that require them to be preprocessor constants. Rewrite these places so that non-constant XCHAL_* definitions could be used there. 2017-05-22 Max Filippov gcc/ * config/xtensa/xtensa.c (xtensa_option_override): Appen

[RFC 3/5] gcc: xtensa: support dynconfig on windows

2017-05-22 Thread Max Filippov
2017-05-22 Max Filippov gcc/ * config/xtensa/xtensa-config.c (dlfcn.h, windows.h): New #include'd headers. (RTLD_LAZY): New macro definition. (dlopen, dlsym, dlclose, dlerror): New function definitions. --- gcc/config/xtensa/xtensa-config.c | 38 +

[RFC 2/5] gcc: xtensa: make configuration dynamic

2017-05-22 Thread Max Filippov
Now that XCHAL_* macros don't have to be preprocessor constants add include/xtensa-dynconfig.h that defines them as fields of a structure returned from the xtensa_get_config function. Define that structure and fill it with default parameter values specified in the include/xtensa-config.h. Define re

[RFC 4/5] gcc: xtensa: add __XCHAL_* builtins

2017-05-22 Thread Max Filippov
Provide essential XCHAL_* configuration parameters as __XCHAL_* built-in macros. This way it will be possible to use them in libgcc and libc without need to patch libgcc or libc source for the specific xtensa core configuration. 2017-05-22 Max Filippov gcc/ * config/xtensa/xtensa-config

[RFC 5/5] libgcc: xtensa: use built-in configuration

2017-05-22 Thread Max Filippov
Now that gcc provides __XCHAL_* definitions use them instead of XCHAL_* definitions from the include/xtensa-config.h. That makes libgcc dynamically configurable for the target xtensa core. 2017-05-22 Max Filippov include/ * xtensa-config-builtin.h: New File. libgcc/ * config/xt

Re: [RFC 1/5] gcc: xtensa: allow XCHAL_* macros to be non-constant

2017-05-22 Thread augustine.sterl...@gmail.com
On Mon, May 22, 2017 at 2:09 PM, Max Filippov wrote: > XCHAL_* macros from the xtensa-config.h are used in a number of places > that require them to be preprocessor constants. Rewrite these places so > that non-constant XCHAL_* definitions could be used there. This whole series of patches is goin

Re: [RFC 1/5] gcc: xtensa: allow XCHAL_* macros to be non-constant

2017-05-22 Thread Max Filippov
On Mon, May 22, 2017 at 2:30 PM, augustine.sterl...@gmail.com wrote: > On Mon, May 22, 2017 at 2:09 PM, Max Filippov wrote: >> XCHAL_* macros from the xtensa-config.h are used in a number of places >> that require them to be preprocessor constants. Rewrite these places so >> that non-constant XCH

[PING #2] [PATCH] handle enumerated types in -Wformat-overflow (PR 80397)

2017-05-22 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00547.html On 05/15/2017 09:01 PM, Martin Sebor wrote: Ping: Jeff, is this patch approved? https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00547.html On 05/08/2017 08:38 PM, Martin Sebor wrote: On 04/28/2017 12:35 PM, Jeff Law wrote: On 0

[PING][PATCH] add more detail to -Wconversion and -Woverflow (PR 80731)

2017-05-22 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2017-05/msg01428.html On 05/17/2017 06:04 PM, Martin Sebor wrote: While working on a new warning for unsafe conversion I noticed that the existing warnings that diagnose these kinds of problems are missing some useful detail. For example, given declarat