[patch,avr,installed] ad PR65296: Adjust specs to new avr-libc layout as of #44574

2015-04-17 Thread Georg-Johann Lay
...I went ahead and installed as http://gcc.gnu.org/r222179 It will be backported to 5.2 as soon as 5.1 is open for patches again (assuming RM won't approve this one for 5.1). As far as I can tell, all works fine now, even with install-paths containing spaces and LTO. Johann 2015-04-17

Re: [patch,avr,installed] ad PR65296: Adjust specs to new avr-libc layout as of #44574

2015-04-17 Thread Georg-Johann Lay
Am 04/17/2015 um 04:43 PM schrieb Denis Chertykov: 2015-04-17 17:02 GMT+03:00 Georg-Johann Lay : ...I went ahead and installed as http://gcc.gnu.org/r222179 It will be backported to 5.2 as soon as 5.1 is open for patches again (assuming RM won't approve this one for 5.1). IMHO AVR po

[patch,wwwdocs] Add gcc-5 caveats for avr.

2015-04-20 Thread Georg-Johann Lay
Hi Gerald, this is the patch against GCC-5's release notes. Okay to install? Johann Index: gcc-5/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-5/changes.html,v retrieving revision 1.109 diff -u -p -r1.109 changes.html ---

Re: [patch,wwwdocs] Add gcc-5 caveats for avr.

2015-04-20 Thread Georg-Johann Lay
Am 04/20/2015 um 03:40 PM schrieb Andi Kleen: Georg-Johann Lay writes: +http://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html";>spec file. +If the compiler is used together with AVR-LibC, this requires at +least GCC 5.2 and a version of AVR-LibC which implements

Re: [patch,wwwdocs] Add gcc-5 caveats for avr.

2015-04-21 Thread Georg-Johann Lay
Am 04/20/2015 um 09:02 PM schrieb Gerald Pfeifer: Hi Johann, On Mon, 20 Apr 2015, Georg-Johann Lay wrote: Okay to install? +The AVR port uses a new scheme to describe supported devices: +For each supported device the compiler provides a device-specific +http://gcc.gnu.org

[avr,committed]: Fix ICE with -mdeb

2014-11-17 Thread Georg-Johann Lay
-mdeb ran into a null pointer, hence applied the following fix. http://gcc.gnu.org/r217651 Johann gcc/ * config/avr/avr-log.c (avr_log_set_avr_log) [TARGET_ALL_DEBUG]: Set avr_log_details to "all". Index: avr-log.c

[patch, avr] Tidy up avr-log.c

2015-02-24 Thread Georg-Johann Lay
avr-log.c and respective macros in avr-protos.h still assume that the implementation language is C90, i.e. no variadic macros are available. This patch cleans up the code from the cumbersome old approach and uses variadic macros for avr_dump, avr_edump and avr_fdump. Ok for trunk? Johann

[patch, avr, committed]: Fix PR65196 (ice-checking)

2015-02-25 Thread Georg-Johann Lay
http://gcc.gnu.org/r220963 http://gcc.gnu.org/r220964 http://gcc.gnu.org/r220965 Applied this obvious fix for ICE with checking enabled (recog_memoized used with invalid rtx, e.g. jump_table_data). Johann PR target/65196 * config/avr/avr.c (avr_adjust_insn_length): Call recog_

[patch, avr-tiny]: Fix handling of constant addresses.

2015-02-25 Thread Georg-Johann Lay
The current avr-gcc ICEs in avr.c::tiny_valid_direct_memory_access_range because XEXP (op, 0) is used on op which are not MEM_P (e.g. REG or SUBREG). If op is MEM_P then INTVAL might be used for on RTXes which are not CONST_INT, e.g. CONST. Anyway, using such functions in insn conditions is n

Re: [patch, avr] Take 2: Fix PR64331: insn output and insn length computation rely on REG_DEAD notes.

2015-02-26 Thread Georg-Johann Lay
Am 02/23/2015 um 11:53 AM schrieb Georg-Johann Lay: This patch fixes PR64331 which produced wrong code because of outdated (too many) REG_DEAD notes. These notes are not (re)computed per default, hence do the computation by hand each time avr.c:reg_unused_after is called in a different pass

Re: [patch, avr] Take 2: Fix PR64331: insn output and insn length computation rely on REG_DEAD notes.

2015-02-28 Thread Georg-Johann Lay
Am 02/26/2015 um 11:45 PM schrieb Steven Bosscher: On Thu, Feb 26, 2015 at 8:35 PM, Georg-Johann Lay wrote: Take #2 introduces a new, avr-specific rtl pass whose sole purpose is to rectify notes. The pass is scheduled right before cfg does down (right before .*free_cfg) so that cfg and hence

Re: [patch, avr] Take 2: Fix PR64331: insn output and insn length computation rely on REG_DEAD notes.

2015-03-02 Thread Georg-Johann Lay
Am 02/28/2015 um 09:02 AM schrieb Denis Chertykov: 2015-02-27 1:45 GMT+03:00 Steven Bosscher : On Thu, Feb 26, 2015 at 8:35 PM, Georg-Johann Lay wrote: Take #2 introduces a new, avr-specific rtl pass whose sole purpose is to rectify notes. The pass is scheduled right before cfg does down

