[Bug ada/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Component|target |ada --- Comment #4 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-11-14 00:00:24 UTC --- t-avr is the wrong place to set STAMP, it should be set in some Makefile(.in), presumable in the ada part, somewhere around ./gcc/ada/gcc-interface/Makefile.in You see STAMP being mentioned in repsective config.log?
[Bug target/54222] [avr] Implement fixed-point support
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222 --- Comment #8 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-11-22 10:00:24 UTC --- Author: gjl Date: Thu Nov 22 10:00:13 2012 New Revision: 193721 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=193721 Log: libgcc/ Adjust decimal point of signed accum mode to GCC default. PR target/54222 * config/avr/t-avr (LIB1ASMFUNCS): Add _fractsfsq _fractsfusq, _divqq_helper. * config/avr/lib1funcs-fixed.S (__fractqqsf, __fracthqsf) (__fractsasf, __fractsfha, __fractusqsf, __fractsfsa) (__mulha3, __mulsa3) (__divqq3, __divha3, __divsa3): Adjust to new position of decimal point of signed accum types. (__mulusa3_round): New function. (__mulusa3): Use it. (__divqq_helper): New function. (__udivuqq3): Use it. gcc/ Adjust decimal point of signed accum mode to GCC default. PR target/54222 * config/avr/avr-modes.def (HA, SA, DA): Remove mode adjustments. (TA): Move decimal point one bit to the right. * config/avr/avr.c (avr_out_fract): Rewrite. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-modes.def trunk/gcc/config/avr/avr.c trunk/libgcc/ChangeLog trunk/libgcc/config/avr/lib1funcs-fixed.S trunk/libgcc/config/avr/t-avr
[Bug testsuite/52641] Test cases fail for 16-bit int targets
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52641 --- Comment #7 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-11-23 10:08:54 UTC --- Author: gjl Date: Fri Nov 23 10:08:49 2012 New Revision: 193749 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=193749 Log: PR testsuite/52641 * gcc.dg/unroll_5.c: Add dg-require-effective-target int32plus. * gcc.dg/pr55150-1.c: Same. * gcc.dg/torture/pr54894.c: Add size32plus. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/pr55150-1.c trunk/gcc/testsuite/gcc.dg/torture/pr54894.c trunk/gcc/testsuite/gcc.dg/unroll_5.c
[Bug lto/52650] [4.8 Regression] FAIL: gcc.dg/torture/pr51106-2.c * (internal compiler error)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52650 --- Comment #14 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-11-26 09:47:18 UTC --- A milestone of 3.0.x???
[Bug testsuite/52641] Test cases fail for 16-bit int targets
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52641 --- Comment #8 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-11-26 18:46:25 UTC --- Author: gjl Date: Mon Nov 26 18:46:12 2012 New Revision: 193826 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=193826 Log: PR testsuite/52641 * gcc.c-torture/execute/20120919-1.x: New file (int32plus). * gcc.dg/pr54676.c: Make work for 16-bit int. Added: trunk/gcc/testsuite/gcc.c-torture/execute/20120919-1.x Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/pr54676.c
[Bug ada/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added CC||gjl at gcc dot gnu.org --- Comment #7 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-02 23:17:19 UTC --- (In reply to comment #6) The GNAT tools are for the host, they have nothing to do with multilibs. How come the s-avr-mlib Makefile rule gets invoked here? avr-gcc supports around 200 devices. In order to keep the various parts of the compiler in sync, some files are auto-generated from the device description in $(srcdir)/config/avr/avr-mcus.def. $(srcdir)/config/avr/t-avr reads: ... AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def ... # MULTILIB_OPTIONS # MULTILIB_DIRNAMES # MULTILIB_EXCEPTIONS # MULTILIB_MATCHES $(srcdir)/config/avr/t-multilib: s-avr-mlib; @true s-mlib: $(srcdir)/config/avr/t-multilib s-avr-mlib: $(srcdir)/config/avr/genmultilib.awk $(AVR_MCUS) $(AWK) -f $ -v FORMAT=Makefile $ $(AVR_MCUS) tmp-avr-mlib $(SHELL) $(srcdir)/../move-if-change \ tmp-avr-mlib $(srcdir)/config/avr/t-multilib $(STAMP) $@ And in config.gcc there is tmake_file=avr/t-avr avr/t-multilib Thus, the assumption is that AWK, SHELL and STAMP are set correctly and respective tools are available on the build platform.
[Bug ada/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 --- Comment #9 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-03 13:37:35 UTC --- (In reply to comment #8) OK, but the question is why this rule is invoked during the gnattools build? Moreover, why does s-avr-mlib need to be rebuilt at this point since it has presumably already been built for the target libraries? I don't know anything about the gnat build system and when I build avr-gcc I configure for C/C++. What's odd is that even if GCC is only configured for C/C++, I get messages about a missing gnatls. For example, running make in the gcc subdirectory of build prints $build/gcc make /bin/sh: gnatls: command not found The build itself works fine but that message is confusing and shows that something is wrong with the gnat build system. gnat stuff should not be needed of the compiler is not configured for ada, should it?
[Bug other/54814] [4.8 Regression] ICE: unable to find a register to spill in class 'R0_REG'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54814 --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-07 13:34:36 UTC --- rguenth at gcc dot gnu.org wrote: spill in class 'R0_REG' Spilling is a bug in the register allocator, or am I missing something. Besides that, I am getting this mail because I am CCed to PR54814 but your comment spill in class 'R0_REG' is missing in PR54814 so nobody can really follow what is going on for what reason. Johann Date: Fri, 07 Dec 2012 11:46:42 + X-Bugzilla-Reason: Reporter X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: ice-on-valid-code, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Priority Message-ID: bug-54814-20453-4htxobm...@http.gcc.gnu.org/bugzilla/ In-Reply-To: bug-54814-20...@http.gcc.gnu.org/bugzilla/ References: bug-54814-20...@http.gcc.gnu.org/bugzilla/ X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54814 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4
[Bug other/54814] [4.8 Regression] ICE: unable to find a register to spill in class 'R0_REG'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54814 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added CC||rguenth at gcc dot gnu.org --- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-07 17:59:02 UTC --- Richard, would you explain why this is a target issue? R0 is a fixed register, it should not be used for spilling or be allocated by IRA.
[Bug other/54814] [4.8 Regression] ICE: unable to find a register to spill in class 'R0_REG'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54814 --- Comment #7 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-08 10:28:07 UTC --- Many thanks for your help! Mike Stein stopped posting test results quite some time ago. Dunno why, he does not respond to email. avr.h defines R0_REG as register class with 1 fixed register, r0. This regclass is subset of NO_LD_REGS and GENERAL_REGS, which is odd. R0_REG does not make much sense to me, thus remove it from NO_LD_REGS and GENERAL_REGS or delete that regclass and constraint t completely. I'll try next week and report back.
[Bug other/54814] [4.8 Regression] ICE: unable to find a register to spill in class 'R0_REG'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54814 --- Comment #10 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-10 14:33:29 UTC --- (In reply to comment #9) Created attachment 28900 [details] Candidate patch Try this. It works. There are no more spill in class 'R0_REG' ICEs wozj your patch (atop trunk 194354)
[Bug ada/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 --- Comment #11 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-10 17:00:50 UTC --- (In reply to comment #10) I don't know anything about the gnat build system and when I build avr-gcc I configure for C/C++. What's odd is that even if GCC is only configured for C/C++, I get messages about a missing gnatls. For example, running make in the gcc subdirectory of build prints $build/gcc make /bin/sh: gnatls: command not found The build itself works fine but that message is confusing and shows that something is wrong with the gnat build system. gnat stuff should not be needed of the compiler is not configured for ada, should it? Probably, but if nobody really investigates, nothing will ever be fixed. $(build)/gcc/Makefile reads: # per-language makefile fragments ifneq ($(LANG_MAKEFRAGS),) include $(LANG_MAKEFRAGS) endif # target and host overrides must follow the per-language makefile fragments # so they can override or augment language-specific variables # target overrides ifneq ($(tmake_file),) include $(tmake_file) endif LANG_MAKEFRAGS contains $(srcdir)/ada/gcc-interface/Make-lang.in which in turn contains: # put the host RTS dir first in the PATH to hide the default runtime # files that are among the sources RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib ))) which means gnatls is called no matter if it exists or not. (In reply to comment #6) The GNAT tools are for the host, they have nothing to do with multilibs. How come the s-avr-mlib Makefile rule gets invoked here? The Makefile includes $(tmake_file) and thus $(srcdir)/gcc/config/avr/t-multilib which is auto-generated and needs $(STAMP) to build. AFAIK make resolves its includes before it starts building the targets.
[Bug ada/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 --- Comment #14 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-10 18:25:19 UTC --- (In reply to comment #12) So t-multilib is autogenerated in the source tree during the build??? Jepp. Top $(srcdir)/gcc/config/avr/t-multilib reads: # Auto-generated Makefile Snip # Generated by: ./gcc/config/avr/genmultilib.awk # Generated from : ./gcc/config/avr/avr-mcus.def # Used by : tmake_file from Makefile and genmultilib Rationale is that avr-gcc supports an, IMHO, insane number of -mmcu=device. In order to keep various parts of the compiler in sync, some bits are auto-generated, amongst them documentation, t-multilib and .opt parts. Procedure is a move-if-change scheme, i.e. the auto-generated files are in the repository and the procedure to build them is similar to building configure from configure.ac and then putting both configure.ac /and/ configure into the repo. However, the auto-build runs automatically and thus needs some tools, namely $(SHELL), $(AWK), $(CC_FOR_BUILD), $(RUN_GEN) and $(STAMP).
[Bug ada/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 --- Comment #15 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-10 18:36:33 UTC --- (In reply to comment #13) Created attachment 28916 [details] Tentative fix for gnatls issue To be applied in the ada/ source directory. This works for me with, i.e. the /bin/sh: gnatls: command not found is gone. $ ../../gcc.gnu.org/trunk/configure --target=avr --prefix=/local/gnu/install/gcc-4.8 --disable-nls --with-dwarf2 --enable-target-optspace=yes --enable-languages=c,c++ build: i686-pc-linux-gnu host: i686-pc-linux-gnu target: avr-unknown-none Someone else will have to test if it works if Ada is on. BTW, today is Ada's birthday :-)
[Bug ada/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 --- Comment #18 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-10 20:41:15 UTC --- (In reply to comment #16) So t-multilib is autogenerated in the source tree during the build??? Jepp. Top $(srcdir)/gcc/config/avr/t-multilib reads: # Auto-generated Makefile Snip # Generated by: ./gcc/config/avr/genmultilib.awk # Generated from : ./gcc/config/avr/avr-mcus.def # Used by : tmake_file from Makefile and genmultilib But this is a no-no, the compiler should be buildable with read-only sources once it is packaged in the release tarballs. It works with read-only sources, provided everything is consistent. Or are you saying that a t-snip must not use $(STAMP)? Actually, the PR boils down to the fact the STAMP is not defined, I am nut sure if the compiler is supposed to build without STAMP. Rationale is that avr-gcc supports an, IMHO, insane number of -mmcu=device. In order to keep various parts of the compiler in sync, some bits are auto-generated, amongst them documentation, t-multilib and .opt parts. Procedure is a move-if-change scheme, i.e. the auto-generated files are in the repository and the procedure to build them is similar to building configure from configure.ac and then putting both configure.ac /and/ configure into the repo. Building configure from configure.c isn't done at build time. Either you generate t-multilib like configure and you can put it in $(srcdir) or you generate it at build time and you must put it in $(builddir). Is basically follows an idea introduced with genopt.sh in http://gcc.gnu.org/viewcvs?view=revisionrevision=175248 Notice how t-avr builds avr-tables.opt, and that the latter is added to the repo.
[Bug ada/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 --- Comment #20 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-10 22:57:41 UTC --- (In reply to comment #19) It works with read-only sources, provided everything is consistent. Or are you saying that a t-snip must not use $(STAMP)? I'm saying that the build process should never touch the source tree. Isn't ./gcc/doc/md.texi both in the repo and generated (from ./gcc/doc/md.texi.in)? And, if parts of the docs are changed you will we nagged to verify GFDL and to copy the new, auto-generated parts in place? Actually, the PR boils down to the fact the STAMP is not defined, I am not sure if the compiler is supposed to build without STAMP. Probably not, but what I'm trying to understand is why we seem to be fiddling with the source tree when building the gnattools. As far as gnattools are concerned, it makes no difference whether the auto-generated files are stamped and written to $build or stamped and written to $source. I agree that the $source vs. $build matter should be cleaned up. However, that won't help with this PR because the rules and the dependencies and the needed tools will remain the same.
[Bug ada/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 --- Comment #22 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-11 12:18:23 UTC --- (In reply to comment #21) What I don't understand is what is bad with Rolf's proposal of defining STAMP? Stamping is not that unusual in the build process. Up to now it was not needed, but is it that critical to set STAMP like proposed above?
[Bug ada/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 --- Comment #25 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-14 18:26:07 UTC --- Created attachment 28960 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28960 Don't use STAMP to please Ada (In reply to comment #24) What I don't understand is what is bad with Rolf's proposal of defining STAMP? We simply don't need to stamp anything for the gnattools. Notice $(srcdir)/gcc/ada/gcc-interface/Makefile.in reads: # target overrides ifneq ($(tmake_file),) include $(tmake_file) endif # host overrides ifneq ($(xmake_file),) include $(xmake_file) endif There are other backends like x86 and mips that use STAMP in their t-snip, so I wonder how you can conclude that ada does not include code that might require STAMP? Here is a patch that bypasses the need of STAMP in t-avr. Rolf can test it. PR55243 * config/avr/t-avr: Don't automatically rebuild $(srcdir)/config/avr/t-multilib $(srcdir)/config/avr/avr-tables.opt $(srcdir)/doc/avr-mmcu.texi (avr-mcus): New phony target to build them on request. (s-avr-mlib, s-avr-mmcu-texi): Remove. * avr/avr-mcus.def: Adjust comments.
[Bug other/54814] [4.8 Regression] ICE: unable to find a register to spill in class 'R0_REG'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54814 --- Comment #11 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-14 18:56:34 UTC --- (In reply to comment #9) Created attachment 28900 [details] Candidate patch Try this. Bernd, do you intend to apply this, or should I post it for review?
[Bug target/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 --- Comment #29 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-17 22:53:42 UTC --- (In reply to comment #24) What I don't understand is what is bad with Rolf's proposal of defining STAMP? We simply don't need to stamp anything for the gnattools. Stamping is not that unusual in the build process. Up to now it was not needed, but is it that critical to set STAMP like proposed above? Well, building the gnattools works flawlessly for all targets except for AVR, That argument doues not count, IMO. Almost nothing in GCC was added without precedent: Features were added because backend X needed them or frontend Y needed them. To reject an extension just because only one target needs it, is not an convincing argument. It's still not known why the ada / gnat stuff rebuilds stuff already there a sectons time and at a stage ada / gnat don't expect such a build. Throwing out the need of STAMP works, but it does not answer the question why ada does things it does not expect at a stage it does not expect. (In reply to comment #26) There are other backends like x86 and mips that use STAMP in their t-snip, so I wonder how you can conclude that ada does not include code that might require STAMP? I didn't say that though, rather that we don't need STAMP for the gnattools. If I understand correctly, someone familiar with the gnat build machiney and philosophy might want to find out why it performs a mistimed rebuild of things that are elready supposed to be there? BTW, avr/t-multilib cannot be generated from scratch in the build directory because it is included in Makefile. The dependencies in gcc_update:files_and_dependencies() look reasonable.
[Bug other/54814] [4.8 Regression] ICE: unable to find a register to spill in class 'R0_REG'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54814 --- Comment #13 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-12-18 22:33:41 UTC --- (In reply to comment #12) Created attachment 28990 [details] Better patch Sorry for doing this, but here's a slightly improved version of the patch. Does this also fix the issue? Yes, at least I don't see spill in class 'R0_REG' in the testsuite with attachment 28990.
[Bug target/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 --- Comment #31 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-07 13:12:18 UTC --- Author: gjl Date: Mon Jan 7 13:12:10 2013 New Revision: 194970 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194970 Log: Backport from 2013-01-07 trunk r194968. PR other/55243 * config/avr/t-avr: Don't automatically rebuild $(srcdir)/config/avr/t-multilib $(srcdir)/config/avr/avr-tables.opt (avr-mcus): New phony target to build them on request. (s-avr-mlib): Remove. * avr/avr-mcus.def: Adjust comments. Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/config/avr/avr-mcus.def branches/gcc-4_7-branch/gcc/config/avr/t-avr
[Bug target/55243] STAMP variable is not defined in t-avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55243 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P5 Status|NEW |RESOLVED Known to work||4.7.3 Resolution||FIXED Target Milestone|--- |4.7.3 --- Comment #32 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-07 13:16:24 UTC --- Fixed for 4.7.3 Change set for trunk: http://gcc.gnu.org/viewcvs?view=revisionamp;revision=194968
[Bug target/55897] New: [avr] Allocate __memx data to .progmemx.data
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55897 Bug #: 55897 Summary: [avr] Allocate __memx data to .progmemx.data Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: g...@gcc.gnu.org Target: avr Currently, data in address space __memx is allocated to .progmem.data, i.e. the same section as for __flash resp. progmem. However, there os no need that __memx goes onto the same section. In order to support better data layout, __memx should go in a different section than .progmem, e.g. progmemx.
[Bug target/54461] [avr] add configure option for better AVR-Libc integration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54461 --- Comment #5 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-07 16:23:13 UTC --- Author: gjl Date: Mon Jan 7 16:22:59 2013 New Revision: 194981 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194981 Log: Backport from 2013-01-07 trunk r194978. PR target/54461 * doc/install.texi (Cross-Compiler-Specific Options): Document --with-avrlibc. Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/doc/install.texi
[Bug target/55897] [avr] Allocate __memx data to .progmemx.data
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55897 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-07 18:34:50 UTC --- Author: gjl Date: Mon Jan 7 18:34:40 2013 New Revision: 194991 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194991 Log: PR target/55897 * config/avr/avr.h (ADDR_SPACE_COUNT): New enum. (avr_addrspace_t): Add .section_name field. * config/avr/avr.c (progmem_section): Use ADDR_SPACE_COUNT as array size. (avr_addrspace): Same. Initialize .section_name. Remove last NULL entry. Put __memx into .progmemx.data. (progmem_section_prefix): Remove. (avr_asm_init_sections): No need to initialize progmem_section. (avr_asm_named_section): Use avr_addrspace[].section_name to get section name prefix. (avr_asm_select_section): Ditto. And use get_unnamed_section to retrieve the progmem section. * avr-c.c (avr_cpu_cpp_builtins): Use ADDR_SPACE_COUNT as loop boundary to run over avr_addrspace[]. (avr_register_target_pragmas): Ditto. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-c.c trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/avr.h
[Bug target/55897] [avr] Allocate __memx data to .progmemx.data
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55897 --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-07 18:37:57 UTC --- Author: gjl Date: Mon Jan 7 18:37:47 2013 New Revision: 194992 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194992 Log: PR target/55897 * doc/extend.texi (AVR Named Address Spaces): __memx goes into .progmemx.data now. Modified: trunk/gcc/ChangeLog trunk/gcc/doc/extend.texi
[Bug target/55897] [avr] Allocate __memx data to .progmemx.data
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55897 --- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-07 18:51:38 UTC --- Author: gjl Date: Mon Jan 7 18:51:33 2013 New Revision: 194993 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194993 Log: Backport from 2013-01-07 trunk r194991, r194992. PR target/55897 * doc/extend.texi (AVR Named Address Spaces): __memx goes into .progmemx.data now. * config/avr/avr.h (ADDR_SPACE_COUNT): New enum. (avr_addrspace_t): Add .section_name field. * config/avr/avr.c (progmem_section): Use ADDR_SPACE_COUNT as array size. (avr_addrspace): Same. Initialize .section_name. Remove last NULL entry. Put __memx into .progmemx.data. (progmem_section_prefix): Remove. (avr_asm_init_sections): No need to initialize progmem_section. (avr_asm_named_section): Use avr_addrspace[].section_name to get section name prefix. (avr_asm_select_section): Ditto. And use get_unnamed_section to retrieve the progmem section. * avr-c.c (avr_cpu_cpp_builtins): Use ADDR_SPACE_COUNT as loop boundary to run over avr_addrspace[]. (avr_register_target_pragmas): Ditto. Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/config/avr/avr-c.c branches/gcc-4_7-branch/gcc/config/avr/avr.c branches/gcc-4_7-branch/gcc/config/avr/avr.h branches/gcc-4_7-branch/gcc/doc/extend.texi
[Bug target/55897] [avr] Allocate __memx data to .progmemx.data
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55897 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Keywords||addr-space Priority|P3 |P4 Status|UNCONFIRMED |RESOLVED Resolution||FIXED Target Milestone|--- |4.7.3 --- Comment #4 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-07 18:53:45 UTC --- Fixed in 4.7.3
[Bug target/55974] New: [avr] Wrong suffix for built-in defines __INT24_MAX__ and __UINT24_MAX__ with -mint8
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55974 Bug #: 55974 Summary: [avr] Wrong suffix for built-in defines __INT24_MAX__ and __UINT24_MAX__ with -mint8 Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: g...@gcc.gnu.org ReportedBy: g...@gcc.gnu.org Target: avr Suffixes for these macros are L resp. UL, but with -mint8 they must be LL resp. ULL
[Bug target/55974] [avr] Wrong suffix for built-in defines __INT24_MAX__ and __UINT24_MAX__ with -mint8
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55974 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-14 18:28:37 UTC --- Author: gjl Date: Mon Jan 14 18:28:24 2013 New Revision: 195169 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=195169 Log: PR target/55974 * config/avr/avr-c.c (avr_cpu_cpp_builtins): Define __FLASH etc. to 1 and not to __flash. Use LL suffix for __INT24_MAX__ with -mint8. Use ULL suffix for __UINT24_MAX__ with -mint8. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-c.c
[Bug target/55974] [avr] Wrong suffix for built-in defines __INT24_MAX__ and __UINT24_MAX__ with -mint8
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55974 --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-14 18:32:19 UTC --- Author: gjl Date: Mon Jan 14 18:32:05 2013 New Revision: 195170 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=195170 Log: Backport from 2013-01-14 trunk r195169. PR target/55974 * config/avr/avr-c.c (avr_cpu_cpp_builtins): Define __FLASH etc. to 1 and not to __flash. Use LL suffix for __INT24_MAX__ with -mint8. Use ULL suffix for __UINT24_MAX__ with -mint8. Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/config/avr/avr-c.c
[Bug target/55974] [avr] Wrong suffix for built-in defines __INT24_MAX__ and __UINT24_MAX__ with -mint8
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55974 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P5 Status|UNCONFIRMED |RESOLVED Resolution||FIXED Target Milestone|--- |4.7.3 --- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-14 18:33:35 UTC --- Fixed in 4.7.3
[Bug tree-optimization/56064] New: Optimize VIEW_CONVERT_EXPR with FIXED_CST
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56064 Bug #: 56064 Summary: Optimize VIEW_CONVERT_EXPR with FIXED_CST Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: g...@gcc.gnu.org Created attachment 29235 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29235 foo.c.165r.expand (RTL dump) In the followinf C code static __inline__ __attribute__((__always_inline__)) _Fract rbits (const __INT16_TYPE__ i) { _Fract f; __builtin_memcpy (f, i, sizeof (_Fract)); return f; } _Fract func (void) { return rbits (__INT16_C(0x1234)); } The memcpy could be optimized away. It is represented as VIEW_CONVERT_EXPR but FIXED_CST is not folded in fold-const.c. The attachment shows the memory moves of HQmode which is suboptimal. For more details, see http://gcc.gnu.org/ml/gcc/2013-01/msg00187.html
[Bug target/41076] [avr] pessimal code for logical OR of 8-bit fields
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41076 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | Target Milestone|4.7.1 |--- Severity|enhancement |normal --- Comment #6 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-22 22:31:11 UTC --- (In reply to comment #5) Fixed I suppose. Unfortunately, not extern unsigned char read8 (void); unsigned short read16 (void) { unsigned char lo, hi; hi = read8(); lo = read8(); return lo | hi 8; } with 4.8.0 -S -Os the compiler needs 5 instructions (29, 37, 30, 38) for an operation that is basically a no-op: read16: push r28 ; 31pushqi1/1[length = 1] /* prologue: function */ /* frame size = 0 */ /* stack size = 1 */ .L__stack_usage = 1 call read8 ; 5call_value_insn/2[length = 2] mov r28,r24 ; 6movqi_insn/1[length = 1] call read8 ; 7call_value_insn/2[length = 2] mov r18,r28 ; 28movqi_insn/1[length = 1] ldi r19,0 ; 29movqi_insn/1[length = 1] mov r19,r18 ; 37*ashlhi3_const/3[length = 2] clr r18 or r18,r24 ; 30iorqi3/1[length = 1] movw r24,r18 ; 38*movhi/1[length = 1] /* epilogue start */ pop r28 ; 34popqi[length = 1] ret ; 35return_from_epilogue[length = 1]
[Bug target/54222] [avr] Implement fixed-point support
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222 --- Comment #9 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-23 15:13:56 UTC --- Author: gjl Date: Wed Jan 23 15:13:51 2013 New Revision: 195407 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=195407 Log: PR target/54222 * config/avr/stdfix.h: New file. * t-avr (stdfix-gcc.h): New rule to build it. (EXTRA_HEADERS): Set it to install stdfix.h, stdfix-gcc.h. Added: trunk/gcc/config/avr/stdfix.h Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/t-avr
[Bug target/54222] [avr] Implement fixed-point support
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222 --- Comment #10 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-25 09:28:14 UTC --- Author: gjl Date: Fri Jan 25 09:28:09 2013 New Revision: 195464 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=195464 Log: gcc/ PR target/54222 * config/avr/builtins.def (DEF_BUILTIN): Add LIBNAME argument. Add NULL LIBNAME argument to existing definitions. (ABSHR, ABSR, ABSLR, ABSLLR, ABSHK, ABSK, ABSLK, ABSLLK): New. * config/avr/avr-c.c (DEF_BUILTIN): Add LIBNAME argument. * config/avr/avr.c (DEF_BUILTIN): Same. (avr_init_builtins): Pass down LIBNAME to add_builtin_function. (avr_expand_builtin): Expand to a vanilla call if a libgcc implementation is available (DECL_ASSEMBLER_NAME is set). (avr_fold_absfx): New static function. (avr_fold_builtin): Use it to handle: AVR_BUILTIN_ABSHR, AVR_BUILTIN_ABSR, AVR_BUILTIN_ABSLR, AVR_BUILTIN_ABSLLR, AVR_BUILTIN_ABSHK, AVR_BUILTIN_ABSK, AVR_BUILTIN_ABSLK, AVR_BUILTIN_ABSLLK. * config/avr/stdfix.h (abshr, absr, abslr, absllr) (abshk, absk, abslk, absllk): Provide as static inline functions. gcc/testsuite/ PR target/54222 * gcc.target/avr/torture/builtins-3-absfx.c: New test. Added: trunk/gcc/testsuite/gcc.target/avr/torture/builtins-3-absfx.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-c.c trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/builtins.def trunk/gcc/config/avr/stdfix.h trunk/gcc/testsuite/ChangeLog
[Bug other/54814] [4.8 Regression] ICE: unable to find a register to spill in class 'R0_REG'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54814 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Keywords||patch Known to work||4.7.0, 4.7.2 --- Comment #14 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-25 20:55:53 UTC --- Attachment 28990 is pending review at http://gcc.gnu.org/ml/gcc-patches/2013-01/msg01255.html with the following ChangeLog: PR other/54814 * reload.c (find_valid_class_1): Use in_hard_reg_set_p instead of TEST_HARD_REG_BIT.
[Bug pending/55996] [meta-bug] GCC 4.9 pending patches
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55996 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Keywords||meta-bug Depends on||54814 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-27 22:32:18 UTC --- PR54814 is actually a 4.8 regression and should go into 4.8.0, but Jeffrey requested to add this PR here, cf. http://gcc.gnu.org/ml/gcc-patches/2013-01/msg01294.html
[Bug other/54814] [4.8 Regression] ICE: unable to find a register to spill in class 'R0_REG'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54814 --- Comment #15 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-28 20:03:34 UTC --- Author: gjl Date: Mon Jan 28 20:03:26 2013 New Revision: 195515 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=195515 Log: PR other/54814 * reload.c (find_valid_class_1): Use in_hard_reg_set_p instead of TEST_HARD_REG_BIT. Modified: trunk/gcc/ChangeLog trunk/gcc/reload.c
[Bug other/54814] [4.8 Regression] ICE: unable to find a register to spill in class 'R0_REG'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54814 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #16 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-28 20:05:29 UTC --- Fixed for the milestone.
[Bug target/54222] [avr] Implement fixed-point support
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222 --- Comment #11 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-29 10:33:24 UTC --- Author: gjl Date: Tue Jan 29 10:33:18 2013 New Revision: 195532 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=195532 Log: PR target/54222 * config/avr/t-avr (LIB2FUNCS_EXCLUDE): Add: _mulQQ, _mulHQ, _mulHA, _mulSA, _mulUQQ, _mulUHQ, _mulUHA, _mulUSA, _divQQ, _divHQ, _divHA, _divSA, _divUQQ, _divUHQ, _divUHA, _divUSA. Modified: trunk/libgcc/ChangeLog trunk/libgcc/config/avr/t-avr
[Bug tree-optimization/56064] Optimize VIEW_CONVERT_EXPR with FIXED_CST
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56064 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-30 11:04:35 UTC --- Author: gjl Date: Wed Jan 30 11:04:30 2013 New Revision: 195574 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=195574 Log: gcc/ PR tree-optimization/56064 * fixed-value.c (fixed_from_double_int): New function. * fixed-value.h (fixed_from_double_int): New prototype. (const_fixed_from_double_int): New static inline function. * fold-const.c (native_interpret_fixed): New static function. (native_interpret_expr) FIXED_POINT_TYPE: Use it. (can_native_interpret_type_p) FIXED_POINT_TYPE: Return true. (native_encode_fixed): New static function. (native_encode_expr) FIXED_CST: Use it. (native_interpret_int): Move double_int worker code to... * double-int.c (double_int::from_buffer): ...this new static method. * double-int.h (double_int::from_buffer): Prototype it. gcc/testsuite/ PR tree-optimization/56064 * gcc.dg/fixed-point/view-convert.c: New test. Added: trunk/gcc/testsuite/gcc.dg/fixed-point/view-convert.c Modified: trunk/gcc/ChangeLog trunk/gcc/double-int.c trunk/gcc/double-int.h trunk/gcc/fixed-value.c trunk/gcc/fixed-value.h trunk/gcc/fold-const.c trunk/gcc/testsuite/ChangeLog
[Bug tree-optimization/56064] Optimize VIEW_CONVERT_EXPR with FIXED_CST
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56064 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED Target Milestone|--- |4.8.0 --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-30 11:06:28 UTC --- Done.
[Bug c/56164] avr-gcc 4.7.2 fail with __flash keyword
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56164 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2013-01-31 CC||gjl at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-31 15:24:58 UTC --- (In reply to comment #1) testcase (zip-archive) Please provide a test case, following the bug reporting instructions in http://gcc.gnu.org/bugs/#report
[Bug c/56164] avr-gcc 4.7.2 fail with __flash keyword
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56164 --- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-01-31 20:25:20 UTC --- Created attachment 29322 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29322 Small an valis test case Output with avr-gcc 4.7.2: avr-gcc -S -mmcu=atmega8 -Os foo.c foo.c: In function 'psy': foo.c:18:1: error: unable to find a register to spill in class 'POINTER_REGS' } ^ foo.c:18:1: error: this is the insn: (insn 26 25 28 2 (set (reg:SF 59 [ D.1396 ]) (unspec:SF [ (reg:HI 30 r30) (const_int 0 [0]) ] UNSPEC_LPM)) foo.c:9 22 {load_sf} (expr_list:REG_DEAD (reg:HI 30 r30) (nil))) foo.c:18:1: internal compiler error: in spill_failure, at reload1.c:2124 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions.
[Bug target/56164] [avr] ICE: spill fail with __flash keyword
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56164 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Target||avr Priority|P3 |P4 Status|WAITING |NEW Keywords||ice-on-valid-code Component|c |target Summary|avr-gcc 4.7.2 fail with |[avr] ICE: spill fail with |__flash keyword |__flash keyword Target Milestone|--- |4.7.3 Known to fail||4.7.2 Severity|critical|normal
[Bug target/54888] GCC with -Os is faster than -O3 on some AVR code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54888 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|WAITING |RESOLVED CC|gjl at gcc dot gnu.org | Resolution||INVALID --- Comment #6 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-02-02 14:21:27 UTC --- Closed as invalid. No answer and no valid test case for over 3 months now.
[Bug target/49017] [avr] -ffunction-sections causes linker to fail
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49017 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|WAITING |RESOLVED CC|gjl at gcc dot gnu.org | Resolution||INVALID --- Comment #6 from Georg-Johann Lay gjl at gcc dot gnu.org 2013-02-02 14:22:46 UTC --- Closed as invalid. No answer and no valid test case for over 3 months now.
[Bug other/56183] New: [meta-bug][avr] Problems with register allocation
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56183 Bug #: 56183 Summary: [meta-bug][avr] Problems with register allocation Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: meta-bug, ra Severity: normal Priority: P3 Component: other AssignedTo: unassig...@gcc.gnu.org ReportedBy: g...@gcc.gnu.org Target: avr This PR collects problems with the rgister allocation for the avr target.
[Bug other/56183] [meta-bug][avr] Problems with register allocation
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56183 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2013-02-02 Depends on||42204, 50925, 52278, 56164, ||54814 Ever Confirmed|0 |1
[Bug middle-end/57503] [4.7/4.8 Regression] Expand uses wrong multiply routine
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57503 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|WAITING |NEW --- Comment #8 from Georg-Johann Lay gjl at gcc dot gnu.org --- (In reply to Richard Biener from comment #7) Can you please investigate the behavior on current trunk and the top of the 4.8 branch? Using the code from comment #7 the problem persists $ avr-gcc -S -Os pr57503.c -mmcu=atmega8 -dP long func1 (unsigned char a, unsigned char b, int c) { unsigned ab = a * b; return (long) ab * c; } The code is a bit different but still wrong: func1: ; (insn 10 5 25 (set (reg:HI 18 r18 [orig:44 D.1450 ] [44]) ; (mult:HI (zero_extend:HI (reg:QI 24 r24 [ a ])) ; (zero_extend:HI (reg/v:QI 22 r22 [orig:50 b ] [50] pr57503.c:4 168 {umulqihi3} ; (expr_list:REG_DEAD (reg:QI 24 r24 [ a ]) ; (expr_list:REG_DEAD (reg/v:QI 22 r22 [orig:50 b ] [50]) ; (nil mul r24,r22 ; 10umulqihi3[length = 3] movw r18,r0 clr __zero_reg__ ; (insn 25 10 26 (set (reg:HI 26 r26) ; (reg/v:HI 20 r20 [orig:51 c ] [51])) pr57503.c:5 82 {*movhi} ; (expr_list:REG_DEAD (reg/v:HI 20 r20 [orig:51 c ] [51]) ; (nil))) movw r26,r20 ; 25*movhi/1[length = 1] ; (insn 26 25 21 (set (reg:SI 22 r22) ; (mult:SI (sign_extend:SI (reg:HI 18 r18)) ; (sign_extend:SI (reg:HI 26 r26 pr57503.c:5 231 {*mulhisi3_call} ; (expr_list:REG_DEAD (reg:HI 26 r26) ; (expr_list:REG_DEAD (reg:HI 18 r18) ; (nil rcall __mulhisi3 ; 26*mulhisi3_call[length = 1] ; (jump_insn 31 21 30 (return) pr57503.c:6 451 {return} ; (nil) ; - return) ret ; 31return[length = 1] Insn 26 sign-extends both inputs but R18 (unsigned ab) should be zero-extended. Tested with SVN 203240 gcc version 4.9.0 20131007 (experimental) (GCC)
[Bug middle-end/57503] [4.7/4.8 Regression] Expand uses wrong multiply routine
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57503 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Known to fail||4.7.2, 4.8.1, 4.9.0 --- Comment #9 from Georg-Johann Lay gjl at gcc dot gnu.org --- (In reply to Richard Biener from comment #7) Can you please investigate the behavior on current trunk and the top of the 4.8 branch? Same applies to the 4.8 branch, again it is insn 26 that is wrong: func1: ; (insn 10 5 25 (set (reg:HI 18 r18 [orig:44 D.1447 ] [44]) ; (mult:HI (zero_extend:HI (reg:QI 24 r24 [ a ])) ; (zero_extend:HI (reg/v:QI 22 r22 [orig:50 b ] [50] pr57503.c:4 168 {umulqihi3} ; (expr_list:REG_DEAD (reg:QI 24 r24 [ a ]) ; (expr_list:REG_DEAD (reg/v:QI 22 r22 [orig:50 b ] [50]) ; (nil mul r24,r22 ; 10umulqihi3[length = 3] movw r18,r0 clr __zero_reg__ ; (insn 25 10 26 (set (reg:HI 26 r26) ; (reg/v:HI 20 r20 [orig:51 c ] [51])) pr57503.c:5 82 {*movhi} ; (expr_list:REG_DEAD (reg/v:HI 20 r20 [orig:51 c ] [51]) ; (nil))) movw r26,r20 ; 25*movhi/1[length = 1] ; (insn 26 25 21 (set (reg:SI 22 r22) ; (mult:SI (sign_extend:SI (reg:HI 18 r18)) ; (sign_extend:SI (reg:HI 26 r26 pr57503.c:5 231 {*mulhisi3_call} ; (expr_list:REG_DEAD (reg:HI 26 r26) ; (expr_list:REG_DEAD (reg:HI 18 r18) ; (nil rcall __mulhisi3 ; 26*mulhisi3_call[length = 1] ; (jump_insn 31 21 30 (return) pr57503.c:6 451 {return} ; (nil) ; - return) ret ; 31return[length = 1] .sizefunc1, .-func1 .identGCC: (GNU) 4.8.2 20131007 (prerelease)
[Bug target/58655] New: [avr] -mfract-convert-truncate not documented
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58655 Bug ID: 58655 Summary: [avr] -mfract-convert-truncate not documented Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: documentation Severity: minor Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: gjl at gcc dot gnu.org Target: avr avr specific command option -mfract-convert-truncate should be documented in the users guide (gcc/doc/invoke.texi) and in the release notes (http://gcc.gnu.org/gcc-4.9/changes.html).
[Bug target/58655] [avr] -mfract-convert-truncate not documented
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58655 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P5 Status|UNCONFIRMED |NEW Last reconfirmed||2013-10-07 CC||amylaar at gcc dot gnu.org Ever confirmed|0 |1
[Bug tree-optimization/50417] regression: memcpy with known alignment
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50417 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Keywords||missed-optimization Target|sh*-*-* arm*-*-* avr*-*-* |sh*-*-* arm*-*-* CC||gjl at gcc dot gnu.org --- Comment #4 from Georg-Johann Lay gjl at gcc dot gnu.org --- (In reply to Richard Biener from comment #1) The middle-end does not know anything about the parameters alignment. But the following code will use SImode load / store, even on strict-alignment backends void test (const int* a, int* b) { *b = *a; } If SImode operations are in order here, why not in memcpy et al. provided it is feeded with int*? In the case where an unaligned pointer is used in *b = *a and this causes, e.g. a trap, this is in order. Similar should apply for memcpy on strict-alignment machines if it gets an unaligned int* for example and the size is a multiple of the alignment requirement. BTW: AVR is an 8-bit machine that copies in chunks of 1 byte, this applies also for 4.5 and older. avr-gcc is /not/ a strict alignment backend. Thul removed from the targets.
[Bug target/59174] [avr] Suboptimal multiplication when indexing an array
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59174 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Target||avr Priority|P3 |P4 Status|UNCONFIRMED |NEW Last reconfirmed||2013-12-02 CC||gjl at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org --- Confirmed with the trunk. This is an issue of cost computation in the avr backend. If you compile with -O2 -mmcu=atmega2560 -mlog=rtx_costs you will see avr_rtx_costs[test:combine(206)]=true (speed) total=36, outer=set: (mult:HI (reg:HI 47 [ D.1460 ]) (const_int 10 [0xa])) ... avr_rtx_costs[test:combine(206)]=true (speed) total=32, outer=set: (plus:HI (ashift:HI (reg:HI 47 [ D.1460 ]) (const_int 3 [0x3])) (ashift:HI (reg:HI 47 [ D.1460 ]) (const_int 1 [0x1]))) thus the MULT variant is taken as more costly that the ASHIFT + PLUS version.
[Bug target/59396] New: [avr] Wrong warning with ISR() and -flto
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396 Bug ID: 59396 Summary: [avr] Wrong warning with ISR() and -flto Product: gcc Version: 4.8.3 Status: UNCONFIRMED Severity: minor Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: gjl at gcc dot gnu.org Created attachment 31387 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31387action=edit isr.c: The C source Following source will throw a warning if compiled, e.g., $ avr-gcc isr.c -mmcu=atmega8 -flto #define __INTR_ATTRS used, externally_visible #define ISR(vector,...) \ void vector (void) __attribute__ ((signal,__INTR_ATTRS)) __VA_ARGS__; \ void vector (void) #define ADC_vect __vector_14 ISR (ADC_vect) { } int main() { return 0; } The defines are copy-pased from AVR-Libc and are the most common way to define interrupt service routines: Use ISR() with a isr vector name. The warning is: In function '__vector_14': isr.c:10:1: warning: '_vector_14' appears to be a misspelled signal handler [enabled by default] ISR (ADC_vect) ^
[Bug target/59396] [avr] Wrong warning with ISR() and -flto
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Keywords||diagnostic Target||avr Priority|P3 |P4 Status|UNCONFIRMED |NEW Last reconfirmed||2013-12-05 Ever confirmed|0 |1
[Bug middle-end/59559] New: ICE: invalid RTX sharing in expmed.c:expand_divmod
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59559 Bug ID: 59559 Summary: ICE: invalid RTX sharing in expmed.c:expand_divmod Product: gcc Version: 4.8.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: gjl at gcc dot gnu.org In expmed.c:expand_divmod() we have the following code: t1 = expmed_mult_highpart (compute_mode, op0, gen_int_mode (ml, compute_mode), NULL_RTX, 1, max_cost - extra_cost); if (t1 == 0) goto fail1; t2 = force_operand (gen_rtx_MINUS (compute_mode, op0, t1), NULL_RTX); t3 = expand_shift (RSHIFT_EXPR, compute_mode, t2, 1, NULL_RTX, 1); t4 = force_operand (gen_rtx_PLUS (compute_mode, t1, t3), NULL_RTX); This code produces invalid RTX sharing for t1 if some conditions are met: - The code is used after tree-RTL lowering which can happen in some loop optimizations. A possible call chain is from loop_doloop.c:doloop_modify() and if the force_operand there operates on a UDIV or DIV expression and finally ends up with the expmed.c code from above. - The value for t1 is a SUBREG like (subreg:SI (reg:DI xxx) 4) This depends on the backend and if and how it implements (widening) multiplication and mul_highpart insns. - The ICE will depend on the cost model of the target. - The ICE will only pop up if RTL checking is enabled. I could not reproduce this ICE with a standard GCC target, I just see it for a private port. However, this might also be a latent problem for official GCC targets. The problem is that the loop optimization above runs after RTL unsharing so that the sharing of the SUBREG is not resolved. A possible fix is obviously to t1 = copy_rtx (t1) after the first use of t1 and befor its second use. FYI, the code for which I see the ICE is gcc.c-torture/execute/loop-3b.c from GCC's test suite -- but as already said I found no official target that breaks there. There is also a simpler example like the code below, but fpr x86 and rs6000 it works fine :-( int n; void f (int val) { while (n 0) { val++; n -=45; } }
[Bug c++/59394] Unused code generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59394 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Attachment #31385|0 |1 is obsolete|| --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org --- Created attachment 31500 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31500action=edit C++ source. Please follow the bug reporting instructions and don't include headers, especcialy ones that the common GCC developer does not have. Attached a source file that compiles fine without headers. And there is nothing avr specific here.
[Bug c++/59394] Unused code generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59394 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Target|AVR | Severity|major |normal
[Bug c++/59394] Unused code generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59394 --- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org --- Some more notes: If you don't want that small functions are being inlined, consider -fno-inline-small-functions. If a function is being inlined then it's body is still implemented except in the case where GCC can prove the body is never needed, for example if the function is static. If you implement two functions that result in the same code, GCC won't reuse the code for you. If you have redundant code, it is up to you to reuse it.
[Bug other/53615] Buffer overflow in the compiler?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53615 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Keywords||ice-checking Status|WAITING |NEW Last reconfirmed|2012-07-31 00:00:00 |2012-08-03 0:00 Known to fail||4.7.1
[Bug target/54222] New: [avr] Implement fixed-point support
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222 Bug #: 54222 Summary: [avr] Implement fixed-point support Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: target AssignedTo: g...@gcc.gnu.org ReportedBy: g...@gcc.gnu.org CC: eric.wedding...@atmel.com Target: avr There is a draft patch from Sean, see http://lists.gnu.org/archive/html/avr-gcc-list/2012-07/msg00030.html
[Bug target/54222] [avr] Implement fixed-point support
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P5 Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2012-08-10 CC||geckosenator at gmail dot ||com Target Milestone|--- |4.8.0 Ever Confirmed|0 |1
[Bug target/54222] [avr] Implement fixed-point support
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-08-10 14:24:24 UTC --- Created attachment 27984 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27984 Tentative patch against 4.8 libgcc/ * config/avr/lib1funcs-fixed.S: New file. * config/avr/lib1funcs.S: Include it. Undefine some divmodsi after they are used. (neg2, neg4): New macros. * config/avr/avr-lib.h (TA, UTA): Adjust according to gcc's avr-modes.def. * config/avr/t-avr (LIB1ASMFUNCS): Add: _fractqqsf, _fractuqqsf, _fracthqsf, _fractuhqsf, _fracthasf, _fractuhasf, _fractsasf, _fractusasf, _fractsfqq, _fractsfuqq, _fractsfhq, _fractsfuhq, _fractsfha, _fractsfsa, _mulqq3, _muluqq3, _mulhq3, _muluhq3, _mulha3, _muluha3, _mulsa3, _mulusa3, _divqq3, _udivuqq3, _divhq3, _udivuhq3, _divha3, _udivuha3, _divsa3, _udivusa3. gcc/ * config/avr/predicates.md (const0_operand): Allow const_fixed. (const_operand, const_or_immediate_operand): New. (nonmemory_or_const_operand): New. * config/avr/constraints.md (Ynn, Y00, Y01, Y02, Ym1, Ym2, YIJ): New constraints. * avr/avr-fixed.md: New file. * avr/avr.md: Include it. (cc): Add: minus. (adjust_len): Add: minus, minus64, ufract, sfract. (ALLQ, ALLH, ALLS, ALLQS, ORDERED234): New mode iterators. (MOVMODE): Add: QQ, UQQ, HQ, UHQ, HA, UHA, SQ, USQ, SA, USA. (MPUSH): Add: HQ, UHQ, HA, UHA, SQ, USQ, SA, USA. (pushqi1, xload8_A, xload_8, movqi_insn, *reload_inqi, addqi3, subqi3, ashlqi3, *ashlqi3, ashrqi3, lshrqi3, *lshrqi3, *cmpqi, cbranchqi4, *cpse.eq): Generalize to handle all 8-bit modes in ALLQ. (*movhi, reload_inhi, addhi3, *addhi3, addhi3_clobber, subhi3, ashlhi3, *ashlhi3_const, ashrhi3, *ashirhi3_const, lshrhi3, *lshrhi3_const, *cmphi, cbranchhi4): Generalize to handle all 16-bit modes in ALLH. (subhi3, casesi, strlenhi): Add clobber when expanding minus:HI. (*movsi, *reload_insi, addsi3, subsi3, ashlsi3, *ashlsi3_const, ashrsi3, *ashrhi3_const, *ashrsi3_const, lshrsi3, *lshrsi3_const, *reversed_tstsi, *cmpsi, cbranchsi4): Generalize to handle all 32-bit modes in ALLS. * avr-dimode.md (ALLD): New mode iterator. (adddi3, adddi3_insn, adddi3_const_insn, subdi3, subdi3_insn, subdi3_const_insn, cbranchdi4, compare_di2, compare_const_di2, ashrdi3, lshrdi3, rotldi3, ashldi3_insn, ashrdi3_insn, lshrdi3_insn, rotldi3_insn): Generalize to handle all 64-bit modes in ALLD. * avr-modes.def (HA, SA, DA, TA, UTA): Adjust modes. * config/avr/avr-protos.h (avr_to_int_mode): New prototype. (avr_out_fract, avr_out_minus, avr_out_minus64): New prototypes. * config/avr/avr.c (TARGET_FIXED_POINT_SUPPORTED_P): Return true. (avr_scalar_mode_supported_p): Allow if ALL_FIXED_POINT_MODE_P. (avr_builtin_setjmp_frame_value): Use gen_subhi3 and return new pseudo instead of gen_rtx_MINUS. (avr_print_operand, avr_operand_rtx_cost): Handle: CONST_FIXED. (notice_update_cc): Handle: CC_MINUS. (output_movqi): Generalize to handle respective fixed-point modes. (output_movhi, output_movsisf, avr_2word_insn_p): Ditto. (avr_out_compare, avr_out_plus_1): Also handle fixed-point modes. (avr_assemble_integer): Ditto. (output_reload_in_const, output_reload_insisf): Ditto. (avr_out_fract, avr_out_minus, avr_out_minus64): New functions. (avr_out_plus64): Probe if PLUS or MINUS is shorter. (avr_to_int_mode): New function. (adjust_insn_length): Handle: ADJUST_LEN_SFRACT, ADJUST_LEN_UFRACT, ADJUST_LEN_MINUS, ADJUST_LEN_MINUS64.
[Bug target/54222] [avr] Implement fixed-point support
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Attachment #27984|0 |1 is obsolete|| --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-08-11 10:21:08 UTC --- Created attachment 27988 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27988 Tentative patch against 4.8 Discussed here: http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00632.html
[Bug target/54222] [avr] Implement fixed-point support
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Keywords||patch --- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-08-11 10:26:19 UTC --- ...and here is the respective ChangeLogs for attachment 27988 from comment #2: libgcc/ PR target/54222 * config/avr/lib1funcs-fixed.S: New file. * config/avr/lib1funcs.S: Include it. Undefine some divmodsi after they are used. (neg2, neg4): New macros. * config/avr/avr-lib.h (TA, UTA): Adjust according to gcc's avr-modes.def. * config/avr/t-avr (LIB1ASMFUNCS): Add: _fractqqsf, _fractuqqsf, _fracthqsf, _fractuhqsf, _fracthasf, _fractuhasf, _fractsasf, _fractusasf, _fractsfqq, _fractsfuqq, _fractsfhq, _fractsfuhq, _fractsfha, _fractsfsa, _mulqq3, _muluqq3, _mulhq3, _muluhq3, _mulha3, _muluha3, _mulsa3, _mulusa3, _divqq3, _udivuqq3, _divhq3, _udivuhq3, _divha3, _udivuha3, _divsa3, _udivusa3. gcc/ PR target/54222 * avr-modes.def (HA, SA, DA, TA, UTA): Adjust modes. * avr/avr-fixed.md: New file. * avr/avr.md: Include it. (cc): Add: minus. (adjust_len): Add: minus, minus64, ufract, sfract. (ALL1, ALL2, ALL4, ORDERED234): New mode iterators. (MOVMODE): Add: QQ, UQQ, HQ, UHQ, HA, UHA, SQ, USQ, SA, USA. (MPUSH): Add: HQ, UHQ, HA, UHA, SQ, USQ, SA, USA. (pushqi1, xload8_A, xload_8, movqi_insn, *reload_inqi, addqi3, subqi3, ashlqi3, *ashlqi3, ashrqi3, lshrqi3, *lshrqi3, *cmpqi, cbranchqi4, *cpse.eq): Generalize to handle all 8-bit modes in ALL1. (*movhi, reload_inhi, addhi3, *addhi3, addhi3_clobber, subhi3, ashlhi3, *ashlhi3_const, ashrhi3, *ashirhi3_const, lshrhi3, *lshrhi3_const, *cmphi, cbranchhi4): Generalize to handle all 16-bit modes in ALL2. (subhi3, casesi, strlenhi): Add clobber when expanding minus:HI. (*movsi, *reload_insi, addsi3, subsi3, ashlsi3, *ashlsi3_const, ashrsi3, *ashrhi3_const, *ashrsi3_const, lshrsi3, *lshrsi3_const, *reversed_tstsi, *cmpsi, cbranchsi4): Generalize to handle all 32-bit modes in ALL4. * avr-dimode.md (ALL8): New mode iterator. (adddi3, adddi3_insn, adddi3_const_insn, subdi3, subdi3_insn, subdi3_const_insn, cbranchdi4, compare_di2, compare_const_di2, ashrdi3, lshrdi3, rotldi3, ashldi3_insn, ashrdi3_insn, lshrdi3_insn, rotldi3_insn): Generalize to handle all 64-bit modes in ALL8. * config/avr/avr-protos.h (avr_to_int_mode): New prototype. (avr_out_fract, avr_out_minus, avr_out_minus64): New prototypes. * config/avr/avr.c (TARGET_FIXED_POINT_SUPPORTED_P): Return true. (avr_scalar_mode_supported_p): Allow if ALL_FIXED_POINT_MODE_P. (avr_builtin_setjmp_frame_value): Use gen_subhi3 and return new pseudo instead of gen_rtx_MINUS. (avr_print_operand, avr_operand_rtx_cost): Handle: CONST_FIXED. (notice_update_cc): Handle: CC_MINUS. (output_movqi): Generalize to handle respective fixed-point modes. (output_movhi, output_movsisf, avr_2word_insn_p): Ditto. (avr_out_compare, avr_out_plus_1): Also handle fixed-point modes. (avr_assemble_integer): Ditto. (output_reload_in_const, output_reload_insisf): Ditto. (avr_out_fract, avr_out_minus, avr_out_minus64): New functions. (avr_to_int_mode): New function. (adjust_insn_length): Handle: ADJUST_LEN_SFRACT, ADJUST_LEN_UFRACT, ADJUST_LEN_MINUS, ADJUST_LEN_MINUS64. * config/avr/predicates.md (const0_operand): Allow const_fixed. (const_operand, const_or_immediate_operand): New. (nonmemory_or_const_operand): New. * config/avr/constraints.md (Ynn, Y00, Y01, Y02, Ym1, Ym2, YIJ): New constraints.
[Bug other/54330] New: Wrong optimization for code from fixed-bit.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54330 Bug #: 54330 Summary: Wrong optimization for code from fixed-bit.c Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: other AssignedTo: unassig...@gcc.gnu.org ReportedBy: g...@gcc.gnu.org Host: i686-pc-linux-gnu Target: avr Build: i686-pc-linux-gnu Created attachment 28056 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28056 fixed-bit-bug.c: preprocessed bit for fixed.bit.c::__satfractudadq This is a wrong code bug seen while implementing the ISO/IED TR18037 fixed-point support for AVR. == compile == $ avr-gcc fixed-bit-bug.c -mmcu=atmega128 -Os -S -fdump-rtl-expand-details == configure == $ ../../gcc.gnu.org/trunk/configure --target=avr --prefix=/local/gnu/install/gcc-4.8 --disable-nls --with-dwarf2 --enable-target-optspace=yes --enable-languages=c,c++ == Bug == The .expand dump contains a wrong insn, a GTU branch instead of a LEU branch: The code tests if the high bit of a shift result is set by comparing 0x7fff. If the value is less-or-equal, the saturation against 0 must be skipped (goto #76), but the GTU leads to a reversal of the condition. The block that saturates is BB6: (insn 104 103 105 5 (parallel [ (set (cc0) (compare (reg:DI 18 r18) (const_double -1 [0x] 2147483647 [0x7fff] 0 [0] 0 [0] 0 [0] 0 [0]))) (clobber (scratch:QI)) ]) fixed-bit-bug.c:56 -1 (nil)) (jump_insn 105 104 132 5 (set (pc) (if_then_else (gtu (cc0) (const_int 0 [0])) (label_ref 76) (pc))) fixed-bit-bug.c:56 -1 (expr_list:REG_BR_PROB (const_int 6100 [0x17d4]) (nil)) - 76) (note 132 105 29 6 [bb 6] NOTE_INSN_BASIC_BLOCK) (insn 29 132 21 6 (clobber (reg/v:DI 42 [ low ])) fixed-bit-bug.c:56 -1 (nil)) (insn 21 29 22 6 (set (subreg:QI (reg/v:DI 42 [ low ]) 0) (const_int 0 [0])) fixed-bit-bug.c:56 -1 (nil)) All of the following changes lead to correct code, u.e. LEU instead of GTU: * -O1 instead of -O0 * -fno-builtin-memcpy * Using DI mode instead of DQ resp. DA mode, see the respective #define in the attaches test case. Correct code will look like that: (jump_insn 91 90 132 4 (set (pc) (if_then_else (leu (cc0) (const_int 0 [0])) (label_ref:HI 102) (pc))) 444 {difficult_branch} (expr_list:REG_BR_PROB (const_int 5000 [0x1388]) (nil)) - 102) (note 132 91 100 5 [bb 5] NOTE_INSN_BASIC_BLOCK) (insn 100 132 92 5 (clobber (reg/v:DI 42 [ low ])) -1 (nil)) (insn 92 100 93 5 (set (subreg:QI (reg/v:DI 42 [ low ]) 0) (const_int -1 [0x])) -1 (nil))
[Bug other/54330] Wrong optimization for code from fixed-bit.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54330 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-08-20 14:11:30 UTC --- Created attachment 28057 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28057 fixed-bit-bug.c.150r.expand: Correct code if DI used instead of DQ/DA
[Bug other/54330] Wrong optimization for code from fixed-bit.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54330 --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-08-20 14:15:51 UTC --- Created attachment 28058 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28058 fixed-bit-bug.c.150r.expand: Wrong code
[Bug other/54330] Wrong optimization for code from fixed-bit.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54330 --- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-08-20 14:22:46 UTC --- FYI, there is the fixed-point configuration output from ... -E -dM | egrep '(DQ)|(DA)|([^L]LACC)|(LLFRA)' | sort DImode (long long) is 64 bits #define __DA_FBIT__ 32 #define __DA_IBIT__ 31 #define __DQ_FBIT__ 63 #define __DQ_IBIT__ 0 #define __LACCUM_EPSILON__ 0x1P-32LK #define __LACCUM_FBIT__ 32 #define __LACCUM_IBIT__ 31 #define __LACCUM_MAX__ 0X7FFFP-32LK #define __LACCUM_MIN__ (-0X1P30LK-0X1P30LK) #define __LLFRACT_EPSILON__ 0x1P-63LLR #define __LLFRACT_FBIT__ 63 #define __LLFRACT_IBIT__ 0 #define __LLFRACT_MAX__ 0X7FFFP-63LLR #define __LLFRACT_MIN__ (-0.5LLR-0.5LLR) #define __UDA_FBIT__ 32 #define __UDA_IBIT__ 32 #define __UDQ_FBIT__ 64 #define __UDQ_IBIT__ 0 #define __ULACCUM_EPSILON__ 0x1P-32ULK #define __ULACCUM_FBIT__ 32 #define __ULACCUM_IBIT__ 32 #define __ULACCUM_MAX__ 0XP-32ULK #define __ULACCUM_MIN__ 0.0ULK #define __ULLFRACT_EPSILON__ 0x1P-64ULLR #define __ULLFRACT_FBIT__ 64 #define __ULLFRACT_IBIT__ 0 #define __ULLFRACT_MAX__ 0XP-64ULLR #define __ULLFRACT_MIN__ 0.0ULLR
[Bug target/54222] [avr] Implement fixed-point support
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222 --- Comment #4 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-08-24 12:42:53 UTC --- Author: gjl Date: Fri Aug 24 12:42:48 2012 New Revision: 190644 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190644 Log: libgcc/ PR target/54222 * config/avr/lib1funcs-fixed.S: New file. * config/avr/lib1funcs.S: Include it. Undefine some divmodsi after they are used. (neg2, neg4): New macros. (__mulqihi3,__umulqihi3,__mulhi3): Rewrite non-MUL variants. (__mulhisi3,__umulhisi3,__mulsi3): Rewrite non-MUL variants. (__umulhisi3): Speed up MUL variant if there is enough flash. * config/avr/avr-lib.h (TA, UTA): Adjust according to gcc's avr-modes.def. * config/avr/t-avr (LIB1ASMFUNCS): Add: _fractqqsf, _fractuqqsf, _fracthqsf, _fractuhqsf, _fracthasf, _fractuhasf, _fractsasf, _fractusasf, _fractsfqq, _fractsfuqq, _fractsfhq, _fractsfuhq, _fractsfha, _fractsfsa, _mulqq3, _muluqq3, _mulhq3, _muluhq3, _mulha3, _muluha3, _mulsa3, _mulusa3, _divqq3, _udivuqq3, _divhq3, _udivuhq3, _divha3, _udivuha3, _divsa3, _udivusa3. (LIB2FUNCS_EXCLUDE): Add supported functions. gcc/ PR target/54222 * avr-modes.def (HA, SA, DA, TA, UTA): Adjust modes. * avr/avr-fixed.md: New file. * avr/avr.md: Include it. (cc): Add: minus. (adjust_len): Add: minus, minus64, ufract, sfract. (ALL1, ALL2, ALL4, ORDERED234): New mode iterators. (MOVMODE): Add: QQ, UQQ, HQ, UHQ, HA, UHA, SQ, USQ, SA, USA. (MPUSH): Add: HQ, UHQ, HA, UHA, SQ, USQ, SA, USA. (pushqi1, xload8_A, xload_8, movqi_insn, *reload_inqi, addqi3, subqi3, ashlqi3, *ashlqi3, ashrqi3, lshrqi3, *lshrqi3, *cmpqi, cbranchqi4, *cpse.eq): Generalize to handle all 8-bit modes in ALL1. (*movhi, reload_inhi, addhi3, *addhi3, addhi3_clobber, subhi3, ashlhi3, *ashlhi3_const, ashrhi3, *ashirhi3_const, lshrhi3, *lshrhi3_const, *cmphi, cbranchhi4): Generalize to handle all 16-bit modes in ALL2. (subhi3, casesi, strlenhi): Add clobber when expanding minus:HI. (*movsi, *reload_insi, addsi3, subsi3, ashlsi3, *ashlsi3_const, ashrsi3, *ashrhi3_const, *ashrsi3_const, lshrsi3, *lshrsi3_const, *reversed_tstsi, *cmpsi, cbranchsi4): Generalize to handle all 32-bit modes in ALL4. * avr-dimode.md (ALL8): New mode iterator. (adddi3, adddi3_insn, adddi3_const_insn, subdi3, subdi3_insn, subdi3_const_insn, cbranchdi4, compare_di2, compare_const_di2, ashrdi3, lshrdi3, rotldi3, ashldi3_insn, ashrdi3_insn, lshrdi3_insn, rotldi3_insn): Generalize to handle all 64-bit modes in ALL8. * config/avr/avr-protos.h (avr_to_int_mode): New prototype. (avr_out_fract, avr_out_minus, avr_out_minus64): New prototypes. * config/avr/avr.c (TARGET_FIXED_POINT_SUPPORTED_P): Define to... (avr_fixed_point_supported_p): ...this new static function. (TARGET_BUILD_BUILTIN_VA_LIST): Define to... (avr_build_builtin_va_list): ...this new static function. (avr_adjust_type_node): New static function. (avr_scalar_mode_supported_p): Allow if ALL_FIXED_POINT_MODE_P. (avr_builtin_setjmp_frame_value): Use gen_subhi3 and return new pseudo instead of gen_rtx_MINUS. (avr_print_operand, avr_operand_rtx_cost): Handle: CONST_FIXED. (notice_update_cc): Handle: CC_MINUS. (output_movqi): Generalize to handle respective fixed-point modes. (output_movhi, output_movsisf, avr_2word_insn_p): Ditto. (avr_out_compare, avr_out_plus_1): Also handle fixed-point modes. (avr_assemble_integer): Ditto. (output_reload_in_const, output_reload_insisf): Ditto. (avr_compare_pattern): Skip all modes 4 bytes. (avr_2word_insn_p): Skip movuqq_insn, movqq_insn. (avr_out_fract, avr_out_minus, avr_out_minus64): New functions. (avr_to_int_mode): New function. (adjust_insn_length): Handle: ADJUST_LEN_SFRACT, ADJUST_LEN_UFRACT, ADJUST_LEN_MINUS, ADJUST_LEN_MINUS64. * config/avr/predicates.md (const0_operand): Allow const_fixed. (const_operand, const_or_immediate_operand): New. (nonmemory_or_const_operand): New. * config/avr/constraints.md (Ynn, Y00, Y01, Y02, Ym1, Ym2, YIJ): New constraints. * config/avr/avr.h (LONG_LONG_ACCUM_TYPE_SIZE): Define. Added: trunk/gcc/config/avr/avr-fixed.md trunk/libgcc/config/avr/lib1funcs-fixed.S Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-dimode.md trunk/gcc/config/avr/avr-modes.def trunk/gcc/config/avr/avr-protos.h trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/avr.h trunk/gcc/config/avr/avr.md trunk/gcc/config/avr/constraints.md trunk/gcc/config/avr/predicates.md trunk/libgcc/ChangeLog trunk/libgcc/config/avr/avr-lib.h trunk/libgcc/config/avr/lib1funcs.S trunk/libgcc/config/avr/t-avr
[Bug target/54222] [avr] Implement fixed-point support
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222 --- Comment #5 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-08-24 13:01:58 UTC --- Author: gjl Date: Fri Aug 24 13:01:54 2012 New Revision: 190646 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190646 Log: PR target/54222 * config/avr/t-avr (conv_X): Rename to func_X. Modified: trunk/libgcc/ChangeLog trunk/libgcc/config/avr/t-avr
[Bug target/54378] New: code bloat for long shifts
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54378 Bug #: 54378 Summary: code bloat for long shifts Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: g...@gcc.gnu.org Target: avr Something goes woring with cost computaton fir shifts: long ashl32_7 (long x) { return x 7; } compiled with -O2 -dp -mmcu=atmega8 -S -fno-split-wide-types results in ashl32_7: /* DEBUG: cost = 32. */ lsl r22 ; 27*ashlsi3_const/4[length = 8] rol r23 rol r24 rol r25 lsl r22 rol r23 rol r24 rol r25 /* DEBUG: cost = 32. */ lsl r22 ; 28*ashlsi3_const/4[length = 8] rol r23 rol r24 rol r25 lsl r22 rol r23 rol r24 rol r25 /* DEBUG: cost = 32. */ lsl r22 ; 29*ashlsi3_const/4[length = 8] rol r23 rol r24 rol r25 lsl r22 rol r23 rol r24 rol r25 /* DEBUG: cost = 16. */ lsl r22 ; 30*ashlsi3_const/2[length = 4] rol r23 rol r24 rol r25 /* DEBUG: pattern-cost = 4. */ ret ; 26return[length = 1] The insns are already there at .expand
[Bug target/54378] code bloat for long shifts
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54378 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2012-08-26 CC||eric.weddington at atmel ||dot com Ever Confirmed|0 |1 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-08-26 13:06:28 UTC --- ... 3 typo in 2 words Something goes wrong with cost computation for shifts
[Bug target/54461] New: [avr] add configure option for better AVR-Libc integration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54461 Bug #: 54461 Summary: [avr] add configure option for better AVR-Libc integration Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: target AssignedTo: g...@gcc.gnu.org ReportedBy: g...@gcc.gnu.org Target: avr For historical reasons, AVR-Libc implements functions that GCC expects to live in libgcc, namely float functions like __fixsfsi. Currently, avr-gcc is not configurable to accommodate that situation which leads to performance loss if the float support functions from libgcc are used. This happens at least in the following situations: * The user does not specify -lm. -lm should only be needed if function from math.h are used, not for language core features like int i = (int) float. * The application is LTO compiled, i.e. linked with -flto. The plugin machinery passes lgcc -lc lgcc through to the linker by means of -plugin-opt=-pass-through=-lgcc etc. so that -lgcc is linked prior to -lm. * The user uses fixed - float conversion routines from libgcc. These routines refer float functions, and the linker resolves these function in libgcc if they are there. * avr-g++ is used as linker driver. See also PR28718 and http://lists.gnu.org/archive/html/avr-gcc-list/2012-08/msg00070.html
[Bug target/54461] [avr] add configure option for better AVR-Libc integration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54461 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4 Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2012-09-02 CC||eric.weddington at atmel ||dot com Target Milestone|--- |4.7.2 Ever Confirmed|0 |1 Severity|normal |enhancement
[Bug target/54220] [avr] Potential stack corruption in naked functions at -O0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54220 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-04 09:08:54 UTC --- Author: gjl Date: Tue Sep 4 09:08:50 2012 New Revision: 190914 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190914 Log: PR target/54220 * config/avr/avr.c (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): New define to... (avr_allocate_stack_slots_for_args): ...this new static function. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr.c
[Bug target/54220] [avr] Potential stack corruption in naked functions at -O0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54220 --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-04 09:14:40 UTC --- Author: gjl Date: Tue Sep 4 09:14:36 2012 New Revision: 190916 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190916 Log: Backport from 2012-09-04 mainline r190914 PR target/54220 * config/avr/avr.c (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): New define to... (avr_allocate_stack_slots_for_args): ...this new static function. Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/config/avr/avr.c
[Bug target/54220] [avr] Potential stack corruption in naked functions at -O0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54220 --- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-04 09:21:24 UTC --- Author: gjl Date: Tue Sep 4 09:21:20 2012 New Revision: 190917 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190917 Log: Backport from 2012-09-04 mainline r190914 PR target/54220 * config/avr/avr.c (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): New define to... (avr_allocate_stack_slots_for_args): ...this new static function. Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/config/avr/avr.c
[Bug target/54220] [avr] Potential stack corruption in naked functions at -O0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54220 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Target|AVR |avr Priority|P3 |P4 Status|UNCONFIRMED |RESOLVED CC||gjl at gcc dot gnu.org Known to work||4.6.4, 4.7.2 Resolution||FIXED Target Milestone|--- |4.7.2 Known to fail||4.6.3, 4.7.1 --- Comment #4 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-04 09:25:52 UTC --- Done.
[Bug target/54476] Passing -1 to __builtin_avr_delay_cycles causes cc1 memory usage to explode on x86_64 host
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54476 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-04 09:37:11 UTC --- Author: gjl Date: Tue Sep 4 09:37:08 2012 New Revision: 190920 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190920 Log: PR target/54476 * config/avr/avr.c (avr_expand_delay_cycles): Mask operand with SImode. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr.c
[Bug target/54476] Passing -1 to __builtin_avr_delay_cycles causes cc1 memory usage to explode on x86_64 host
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54476 --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-04 09:38:48 UTC --- Author: gjl Date: Tue Sep 4 09:38:42 2012 New Revision: 190921 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190921 Log: Backport from 2012-09-04 mainline r190920 PR target/54476 * config/avr/avr.c (avr_expand_delay_cycles): Mask operand with SImode. Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/config/avr/avr.c
[Bug target/54476] [avr] __builtin_avr_delay_cycles (-1ul) causes memory usage to explode on x86_64 host
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54476 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Target|AVR |avr Priority|P3 |P4 Status|UNCONFIRMED |RESOLVED Keywords||compile-time-hog, ||memory-hog CC||gjl at gcc dot gnu.org Host|Linux x86_64|x86_64-linux-gnu Resolution||FIXED Summary|Passing -1 to |[avr] |__builtin_avr_delay_cycles |__builtin_avr_delay_cycles |causes cc1 memory usage to |(-1ul) causes memory usage |explode on x86_64 host |to explode on x86_64 host Target Milestone|--- |4.7.2 Build|4.8.0 20120903 | --- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-04 09:44:02 UTC --- Fixed
[Bug target/54461] [avr] add configure option for better AVR-Libc integration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54461 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-05 08:48:00 UTC --- Author: gjl Date: Wed Sep 5 08:47:50 2012 New Revision: 190967 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190967 Log: PR target/54461 * configure.ac (noconfigdirs,target=avr-*-*): Add target-newlib, target-libgloss if not configured --with-avrlibc=no. * configure: Regenerate. libgcc/ PR target/54461 * config.host (tmake_file,host=avr-*-*): Add avr/t-avrlibc if not configured --with-avrlibc=no. * config/avr/t-avrlibc: New file. * Makefile.in (FPBIT_FUNCS): filter-out LIB2FUNCS_EXCLUDE. (DPBIT_FUNCS): Ditto. (TPBIT_FUNCS): Ditto. gcc/ PR target/54461 * config.gcc (tm_file,target=avr-*-*): Add avr/avrlibc.h if not configured --with-avrlibc=no. (tm_defines,target=avr-*-*): Add WITH_AVRLIBC if not configured --with-avrlibc=no. * config/avr/avrlibc.h: New file. * config/avr/avr-c.c: Build-in define __WITH_AVRLIBC__ if not configured --with-avrlibc=no. * doc/invoke.texi (AVR Built-in Macros): Document __WITH_AVRLIBC__ Added: trunk/gcc/config/avr/avrlibc.h trunk/libgcc/config/avr/t-avrlibc Modified: trunk/ChangeLog trunk/configure trunk/configure.ac trunk/gcc/ChangeLog trunk/gcc/config.gcc trunk/gcc/config/avr/avr-c.c trunk/gcc/doc/invoke.texi trunk/libgcc/ChangeLog trunk/libgcc/Makefile.in trunk/libgcc/config.host
[Bug other/54490] New: ICE: Spill failure in newlib build
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54490 Bug #: 54490 Summary: ICE: Spill failure in newlib build Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Keywords: ice-on-valid-code, ra Severity: major Priority: P3 Component: other AssignedTo: unassig...@gcc.gnu.org ReportedBy: g...@gcc.gnu.org Target: avr ../../gcc.gnu.org/gcc-4_7-branch/configure --target=avr --prefix=/local/gnu/install/gcc-4.7 --disable-nls --with-dwarf2 --enable-languages=c,c++ --enable-target-optspace=yes --enable-checking=rtl,yes For this configure, the build aborts with a spill fail ICE if newlib is in the source path. SVN is from today's (2012-09-05) gcc-4_7-branch /home/georg/gnu/build/gcc-4.7-avr/./gcc/xgcc -B/home/georg/gnu/build/gcc-4.7-avr/./gcc/ -nostdinc -B/home/georg/gnu/build/gcc-4.7-avr/avr/avr25/newlib/ -isystem /home/georg/gnu/build/gcc-4.7-avr/avr/avr25/newlib/targ-include -isystem /home/georg/gnu/gcc.gnu.org/gcc-4_7-branch/newlib/libc/include -B/home/georg/gnu/build/gcc-4.7-avr/avr/avr25/libgloss/avr -L/home/georg/gnu/build/gcc-4.7-avr/avr/avr25/libgloss/libnosys -L/home/georg/gnu/gcc.gnu.org/gcc-4_7-branch/libgloss/avr -B/local/gnu/install/gcc-4.7/avr/bin/ -B/local/gnu/install/gcc-4.7/avr/lib/ -isystem /local/gnu/install/gcc-4.7/avr/include -isystem /local/gnu/install/gcc-4.7/avr/sys-include -mmcu=avr25 -DPACKAGE_NAME=\newlib\ -DPACKAGE_TARNAME=\newlib\ -DPACKAGE_VERSION=\1.18.0\ -DPACKAGE_STRING=\newlib\ 1.18.0\ -DPACKAGE_BUGREPORT=\\ -I. -I../../../../../../../gcc.gnu.org/gcc-4_7-branch/newlib/libc/stdlib -Os -DPREFER_SIZE_OVER_SPEED -mcall-prologues -DNO_EXEC -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES -fno-builtin -g -Os -mmcu=avr25 -c -o lib_a-mprec.o `test -f 'mprec.c' || echo '../../../../../../../gcc.gnu.org/gcc-4_7-branch/newlib/libc/stdlib/'`mprec.c ../../../../../../../gcc.gnu.org/gcc-4_7-branch/newlib/libc/stdlib/mprec.c: In function '__multiply': ../../../../../../../gcc.gnu.org/gcc-4_7-branch/newlib/libc/stdlib/mprec.c:419:1: error: unable to find a register to spill in class 'POINTER_REGS' ../../../../../../../gcc.gnu.org/gcc-4_7-branch/newlib/libc/stdlib/mprec.c:419:1: error: this is the insn: (insn 98 97 101 12 (set (reg:SI 75 [ D.2858 ]) (mem:SI (post_inc:HI (reg:HI 16 r16 [orig:50 ivtmp.180 ] [50])) [16 MEM[base: D.3213_188, offset: 0B]+0 S4 A8])) ../../../../../../../gcc.gnu.org/gcc-4_7-branch/newlib/libc/stdlib/mprec.c:370 36 {*movsi} (expr_list:REG_INC (reg:HI 16 r16 [orig:50 ivtmp.180 ] [50]) (nil))) ../../../../../../../gcc.gnu.org/gcc-4_7-branch/newlib/libc/stdlib/mprec.c:419:1: internal compiler error: in spill_failure, at reload1.c:2120 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. make[8]: *** [lib_a-mprec.o] Error 1 make[8]: Leaving directory `/local/gnu/build/gcc-4.7-avr/avr/avr25/newlib/libc/stdlib' make[7]: *** [all-recursive] Error 1 make[7]: Leaving directory `/local/gnu/build/gcc-4.7-avr/avr/avr25/newlib/libc' make[6]: *** [all-recursive] Error 1 make[6]: Leaving directory `/local/gnu/build/gcc-4.7-avr/avr/avr25/newlib' make[5]: *** [all] Error 2 make[5]: Leaving directory `/local/gnu/build/gcc-4.7-avr/avr/avr25/newlib' make[4]: *** [multi-do] Error 1 make[4]: Leaving directory `/local/gnu/build/gcc-4.7-avr/avr/newlib' make[3]: *** [all-multi] Error 2 make[3]: Leaving directory `/local/gnu/build/gcc-4.7-avr/avr/newlib' make[2]: *** [all] Error 2 make[2]: Leaving directory `/local/gnu/build/gcc-4.7-avr/avr/newlib' make[1]: *** [all-target-newlib] Error 2 make[1]: Leaving directory `/local/gnu/build/gcc-4.7-avr' make: *** [all] Error 2
[Bug other/54490] [4.7 Regression] ICE: Spill failure in newlib build
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54490 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2012-09-05 CC||eric.weddington at atmel ||dot com Ever Confirmed|0 |1
[Bug target/54461] [avr] add configure option for better AVR-Libc integration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54461 --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-05 12:19:54 UTC --- Author: gjl Date: Wed Sep 5 12:19:47 2012 New Revision: 190973 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190973 Log: Backport from 2012-09-05 mainline r190697. PR target/54461 * configure.ac (noconfigdirs,target=avr-*-*): Add target-newlib, target-libgloss if configured --with-avrlibc. * configure: Regenerate. libgcc/ Backport from 2012-09-05 mainline r190697. PR target/54461 * config.host (tmake_file,host=avr-*-*): Add avr/t-avrlibc if configured --with-avrlibc. * Makefile.in (FPBIT_FUNCS): filter-out LIB2FUNCS_EXCLUDE. (DPBIT_FUNCS): Ditto. (TPBIT_FUNCS): Ditto. * config/avr/t-avrlibc: New file. gcc/ Backport from 2012-09-05 mainline r190697. PR target/54461 * config.gcc (tm_file,target=avr-*-*): Add avr/avrlibc.h if configured --with-avrlibc. (tm_defines,target=avr-*-*): Add WITH_AVRLIBC if configured --with-avrlibc. * config/avr/avrlibc.h: New file. * config/avr/avr-c.c: Build-in define __WITH_AVRLIBC__ if configured --with-avrlibc. * doc/invoke.texi (AVR Built-in Macros): Document __WITH_AVRLIBC__ Added: branches/gcc-4_7-branch/gcc/config/avr/avrlibc.h branches/gcc-4_7-branch/libgcc/config/avr/t-avrlibc Modified: branches/gcc-4_7-branch/ChangeLog branches/gcc-4_7-branch/configure branches/gcc-4_7-branch/configure.ac branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/config.gcc branches/gcc-4_7-branch/gcc/config/avr/avr-c.c branches/gcc-4_7-branch/gcc/doc/invoke.texi branches/gcc-4_7-branch/libgcc/ChangeLog branches/gcc-4_7-branch/libgcc/Makefile.in branches/gcc-4_7-branch/libgcc/config.host
[Bug target/54461] [avr] add configure option for better AVR-Libc integration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54461 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-05 12:23:00 UTC --- Fixed in 4.7.2
[Bug driver/28718] Call to -lgcc added prior to user libraries
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28718 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||DUPLICATE --- Comment #12 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-05 13:02:24 UTC --- Not really a doublicate of PR54461, but the new configure option --with-avrlibc introduced in 4.7.2 solves the issue by removing the doublicate functions from libgcc so that the optimized versions from AVR-Libc will be used no matter how the -l order is. *** This bug has been marked as a duplicate of bug 54461 ***
[Bug target/54461] [avr] add configure option for better AVR-Libc integration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54461 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added CC||j at uriah dot heep.sax.de --- Comment #4 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-05 13:02:24 UTC --- *** Bug 28718 has been marked as a duplicate of this bug. ***
[Bug other/54490] [4.7 Regression] ICE: Spill failure in newlib build
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54490 --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-05 21:24:40 UTC --- I see hundreds of spill fails riunning the test suite -- with AVR-Libc. Some months ago, 2 or 3 pathological test cases failes with spill fails. Now there are hundreds of fails for simple test cases...
[Bug driver/28718] Call to -lgcc added prior to user libraries
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28718 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|RESOLVED|NEW Last reconfirmed||2012-09-05 CC||gdr at gcc dot gnu.org Resolution|DUPLICATE | Ever Confirmed|0 |1 --- Comment #14 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-05 21:35:00 UTC --- CCing Gaby. He is the only one I know of who is committed to C++ and avr. (In reply to comment #13) All this is fighting the symptoms though. My point (as outlined in comment #8) is: When operating as a C compiler, *all* user-supplied libraries are passed to the linker *first*, followed by system libraries. When operating as a C++ compiler, libstdc++ and libm.a are passed *before* any user-supplied library. This leaves the users in a situation where they are no longer able to supply own overrides for some functions in system libraries. Again, all this is in contrast to how the C compiler works. In the AVR case, the situation is only worse since there's no libstdc++ (yet), and somehow, libgcc is substituted in place of libstdc++ (which I think is a completely flawed idea from the beginning). So despite all the artefacts which leaded to this bug report, I think at least the last point mentioned is worth fixing: if there's no libstdc++, there's no point in trying to pretend libgcc could be supplied as a replacement for libstdc++. (The AVR-related artefacts are now mostly fixed after Johann's recent work, the original bug(s) remain(s).) Ok, I untied the two PRs again and set this one to NEW.
[Bug middle-end/54386] Unaligned mem load wrongly generated for inlined inline/static function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54386 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added CC||gjl at gcc dot gnu.org --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-06 14:50:41 UTC --- Who expands the 8-bit loads? Is there an implicit memcpy, expanded in movmem*?
[Bug target/54536] [avr]: incorrect crt with -mmcu=at90usb1287
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54536 --- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-10 10:43:25 UTC --- Author: gjl Date: Mon Sep 10 10:43:20 2012 New Revision: 191132 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191132 Log: PR target/54536 * config/avr/avr-mcus.def (at90usb1287): Set LIBRARY_NAME to usb1287. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-mcus.def
[Bug target/54536] [avr]: incorrect crt with -mmcu=at90usb1287
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54536 --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-10 10:46:31 UTC --- Author: gjl Date: Mon Sep 10 10:46:27 2012 New Revision: 191133 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191133 Log: Backport from 2012-09-10 mainline r191132. PR target/54536 * config/avr/avr-mcus.def (at90usb1287): Set LIBRARY_NAME to usb1287. Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/config/avr/avr-mcus.def
[Bug target/54536] [avr]: incorrect crt with -mmcu=at90usb1287
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54536 --- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-10 10:51:21 UTC --- Author: gjl Date: Mon Sep 10 10:51:13 2012 New Revision: 191134 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191134 Log: Backport from 2012-09-10 mainline r191132. PR target/54536 * config/avr/avr-devices.c (avr_mcu_types[at90usb1287]): Set .library_name to usb1287. Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/config/avr/avr-devices.c
[Bug target/54536] [avr]: incorrect crt with -mmcu=at90usb1287
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54536 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P5 Status|UNCONFIRMED |RESOLVED CC||gjl at gcc dot gnu.org Known to work||4.6.4 Resolution||FIXED Target Milestone|--- |4.7.2 Known to fail||4.6.3, 4.7.1 --- Comment #4 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-10 10:54:41 UTC --- Fixed in 4.7.2, 4.6.4.