Re: [patch, avr] Take 2: Fix PR64331: insn output and insn length computation rely on REG_DEAD notes.

2015-03-02 Thread Georg-Johann Lay
Am 03/02/2015 um 05:12 PM schrieb Steven Bosscher: On Sat, Feb 28, 2015 at 5:38 PM, Georg-Johann Lay wrote: Am 02/26/2015 um 11:45 PM schrieb Steven Bosscher: On Thu, Feb 26, 2015 at 8:35 PM, Georg-Johann Lay wrote: Take #2 introduces a new, avr-specific rtl pass whose sole purpose is to

[patch,avr]: Fix various problems with specs and specs file generation.

2015-03-02 Thread Georg-Johann Lay
The new specs file generation introduces several problems. This patch - Fix build warnings - Clean up unused code and the old, now dead specs definitions. - Removes unused files and adjust build scripts / rules. - Issues with avr-libc awareness: -- Makes specs-generation aware of avr-libc (i

Re: [patch,avr]: Part2: Fix various problems with specs and specs file generation.

2015-03-09 Thread Georg-Johann Lay
Am 03/03/2015 um 02:21 PM schrieb Senthil Kumar Selvaraj: On Mon, Mar 02, 2015 at 08:40:17PM +0100, Georg-Johann Lay wrote: The new specs file generation introduces several problems. This patch - Fix build warnings - Clean up unused code and the old, now dead specs definitions. - Removes

Re: [patch,avr]: Fix various problems with specs and specs file generation.

2015-03-09 Thread Georg-Johann Lay
Am 03/03/2015 um 02:21 PM schrieb Senthil Kumar Selvaraj: On Mon, Mar 02, 2015 at 08:40:17PM +0100, Georg-Johann Lay wrote: BTW, anyone knows what -march= is good for? It allows all kinds of silly option combinations like "-march=avrtiny -mmcu=atmega8" without any complaints. II

Re: [patch,avr]: Part3 and 4: Fix various problems with specs and specs file generation.

2015-03-10 Thread Georg-Johann Lay
This is just a small addendum to the option and specs handling: - Document new avr-gcc command options - Change -march= to -mmcu= in some test cases - Add comfigure test to detect whether gas supports -mrmw and --mlink-relax. - Use result of these tests in specs generatio, i.e. omit respective

Re: [patch,avr]: Part5: Fix various problems with specs and specs file generation.

2015-03-16 Thread Georg-Johann Lay
This patch introduces a new avr specific command option '-nodevicelib' so that linking of libdev.a can be bypassed. The argument of -specs= is suffixed by %s instead of supplying the absolute path. That way -specs= works with installation path that contains spaces. avr_mct_t.library_name and

[patch, avr, applied] ad PR65296: Allow specifying the same MCU more than once.

2015-03-23 Thread Georg-Johann Lay
http://gcc.gnu.org/r221602 Applied this path so that it is allowed to specify the same -mmcu=MCU more than once. This is the easiest way to manage situation where it is hard to control the command line arguments, in particular when the compiler is called by linker plugin. Johann P

Re: [patch,avr]: Part2: Fix various problems with specs and specs file generation.

2015-04-07 Thread Georg-Johann Lay
Am 04/06/2015 um 11:54 AM schrieb Sivanupandi, Pitchumani: Hi Johann, Did you try running g++ tests? It seems xgcc is invoked to get multilibs (from gcc/testsuite/lib/g++.exp) which failed to find specs file. This is because libgloss.exp:get_multilibs (used from g++_init) runs xgcc ($compil

Re: [patch,avr]: Part2: Fix various problems with specs and specs file generation.

2015-04-08 Thread Georg-Johann Lay
Am 04/08/2015 um 10:28 AM schrieb Denis Chertykov: 2015-04-07 15:34 GMT+03:00 Georg-Johann Lay : Am 04/06/2015 um 11:54 AM schrieb Sivanupandi, Pitchumani: Hi Johann, Did you try running g++ tests? It seems xgcc is invoked to get multilibs (from gcc/testsuite/lib/g++.exp) which failed to

Re: [patch,avr]: Part2: Fix various problems with specs and specs file generation.

2015-04-09 Thread Georg-Johann Lay
Am 04/09/2015 um 12:59 PM schrieb Sivanupandi, Pitchumani: And what about the spaces problem as mentioned in http://savannah.nongnu.org/bugs/?44574 http://lists.gnu.org/archive/html/avr-libc-dev/2015-03/msg00010.html Art there plans to fix that? Yes. Will submit patch to avr-libc by next week

[patch,avr,committed]: ad PR65296: work around device-specs file + dejagnu for c++.

2015-04-09 Thread Georg-Johann Lay
Applied this patch: http://gcc.gnu.org/r221947 Johann * config/avr/driver-avr.c (avr_devicespecs_file): Don't specify a device specs file if "device-specs%s" didn't resolve to a path. Index: config/avr/driver-avr.c ==

Re: [patch,avr] Fix PR 65657 - read from __memx address space tramples arguments to function call

2015-04-16 Thread Georg-Johann Lay
Am 04/16/2015 um 08:43 AM schrieb Senthil Kumar Selvaraj: This patch fixes PR 65657. The following artifact appears to be PR63633. When cfgexpand.c expands a function call, it first figures out the registers in which the arguments will go, followed by expansion of the arguments themselves (ri

[patch, avr] Fix ICE PR64452 pushing eliminated rtxes

2015-02-17 Thread Georg-Johann Lay
Byte-wise pushing virtual regs like arg pointer migth result in patterns like (set (mem:QI (post_dec:HI (reg:HI 32 SP))) (subreg:QI (plus:HI (reg:HI 28) (const_int 17)) 0)) after elimination. Attached patch uses new pushhi1_insn to push virtuals in HImode so tha

Re: [patch, avr] Fix ICE PR64452 pushing eliminated rtxes

2015-02-18 Thread Georg-Johann Lay
Am 02/17/2015 um 03:34 PM schrieb Denis Chertykov: 2015-02-17 14:12 GMT+03:00 Georg-Johann Lay : Byte-wise pushing virtual regs like arg pointer migth result in patterns like (set (mem:QI (post_dec:HI (reg:HI 32 SP))) (subreg:QI (plus:HI (reg:HI 28

[patch, avr] Fix PR64331: insn output and insn length computation rely on REG_DEAD notes.

2015-02-23 Thread Georg-Johann Lay
This patch fixes PR64331 which produced wrong code because of outdated (too many) REG_DEAD notes. These notes are not (re)computed per default, hence do the computation by hand each time avr.c:reg_unused_after is called in a different pass. Ok to apply? Johann gcc/ PR target/64331

[patch, avr] Include stdfix-avrlibc.h in stdfix.h

2015-02-23 Thread Georg-Johann Lay
This include stdfix-avrlibc.h in the avr-gcc specific stdfix.h. Ok for trunk? Johann gcc/ * config/avr/stdfix.h [__WITH_AVRLIBC__]: Include . Index: config/avr/stdfix.h === --- config/avr/stdfix.h (revision 220854) +++ co

[patch,avr,4.9] Fix PR63633 ICEs for expanders colliding hard-regs

2014-10-28 Thread Georg-Johann Lay
Middle-end might come up with hard registers as operands for expanders which clobber respective hard regs. This patch uses freshly created pseudos for respective expander operands and emits pseudo <-> hard move insn. Ok for 4.9.2? It's not yet for trunk because avr trunk backend is currently

Re: [patch,avr,4.9] Fix PR63633 ICEs for expanders colliding hard-regs

2014-10-28 Thread Georg-Johann Lay
Am 10/28/2014 01:34 PM, schrieb Georg-Johann Lay: Middle-end might come up with hard registers as operands for expanders which clobber respective hard regs. This patch uses freshly created pseudos for respective expander operands and emits pseudo <-> hard move insn. Ok for 4.9.2?

Re: [patch,avr,4.9] Fix PR63633 ICEs for expanders colliding hard-regs

2014-10-30 Thread Georg-Johann Lay
Am 10/30/2014 07:48 AM, schrieb Denis Chertykov: Am 10/28/2014 01:34 PM, schrieb Georg-Johann Lay: Middle-end might come up with hard registers as operands for expanders which clobber respective hard regs. This patch uses freshly created pseudos for respective expander operands and emits

Re: [PATCH] Do not emit __gnu_lto_v1 symbol.

2019-07-29 Thread Georg-Johann Lay
Hi Martin. In SVN r273662 you changed a comment in avr.c from __gnu_lto_v1 to __gnu_lto_slim without changing the relevant code: /* __gnu_lto_slim is just a marker for the linker injected by toplev.c. There is no need to trigger __do_clear_bss code for them. */ if (!STR_PREFIX_P (na

Re: [PATCH] Do not emit __gnu_lto_v1 symbol.

2019-07-31 Thread Georg-Johann Lay
Martin Liška schrieb: On 7/29/19 3:46 PM, Georg-Johann Lay wrote: Hi Martin. In SVN r273662 you changed a comment in avr.c from __gnu_lto_v1 to __gnu_lto_slim without changing the relevant code: Yes. /* __gnu_lto_slim is just a marker for the linker injected by toplev.c. There is

Re: [PR57371] transform (double)i eq/ne 0 to i eq/ne 0

2016-08-03 Thread Georg-Johann Lay
On 03.08.2016 09:53, Prathamesh Kulkarni wrote: Hi, The attached patch tries to transform (double)i eq/ne 0 to i eq/ne 0 AFAIU from Joseph's comment 1 in PR, the transform should be safe with -fno-trapping-math ? What about signed zeroes? Johann Bootstrap+tested on x86_64-unknown-linux-gnu i

[patch,avr] PR 55181 work around do_store_flag producing shifts for bit extractions

2016-08-03 Thread Georg-Johann Lay
do_store_flag has hard-coded right shift for testing a bit, I found no way to let the backend direct expr.c into generating an extzv. As rectifying the middle-end is beyond by time frame, here is yet another kludge to catch the situation by means of a pattern. Also hints are welcome if I ove

[avr,RFC,patch] Add var attribute "absdata" to support LDS / STS on AVR_TINY.

2016-08-03 Thread Georg-Johann Lay
This is a proposal to support LDS / STS instructions on AVR_TINY. Currently the fact that the compile won't generate LDS / STS instructions is a major source of code bloat. The patch adds a new variable attribute so that the user can assert that address range of respective static-storage data

Re: [Patch, wwwdocs] Add caveat for AVR port

2016-08-08 Thread Georg-Johann Lay
On 08.08.2016 10:24, Senthil Kumar Selvaraj wrote: Hi, This doc patch informs the user that a specific (or higher) version of binutils is a prerequisite for the fix for a rather vexing bug (PR 71151) that was fixed for 6.2. I've added it to the Caveats section; is there a better place?

Re: [avr,RFC,patch] Add var attribute "absdata" to support LDS / STS on AVR_TINY.

2016-08-08 Thread Georg-Johann Lay
On 08.08.2016 07:10, Sandra Loosemore wrote: On 08/03/2016 10:17 AM, Georg-Johann Lay wrote: Index: doc/extend.texi === --- doc/extend.texi(revision 238983) +++ doc/extend.texi(working copy) @@ -5957,6 +5957,25 @@ memory

[backported,v5,v6] Fix PR71976 in combine.c:get_last_value()

2016-08-08 Thread Georg-Johann Lay
_last_value_validate (&value, rsp->last_set, rsp->last_set_label, 0)) return value; On 29.07.2016 11:19, Segher Boessenkool wrote: On Fri, Jul 29, 2016 at 10:56:22AM +0200, Georg-Johann Lay wrote: The issue with wrong-code bug PR71976 is that combine.c:get_last_value was called for a

Re: [Patch, avr] Fix PR 71151

2016-06-03 Thread Georg-Johann Lay
Senthil Kumar Selvaraj schrieb: Hi, This patch fixes PR 71151 by eliminating the TARGET_ASM_FUNCTION_RODATA_SECTION hook and setting JUMP_TABLES_IN_TEXT_SECTION to 1. As described in the bugzilla entry, this hook assumed it will get called only for jumptable rodata for functions. This

Re: [Patch, avr] Fix PR 71151

2016-06-04 Thread Georg-Johann Lay
Senthil Kumar Selvaraj schrieb: Hi, This patch fixes PR 71151 by eliminating the TARGET_ASM_FUNCTION_RODATA_SECTION hook and setting JUMP_TABLES_IN_TEXT_SECTION to 1. As described in the bugzilla entry, this hook assumed it will get called only for jumptable rodata for functions. This

Re: [patch, avr] Fix PR67353

2016-06-10 Thread Georg-Johann Lay
Pitchumani Sivanupandi schrieb: Hi, This patch introduces new flags for warning 'misspelled interrupt/ signal handler'. Flag -Wmisspelled-isr is enabled by default and it will warn user if the interrupt/ signal handler is without '__vector' prefix. Flag -Wno-misspelled-isr shall be enabled by us

Re: [patch, avr] Fix PR67353

2016-06-13 Thread Georg-Johann Lay
Pitchumani Sivanupandi schrieb: Hi, This patch introduces new flags for warning 'misspelled interrupt/ signal handler'. Flag -Wmisspelled-isr is enabled by default and it will warn user if the interrupt/ signal handler is without '__vector' prefix. Flag -Wno-misspelled-isr shall be enabled by us

[patch,avr] ad PR71103: also handle QImode SUBREGs of CONST

2016-06-15 Thread Georg-Johann Lay
This patch handles the cases when subreg:QI of a CONST or LABEL_REF is to be moved to a QImode register. The original patch only handled SYMBOL_REFs. OK for trunk and backport? Johann -- gcc/ PR target/71103 * config/avr/avr.md (movqi): Handle loading subreg:qi (const). gc

Re: [Patch, avr] Fix PR 71151

2016-06-17 Thread Georg-Johann Lay
Senthil Kumar Selvaraj schrieb: Hi, This patch fixes PR 71151 by eliminating the TARGET_ASM_FUNCTION_RODATA_SECTION hook and setting JUMP_TABLES_IN_TEXT_SECTION to 1. As described in the bugzilla entry, this hook assumed it will get called only for jumptable rodata for functions. This

[avr, 6, 5, 4.9, committed] Backported PR target/71103

2016-06-20 Thread Georg-Johann Lay
Applied backports to: v6: https://gcc.gnu.org/r237591 v5: https://gcc.gnu.org/r237593 v4.9: https://gcc.gnu.org/r237594 Johann gcc/ Backport from 2016-06-20 trunk r237589, r236558. PR target/71103 * config/avr/avr.md (movqi): Handle loading subreg:qi (const, sy

[patch, avr] Fix PR30417: Wrap -Tdata into %{!Tdata:...}.

2016-06-20 Thread Georg-Johann Lay
This patch allows to specify -Tdata and -Ttext on the command line for MCUs where the specs file sets these options. For -mmcu=atmega88 for example, the respective specs reads: *link_data_start: -Tdata 0x800100 and the patch changes this to *link_data_start: %{!Tdata:-Tdata 0

Re: [patch, avr,wwwdocs] PR 58655

2016-06-21 Thread Georg-Johann Lay
Pitchumani Sivanupandi schrieb: Attached patches add documentation for -mfract-convert-truncate option and add that info to release notes (gcc-4.9 changes). If OK, could someone commit please? I do not have commit access. Regards, Pitchumani gcc/ChangeLog 2016-06-21 Pitchumani Sivanupandi

[patch,testsuite,avr]: Support dg-require-effective-target avr_3byte_pc (and use it with PR71151 tests).

2016-06-22 Thread Georg-Johann Lay
Some tests for PR71151 assume that the target MCU has a 3-byte PC. The tests are failing because the simulator (avrtest) rejects to load the respective executables if .text exceeds 128KiB, e.g. for -mmcu=atmega128 which has only flash of 128KiB and only a 2-byte PC. Hence the tests have to be

Re: [patch,testsuite,avr]: Support dg-require-effective-target avr_3byte_pc (and use it with PR71151 tests).

2016-06-22 Thread Georg-Johann Lay
Jeff Law schrieb: On 06/22/2016 08:21 AM, Georg-Johann Lay wrote: Some tests for PR71151 assume that the target MCU has a 3-byte PC. The tests are failing because the simulator (avrtest) rejects to load the respective executables if .text exceeds 128KiB, e.g. for -mmcu=atmega128 which has only

Re: [Patch, avr] Fix PR 71151

2016-06-22 Thread Georg-Johann Lay
Senthil Kumar Selvaraj schrieb: Senthil Kumar Selvaraj writes: Georg-Johann Lay writes: Senthil Kumar Selvaraj schrieb: Hi, [set JUMP_TABLES_IN_TEXT_SECTION to 1] I added tests that use linker relaxation and discovered a relaxation bug in binutils 2.26 (and later) that messes up symbol

Re: [patch,avr]: ad PR71151: Make test cases pass on smaller targets.

2016-06-23 Thread Georg-Johann Lay
On 22.06.2016 19:06, Mike Stump wrote: On Jun 22, 2016, at 7:21 AM, Georg-Johann Lay wrote: Some tests for PR71151 assume that the target MCU has a 3-byte PC. The tests are failing because the simulator (avrtest) rejects to load the respective executables if .text exceeds 128KiB, e.g. for

Re: [Patch, avr] Fix PR 71151

2016-06-23 Thread Georg-Johann Lay
Senthil Kumar Selvaraj schrieb: Georg-Johann Lay writes: Senthil Kumar Selvaraj schrieb: Senthil Kumar Selvaraj writes: Georg-Johann Lay writes: Senthil Kumar Selvaraj schrieb: Hi, [set JUMP_TABLES_IN_TEXT_SECTION to 1] I added tests that use linker relaxation and discovered a

Re: [patch,avr] Add support for devices with flash accessible by LD.

2017-07-05 Thread Georg-Johann Lay
On 04.07.2017 20:11, Richard Sandiford wrote: Georg-Johann Lay writes: Hi, This patch adds support for devices that can access flash memory by LD* instructions, hence there is no need to put .rodata in RAM. The default linker script for the new multilib versions already supports this feature

Re: [patch,avr] Add support for devices with flash accessible by LD.

2017-07-05 Thread Georg-Johann Lay
On 05.07.2017 10:17, Georg-Johann Lay wrote: On 04.07.2017 20:11, Richard Sandiford wrote: Georg-Johann Lay writes: Hi, This patch adds support for devices that can access flash memory by LD* instructions, hence there is no need to put .rodata in RAM. The default linker script for the new

Re: [patch,avr][Ping #3] PR81075: Move jump-tables out of .text

2017-07-05 Thread Georg-Johann Lay
Ping #3 http://gcc.gnu.org/ml/gcc-patches/2017-06/msg01029.html As avr maintainers are off-line, would a global maintainer have a look at this? Thanks, Johann On 27.06.2017 12:01, Georg-Johann Lay wrote: Ping #2 http://gcc.gnu.org/ml/gcc-patches/2017-06/msg01029.html On 14.06.2017 14:03

[patch,avr,committed] Fix PR81305

2017-07-05 Thread Georg-Johann Lay
Hi, Instruction selection must not depend on "optimize" because LDS / STS range might not cover range of IN / OUT. This lead to wrong ISR code for avrtiny. Applied as obvious. Also added some test coverage for ISRs which we didn't have at all to date. Johann gcc/ PR target/81305

[patch,avr,committed] Ad PR81072: Be less aggressive when testing for Binutils PR21472.

2017-07-05 Thread Georg-Johann Lay
Well, it's all only avr stuff... and I decided that it's obvious :-) Applied the addendum to PR81072 / trunk r249124 from below. Sorry for the inconvenience. Johann On 05.07.2017 12:30, Richard Sandiford wrote: Georg-Johann Lay writes: On 05.07.2017 10:17, Georg-Johann Lay

[patch,avr] Fix PR20296 / PR81268: Better ISR prologues / epilogues

2017-07-07 Thread Georg-Johann Lay
Hi, this patch addresses a very old issue, the non-optimal generation of ISR prologues and epilogues. As GAS now provides the __gcc_isr pseudo instruction to overcome some problems, see https://sourceware.org/bugzilla/show_bug.cgi?id=21683 this can now be used to address PR20296. This patch

Re: [patch,avr] Fix PR20296 / PR81268: Better ISR prologues / epilogues

2017-07-10 Thread Georg-Johann Lay
On 08.07.2017 06:58, Denis Chertykov wrote: 2017-07-07 18:31 GMT+04:00 Georg-Johann Lay : Hi, this patch addresses a very old issue, the non-optimal generation of ISR prologues and epilogues. As GAS now provides the __gcc_isr pseudo instruction to overcome some problems, see https

[ping #4][patch] Fix PR80929: Realistic PARALLEL cost in seq_cost.

2017-07-11 Thread Georg-Johann Lay
Ping #4 This small addition improves costs of PARALLELs in rtlanal.c:seq_cost(). Up to now, these costs are assumed to be 1 which gives gross inexact costs for, e.g. divmod which is represented as PARALLEL. The patch just forwards cost computation to insn_rtx_cost which uses the cost of the 1st

[patch,committed] Remove external links that texinfo would shred.

2017-07-11 Thread Georg-Johann Lay
texinfo is shredding external links. Applied the following patch to prevent uses from 404 not found. Johann gcc/ * doc/extend.texi (AVR Function Attributes): Remove weblink to Binutils doc as TEXI will mess them up. * doc/invoke.texi (AVR Options): Same here. Index: do

[patch,avr] PR81407: Error if progmem variable needs constructing.

2017-07-12 Thread Georg-Johann Lay
Hi, if the C++ front-end decides that something will need constructing, it will silently put the stuff into .rodata so that according pgm_read_xxx will read garbage from .progmem. As proposed by Jason, this patch diagnoses such situations. Ok to commit? Johann PR target/81407 *

Re: [ping #4][patch] Fix PR80929: Realistic PARALLEL cost in seq_cost.

2017-07-12 Thread Georg-Johann Lay
On 12.07.2017 14:11, Segher Boessenkool wrote: Hi, On Tue, Jul 11, 2017 at 10:47:27AM +0200, Georg-Johann Lay wrote: This small addition improves costs of PARALLELs in rtlanal.c:seq_cost(). Up to now, these costs are assumed to be 1 which gives gross inexact costs for, e.g. divmod which is

[patch,avr,committed] Fix PR79883: Quote key words in diagnostics.

2017-07-12 Thread Georg-Johann Lay
This patchlet fixes a complaint from translation projects because some non-quoted key words like "interrupt" or "signal" caused problems there. Enclosed the sequence in "WITH_AVRLIBC" because that is only relevant when AVR-LibC start-up code is in use. Also warns for functions named "ISR", "SIGN

Re: [ping #4][patch] Fix PR80929: Realistic PARALLEL cost in seq_cost.

2017-07-13 Thread Georg-Johann Lay
On 12.07.2017 21:36, Segher Boessenkool wrote: On Wed, Jul 12, 2017 at 03:30:00PM +0200, Georg-Johann Lay wrote: On 12.07.2017 14:11, Segher Boessenkool wrote: On Tue, Jul 11, 2017 at 10:47:27AM +0200, Georg-Johann Lay wrote: This small addition improves costs of PARALLELs in

[patch,avr] Fix PR80929, work around middle-end PR81444

2017-07-14 Thread Georg-Johann Lay
Hi, this patch restores some of the divmod handling. It addresses two issues: 1) rtx_costs might be called with code = LSHIFTRT for a mul_highpart. This is the case when outer_code = TRUNCATE. This patch uses a new function to compute the costs for that case (also used for code = TRUNCATE).

[patch,contrib,committed] Remove dead avr-tables.opt from files_and_dependencies.

2017-07-17 Thread Georg-Johann Lay
https://gcc.gnu.org/r250263 This is a small clean-up that removed a dependency for a file which no more exists (avr-tables.opt). Committed as obvious. Johann * gcc_update (files_and_dependencies) [gcc/config/avr/avr-tables.opt]: Remove dead entry. Index: gcc_update ==

[patch,avr,committed] Remove dead avr_inform_devices

2017-07-17 Thread Georg-Johann Lay
https://gcc.gnu.org/r250264 Applied this patch which removes stuff dead since https://gcc.gnu.org/r239246 Committed as obvious. Johann Remove stuff dead since r239246. * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto. * config/avr/avr-devices.c (mcu_nam

[patch,avr.applied] Fix PR81473: Don't use INT8_MIN etc.

2017-07-18 Thread Georg-Johann Lay
https://gcc.gnu.org/r250301 https://gcc.gnu.org/r250302 Removed usage of INT8_MIN and friends as they are not available in older C++ which leads to build failure. Applied to trunk and v7 branch. Johann gcc/ Backport from 2017-07-18 trunk r250301. PR target/81473 * conf

[patch,lto] Fix PR81487

2017-07-20 Thread Georg-Johann Lay
Hi, this patch fixes some minor problems in lto-plugin: Some older mingw32 host environments have broken asprintf. As far as I can tell, the problem is that the mingw asprintf implementation calls _vsnprintf (NULL, 0, ...) which always returns -1 as length on the host. The patch fixes this by us

[patch,avr,doc] Re-layout "AVR Built-in Functions"

2017-07-20 Thread Georg-Johann Lay
Hi, this is a re-layout of mentioned section in extend.texi. Purpose is to have a unified layout where the explanation has a farther indentation than the item (function) to be explained. Ok for trunk? Johann gcc/ * doc/invoke.texi (AVR Built-in Functions): Re-layout section. Index: doc

Re: [patch,lto] Fix PR81487

2017-07-21 Thread Georg-Johann Lay
On 21.07.2017 13:41, Richard Biener wrote: On Thu, Jul 20, 2017 at 3:18 PM, Georg-Johann Lay wrote: Hi, this patch fixes some minor problems in lto-plugin: Some older mingw32 host environments have broken asprintf. As far as I can tell, the problem is that the mingw asprintf implementation

[patch] Ad PR81487: More asprintf -> xasprintf replacements

2017-07-24 Thread Georg-Johann Lay
Hi, as proposed in https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01294.html this patch does more asprintf -> xasprintf replacements. Bootstrapped + reg-tested on x86_64-linux. Ok for trunk? Johann gcc/ PR 81487 * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.

[patch,avr,committed] avr-log.c: Print NULL_TREE as ""

2017-07-25 Thread Georg-Johann Lay
https://gcc.gnu.org/r250495 Committed $subject as obvious. Johann gcc/ * config/avr/avr-log.c (avr_log_vadump) ['T']: Print NULL-TREE. Index: config/avr/avr-log.c === --- config/avr/avr-log.c(revision 250494) +++ c

[patch,committed,v7] Backport PR75964

2017-07-25 Thread Georg-Johann Lay
Backported to v7: https://gcc.gnu.org/r250509 Johann gcc/ Backport from 2017-05-06 trunk r247719. PR rtl-optimization/75964 * simplify-rtx.c (simplify_const_relational_operation): Remove invalid handling of comparisons of integer ABS. gcc/testsuite/ Back

[patch,committed,v6] Backport PR75964

2017-07-25 Thread Georg-Johann Lay
...also backported to gcc-6-branch: https://gcc.gnu.org/r250511 Johann gcc/ Backport from 2017-05-06 trunk r247719. PR rtl-optimization/75964 * simplify-rtx.c (simplify_const_relational_operation): Remove invalid handling of comparisons of integer ABS. gcc/testsuite/ B

[patch,avr,v7,committed] Backport PR81407

2017-07-25 Thread Georg-Johann Lay
Backported from trunk as: https://gcc.gnu.org/r250522 Johann gcc/ Backport from 2017-07-12 trunk r250151. PR target/81407 * config/avr/avr.c (avr_encode_section_info) [progmem && !TREE_READONLY]: Error if progmem object needs constructing. Index: config/

Re: [patch] Ad PR81487: More asprintf -> xasprintf replacements

2017-07-25 Thread Georg-Johann Lay
Richard Biener schrieb: On Mon, Jul 24, 2017 at 10:19 AM, Georg-Johann Lay wrote: Hi, as proposed in https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01294.html this patch does more asprintf -> xasprintf replacements. Bootstrapped + reg-tested on x86_64-linux. Ok for trunk? Ok. Tha

[patch,v7,committed] Backport PR81487: asprintf -> xasprintf

2017-07-26 Thread Georg-Johann Lay
, 2017 at 10:01 PM, Georg-Johann Lay wrote: Richard Biener schrieb: On Mon, Jul 24, 2017 at 10:19 AM, Georg-Johann Lay wrote: Hi, as proposed in https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01294.html this patch does more asprintf -> xasprintf replacements. Bootstrapped + reg-tested

[patch,v6,committed] Backport PR81487: asprintf -> xasprintf

2017-07-27 Thread Georg-Johann Lay
...also backported to v6: https://gcc.gnu.org/r250573 Johann lto-plugin/ Backport from 2017-07-26 gcc-7-branch r250562. PR lto/81487 * lto-plugin.c (claim_file_handler): Use xasprintf instead of asprintf. [hi!=0]: Swap hi and lo arguments supplied to xaspr

[patch,avr,v6,applied] Backports of: PR81407, PR81305, PR79883 + PR67353.

2017-07-27 Thread Georg-Johann Lay
Applied $subject to gcc-6-branch. Johann https://gcc.gnu.org/r250574 gcc/ Backport from 2017-07-12 trunk r250151. PR target/81407 * config/avr/avr.c (avr_encode_section_info) [progmem && !TREE_READONLY]: Error if progmem object needs constructing. https:

[patch 0/2] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-07-27 Thread Georg-Johann Lay
For some targets, the best place to put read-only lookup tables as generated by -ftree-switch-conversion is not the generic address space but some target specific address space. This is the case for AVR, where for most devices .rodata must be located in RAM. Part #1 adds a new, optional target h

Re: [patch 1/2] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-07-27 Thread Georg-Johann Lay
On 27.07.2017 14:29, Georg-Johann Lay wrote: For some targets, the best place to put read-only lookup tables as generated by -ftree-switch-conversion is not the generic address space but some target specific address space. This is the case for AVR, where for most devices .rodata must be located

Re: [patch 2/2,avr] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-07-27 Thread Georg-Johann Lay
On 27.07.2017 14:29, Georg-Johann Lay wrote: For some targets, the best place to put read-only lookup tables as generated by -ftree-switch-conversion is not the generic address space but some target specific address space. This is the case for AVR, where for most devices .rodata must be located

Re: [patch 0/2] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-07-27 Thread Georg-Johann Lay
On 27.07.2017 14:34, Richard Biener wrote: On Thu, Jul 27, 2017 at 2:29 PM, Georg-Johann Lay wrote: For some targets, the best place to put read-only lookup tables as generated by -ftree-switch-conversion is not the generic address space but some target specific address space. This is the

Re: [patch 0/2] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-07-28 Thread Georg-Johann Lay
Richard Biener schrieb: On Thu, Jul 27, 2017 at 3:32 PM, Georg-Johann Lay wrote: On 27.07.2017 14:34, Richard Biener wrote: On Thu, Jul 27, 2017 at 2:29 PM, Georg-Johann Lay wrote: For some targets, the best place to put read-only lookup tables as generated by -ftree-switch-conversion is

Re: [patch 0/2] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-07-28 Thread Georg-Johann Lay
Richard Biener schrieb: On Fri, Jul 28, 2017 at 12:18 PM, Georg-Johann Lay wrote: Richard Biener schrieb: On Thu, Jul 27, 2017 at 3:32 PM, Georg-Johann Lay wrote: On 27.07.2017 14:34, Richard Biener wrote: On Thu, Jul 27, 2017 at 2:29 PM, Georg-Johann Lay wrote: For some targets, the

[patch,avr,committed] Fix PR81754

2017-08-14 Thread Georg-Johann Lay
https://gcc.gnu.org/r251085 Fixed mentioned avr build hiccup that occurs when used with Binutils < 2.29. Johann PR target/81754 PR target/81268 * config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues. * config/avr/avr.md (gasisr, *gasisr):

Re: [patch 0/2] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-08-16 Thread Georg-Johann Lay
On 28.07.2017 09:34, Richard Biener wrote: On Thu, Jul 27, 2017 at 3:32 PM, Georg-Johann Lay wrote: On 27.07.2017 14:34, Richard Biener wrote: On Thu, Jul 27, 2017 at 2:29 PM, Georg-Johann Lay wrote: For some targets, the best place to put read-only lookup tables as generated by -ftree

Re: [patch 0/2] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-08-18 Thread Georg-Johann Lay
On 18.08.2017 12:01, Richard Biener wrote: On Wed, Aug 16, 2017 at 3:32 PM, Georg-Johann Lay wrote: On 28.07.2017 09:34, Richard Biener wrote: On Thu, Jul 27, 2017 at 3:32 PM, Georg-Johann Lay wrote: On 27.07.2017 14:34, Richard Biener wrote: On Thu, Jul 27, 2017 at 2:29 PM, Georg-Johann

[patch,avr] Fir PR91910: ICE for bad attribute "address".

2017-08-21 Thread Georg-Johann Lay
"address" attribute only must be specified with VARs, yet the compiler dived into attribute analysis for non-VARs, resulting in ICE. This patch also adds OPT_Wattributes as warning filter. Ok to apply? Johann gcc/ PR target/81910 * config/avr/avr.c (avr_handle_addr_attribute):

[patch,avr,committed]: Remove flag_strict_overflow from avr.md

2017-05-05 Thread Georg-Johann Lay
Applied this addendum to r247495 which removed flag_strict_overflow. There were remains of the flag in avr.md which broke the avr build. Committed as r247632. Johann * config/avr/avr.md [flag_strict_overflow]: Remove any occurence of this flag from insn conditions due to remo

Re: [patch,avr,committed]: Remove flag_strict_overflow from avr.md

2017-05-05 Thread Georg-Johann Lay
On 05.05.2017 13:04, Richard Biener wrote: On Fri, 5 May 2017, Georg-Johann Lay wrote: Applied this addendum to r247495 which removed flag_strict_overflow. There were remains of the flag in avr.md which broke the avr build. Committed as r247632. Whoops - sorry for not grepping besides .[ch

[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-23 Thread Georg-Johann Lay
On 22.05.2017 13:47, Denis Chertykov wrote: 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 >

Re: [PATCH] Optimize divmod expansion (PR middle-end/79665)

2017-05-31 Thread Georg-Johann Lay
On 23.02.2017 06:59, Jeff Law wrote: On 02/22/2017 02:40 PM, Jakub Jelinek wrote: Hi! If both arguments of integer division or modulo are known to be non-negative in corresponding signed type, then signed as well as unsigned division/modulo shall have the exact same result and therefore we can

Re: [PATCH] Optimize divmod expansion (PR middle-end/79665)

2017-05-31 Thread Georg-Johann Lay
On 31.05.2017 10:15, Jakub Jelinek wrote: On Wed, May 31, 2017 at 10:06:34AM +0200, Georg-Johann Lay wrote: Hi, this causes a performance degradation for avr. When optimizing for speed, and with a known denominatior, then v6 uses s/umulMM3_highpart insn to avoid division because no div

Re: [PATCH] Optimize divmod expansion (PR middle-end/79665)

2017-05-31 Thread Georg-Johann Lay
On 31.05.2017 11:00, Jakub Jelinek wrote: On Wed, May 31, 2017 at 10:48:07AM +0200, Georg-Johann Lay wrote: because divmod in not a single_set: (gdb) p seq $10 = (const rtx_insn *) 0x7730d500 (gdb) pr warning: Expression is not an assignment (and might have no effect) (insn 14 13 0

[patch] Fix PR80929: Realistic PARALLEL cost in seq_cost.

2017-06-02 Thread Georg-Johann Lay
Hi, this small addition improves costs of PARALLELs in rtlanal.c:seq_cost(). Up to now, these costs are assumed to be 1 which gives gross inexact costs for, e.g. divmod which is represented as PARALLEL. The patch just forwards cost computation to insn_rtx_cost which uses the cost of the 1st SET

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