Re: [patch,avr] Overhaul avr-ifelse RTL optimization pass

2024-08-25 Thread Denis Chertykov
вс, 25 авг. 2024 г. в 17:55, Jeff Law : > > > On 8/23/24 6:20 AM, Richard Biener wrote: > > On Fri, Aug 23, 2024 at 2:16 PM Georg-Johann Lay wrote: > >> > >> This patch overhauls the avr-ifelse mini-pass that optimizes > >> two cbranch insns to one comparison and two branches. > >> > >> More opti

Re: [patch,avr] Overhaul avr-ifelse RTL optimization pass

2024-08-26 Thread Denis Chertykov
вс, 25 авг. 2024 г. в 20:15, Denis Chertykov : > > > > вс, 25 авг. 2024 г. в 17:55, Jeff Law : >> >> >> >> On 8/23/24 6:20 AM, Richard Biener wrote: >> > On Fri, Aug 23, 2024 at 2:16 PM Georg-Johann Lay wrote: >> >> >> >> T

Re: [patch,avr] Move pass related code to avr-passes.cc

2024-08-29 Thread Denis Chertykov
чт, 29 авг. 2024 г. в 12:22, Georg-Johann Lay : > This patch adds a new C++ module avr-passes.cc for the avr-specific > passes. > > There are currently 5 avr-specific passes, and since avr.cc has > gotten fat, this patch moves the respective classes and support > functions to avr-passes.cc. > > Co

Re: [ping^2,patch,avr,v2] PR115830: Make better use of SREG

2024-08-29 Thread Denis Chertykov
чт, 29 авг. 2024 г. в 12:42, Georg-Johann Lay : > > Ping #2 for the patch to make better use of SREG, and some > code clean-ups for trunk. No new regressions. > > #0 https://gcc.gnu.org/pipermail/gcc-patches/2024-August/659422.html > #1 https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660743.

Re: [patch,avr] Run pass avr-fuse-add a second time

2024-08-31 Thread Denis Chertykov
пт, 30 авг. 2024 г. в 16:09, Georg-Johann Lay : > > There are cases, where opportunities to use POST_INC addressing > only occur very late in the compilation process. Take for example > the following function from AVR-LibC's qsort: > > void swapfunc (char *a, char *b, int n) > { > do > {

Re: [patch,avr] Adjust comment headers

2024-09-02 Thread Denis Chertykov
пн, 2 сент. 2024 г. в 12:10, Georg-Johann Lay : > > Am 02.09.24 um 09:18 schrieb Jan Dubiec: > > On 02.09.2024 08:49, Georg-Johann Lay wrote: > >> Atmel is no more the AVR manufacturer. This patch removes the > >> manufacturer from the file headers. > >> > >> Ok for trunk? > > In this context, mic

Re: [patch,avr] Rework avr_out_compare

2024-09-13 Thread Denis Chertykov
чт, 12 сент. 2024 г. в 17:32, Georg-Johann Lay : > > This patch reworks avr_out_compare: > > Use new convenient helper functions that may be useful in > other output functions, too. > > Generalized some special cases that only work for EQ and NE > comparisons. For example, with the patch > > ;; R2

Re: [patch,avr] Make more use of avr_byte()

2024-09-13 Thread Denis Chertykov
пт, 13 сент. 2024 г. в 15:08, Georg-Johann Lay : > > This is a no-op change that uses the recently added avr_byte() > function instead of simplify_gen_subreg (QImode, ... > > Ok for trunk? Ok. Please, apply. Denis > > Johann > > -- > > AVR: Use avr_byte instead of simplify_gen_subreg (QImod

Re: [patch,avr] Recognize more opportunities for skip

2024-09-13 Thread Denis Chertykov
пт, 13 сент. 2024 г. в 20:41, Georg-Johann Lay : > > The transparent call insns like "*parityhi2.libgcc" output a single > [R]CALL instruction that can be skipped by the skip instructions. > Such insns have attribute "type" of "xcall" and can therefore > be easily recognized. > > Ok for trunk? Ple

Re: [patch,avr] copysign: Use copysign rtx code, allow const_double

2024-09-14 Thread Denis Chertykov
сб, 14 сент. 2024 г. в 13:00, Georg-Johann Lay : > > This uses new rtx code copysign instead of an unspec. > It also allows const_double as 2nd operand because gcc > does not optimize code like > > __builtin_copysignf (x, -1.0f); > > Ok for trunk? Ok. Please apply. Denis. > > Johann > > -- > >

Re: [patch,avr] Tidy up enum and struct tags and rtx_code.

2024-09-15 Thread Denis Chertykov
сб, 14 сент. 2024 г. в 14:29, Georg-Johann Lay : > > This patch tidies up enum and struct tags that are > not required in C++. It also uses rtx_code for > RTX codes instead of RTX_CODE. RTX_CODE is now only > used in #ifdef's in avr-protos.h. > > Ok for trunk? Ok. Please apply. Denis. > > Joha

Re: [patch, avr] Tweak unsigned compares with consts that are 0 mod 256.

2024-09-16 Thread Denis Chertykov
вс, 15 сент. 2024 г. в 19:32, Georg-Johann Lay : > > Unsigned comparisons may skip comparing the lower bytes when > the according bytes of the constant are all zeros. For example, > > uint16 >= 0x1200 > > is true iff > > hi8 (uint16) >= hi8 (0x1200) > > and similar for uint16 < 0x1200.

Re: [patch,avr] Update AVR-LibC web links to GitHub

2024-09-16 Thread Denis Chertykov
пн, 16 сент. 2024 г. в 19:45, Georg-Johann Lay : > > AVR-LibC has been moved to GitHub a while ago. This patch > adjusts web links to the documentation and to the project > page. > > Ok for trunk? Please apply. Denis. > > Johann > > -- > > AVR: Update weblinks to AVR-LibC. > > AVR-LibC has move

Re: RFA: fix some avr stdint issues

2013-08-26 Thread Denis Chertykov
2013/8/26 Joern Rennecke : > This patch fixes the gcc.dg/c99-stdint-5.c and gcc.dg/c99-stdint-6.c excess > error > failures. > > Tested for atmega128-sim. > > OK to apply? > > 2013-05-26 Joern Rennecke > > * config/avr/avr-stdint.h (INT16_TYPE): Change default to "int". > (UINT16

Re: RFA: fix avr gcc.dg/fixed-point/convert-accum-neg.c execution failure

2013-08-26 Thread Denis Chertykov
2013/8/26 Joern Rennecke : > The gcc.dg/fixed-point/convert-accum-neg.c execution test fails for avr > because for fractional integer to accumulator / integer conversions, > the avr target rounds towards -infinity, whereas we are supposed to round > towards 0. > > The attached patch implements roun

Re: [Patch,avr]: Ad PR rtl-optimization/52543: Undo the MEM->UNSPEC hack

2012-09-30 Thread Denis Chertykov
2012/9/30 Georg-Johann Lay : > Denis Chertykov schrieb: >> >> Georg-Johann Lay: >> >>> PR52543 required to represent a load from non-generic address spaces as >>> UNSPEC >>> instead of as MEM to avoid a gross code bloat. >>> >>> htt

Re: [Patch,avr]: Ad PR rtl-optimization/52543: Undo the MEM->UNSPEC hack

2012-10-01 Thread Denis Chertykov
2012/9/30 Georg-Johann Lay : >> Denis Chertykov wrote: >> I have tried to use secondary a few years ago (may be 5 or 7). >> I have definitely remember only one thing: secondary reload should be >> avoided as long as possible. > > > Currently each mov has to be dec

Re: [Patch,avr]: Remove -mshort-calls option

2012-10-06 Thread Denis Chertykov
2012/10/5 Georg-Johann Lay : > As already discussed, this patch removes the -mshort-calls command option from > avr-gcc. > > Ok to apply? > > If the change is on order, changes to wwwdocs will follow, i.e. deprecate the > option in 4.7 and tell it is removed in the 4.8 caveats. > > Johann > > >

Re: [Patch,avr] Tidy up avr_extra_arch_macro

2012-10-17 Thread Denis Chertykov
2012/10/17 Georg-Johann Lay : > avr_extra_arch_macro is not really needed, it just holds > avr_current_device->macro. > > Thus, this tiny tidy up. > > Ok for trunk? > > Johann > > > * config/avr/avr-arch.h (avr_extra_arch_macro): Remove prototype. > * config/avr/avr.c (avr_extra_ar

Re: [avr] Use unsigned int rather than double_int for insert_bits

2013-11-03 Thread Denis Chertykov
2013/11/3 Richard Sandiford : > The __builtin_avr_insert_bits code uses a double_int to handle the mask, > but AIUI the mask has exactly 32 bits. Is that right? If so, would it be > OK to use "unsigned int" instead? I realise this might seem like pointless > churn, but it would help out with the

Re: [Patch, avr] Restore default value of PARAM_ALLOW_STORE_DATA_RACES to 1

2016-02-02 Thread Denis Chertykov
2016-02-01 16:56 GMT+03:00 Senthil Kumar Selvaraj : > > Hi, > > This patch sets PARAM_ALLOW_STORE_DATA_RACES to 1 (the default until > a year back), to avoid code size regressions in trunk (and probably > 5.x )for the AVR target. > > Consider the following piece of code > > volatile int z;

Re: wide-int, avr

2013-12-03 Thread Denis Chertykov
2013/11/23 Mike Stump : > Richi has asked the we break the wide-int patch so that the individual port > and front end maintainers can review their parts without have to go through > the entire patch.This patch covers the avr port. > > Ok? > Ok. Excuse my long delay. I was on vacation. Pleas

Re: [Ping, avr] Emit diagnostics if -f{pic,PIC,pie,PIE} or -shared is passed

2013-12-03 Thread Denis Chertykov
2013/11/18 Senthil Kumar Selvaraj : > Ping! > > Regards > Senthil > > On Mon, Nov 04, 2013 at 06:45:19PM +0530, Senthil Kumar Selvaraj wrote: >> The AVR backend does not generate position independent code, yet it >> happily accepts -fpic, -fPIC, -fpie and -fPIE. The generated code >> doesn't change

Re: [patch,avr] Fix PR66956: Uses 32->64 widening mul instead of 32-bit mul libcall without MUL.

2015-07-21 Thread Denis Chertykov
2015-07-21 15:54 GMT+03:00 Georg-Johann Lay : > This works around an assumption in optabs, namely that if a widening-mul > insn is available but no mul3 insn, then the widening multiplication > insn is preferred over expanding the multiply as a libcall. > > The problem occurs only if !AVR_HAVE_MUL

Re: [Patch, avr] Fix PR 67839 - bit addressable instructions generated for out of range addresses

2015-10-28 Thread Denis Chertykov
2015-10-28 9:28 GMT+03:00 Senthil Kumar Selvaraj : > > Ping! > > Regards > Senthil > On Fri, Oct 16, 2015 at 03:17:17PM +0530, Senthil Kumar Selvaraj wrote: > > Ping! > > > > Regards > > Senthil > > > > On Mon, Oct 05, 2015 at 02:30:58PM +0530, Senthil Kumar Selvaraj wrote: > > > Hi, > > > > > >

Re: [patch, avr] Add new Atmel AVR devices

2015-11-18 Thread Denis Chertykov
2015-11-18 9:36 GMT+03:00 Sivanupandi, Pitchumani : > Attached patch adds new Atmel devices to avr-gcc. > If Ok, could someone commit please? I do not have commit access. > > Regards, > Pitchumani > > gcc/ChangeLog > > 2015-11-18 Pitchumani Sivanupandi > > * config/avr/avr-mcus.def: Add

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

2017-06-12 Thread Denis Chertykov
2017-06-12 11:40 GMT+04:00 Georg-Johann Lay : > On 12.06.2017 08:30, Pitchumani Sivanupandi wrote: >> >> On Friday 09 June 2017 03:59 PM, Georg-Johann Lay wrote: >>> >>> Hi, >>> >>> This patch adds support for devices that can access flash memory >>> by LD* instructions, hence there is no need to p

Re: [patch,avr] Implement PR83737

2018-01-08 Thread Denis Chertykov
2018-01-08 20:19 GMT+04:00 Georg-Johann Lay : > This PR skips saving of any registers in main. > > Attribute OS_main can do this as well, however we can just drop > any saves / restores in all optimized compilation -- not even > the test suite needs these saves. > > The feature can still be switche

[PATCH,avr] Fix PR84209 code issue due to post-reload split of SP into 2 QI regs

2018-02-07 Thread Denis Chertykov
Committed. 2018-01-09 Georg-Johann Lay PR target/84209 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros. * config/avr/avr.md: Only post-reload split REG-REG moves if either register is REGERAL_REG_P. --- config/avr/avr.h (revision 257384) +++ config/av

Re: [wwwdocs] AVR entry in readings.htmls

2018-03-11 Thread Denis Chertykov
This is a new one. http://www.microchip.com/design-centers/8-bit/microchip-avr-mcus 2018-03-10 20:15 GMT+04:00 Gerald Pfeifer : > It appears this link at atmel.com has been taken down without > what appears a replacement, so I applied the patch below. > > Denis, if you have a new reference, happy

Re: [patch, avr] Remove avr devices that are not released

2014-08-22 Thread Denis Chertykov
2014-08-20 18:36 GMT+04:00 Sivanupandi, Pitchumani : > Attached patch removes avr devices that are not released > (may not be released in near future also). > > If OK, could someone commit please? > > Regards, > Pitchumani > > gcc/ChangeLog > > 2014-08-20 Pitchumani Sivanupandi > > * config/a

Re: RFA: AVR: add infrastructure for device packages

2014-10-09 Thread Denis Chertykov
2014-10-08 21:50 GMT+04:00 Joern Rennecke : > As the steering commitee still hasn't spoken on the maintainership issue, > apparently this still has to go the write-after-approval route. > > The purpose of this patch is to make it possible to add support for new > devices (MCUs) to the AVR toolchain

Re: [patch,avr] tweak sign extensions

2014-10-23 Thread Denis Chertykov
2014-10-23 17:48 GMT+04:00 Georg-Johann Lay : > This optimization makes most sign-extensions one instruction shorter in the > case when the source register may be clobbered and the register numbers are > different. Source and destination may overlap. > > Ok for trunk? > > > Johann > > gcc/ >

Re: [patch,avr,committed]: Fix coding rules.

2014-10-23 Thread Denis Chertykov
2014-10-23 16:33 GMT+04:00 Georg-Johann Lay : > This no-op change fixed typos and restored coding rules as obvious like: > spaces around operators, space before opening parentheses, wrapping long > lines, indentation rules, trailing blanks, etc... > > http://gcc.gnu.org/r216592 > > > Johann > > gcc

Re: [patch,avr] tweak sign extensions, take #2

2014-10-24 Thread Denis Chertykov
2014-10-24 14:37 GMT+04:00 Georg-Johann Lay : > Am 10/23/2014 08:16 PM schrieb Denis Chertykov: >>> >>> This optimization makes most sign-extensions one instruction shorter in >>> the >>> case when the source register may be clobbered and the register num

Re: [patch,avr] atmel avr new devices set-2

2014-06-03 Thread Denis Chertykov
2014-06-03 18:26 GMT+04:00 S, Pitchumani : > Hi, > > Attached patch adds support for Atmel devices tiny441, tiny828 and tiny841. > > Please commit if the patch is OK. > > Note: This is continuation of patch attached in > https://gcc.gnu.org/ml/gcc-patches/2014-06/msg00049.html > > Regards, > Pitchu

Re: [patch,avr] atmel avr new devices set-1

2014-06-03 Thread Denis Chertykov
2014-06-02 13:47 GMT+04:00 S, Pitchumani : > Hi, > > Attached patch adds support for Atmel ATA devices (ata6616c, > ata6617c, ata664251, ata6612c, ata6613c and ata6614q). > > Please commit if the patch is OK. I do not have commit access. > > Regards, > Pitchumani > > gcc/ChangeLog > 2014-06-02 Vis

Re: [patch,avr] Fix ICE PR61443

2014-06-11 Thread Denis Chertykov
2014-06-11 13:05 GMT+04:00 Georg-Johann Lay : > This is a fix for unrecognizable insn ICE where the push expander generated > (subreg(mem)) for non-generic address-space locations. > > Instead of loading byte-wise and legitimizing such expressions, it's easier > and results in better code when we l

Re: [patch, avr] Restore base register if not marked dead/unused

2015-05-25 Thread Denis Chertykov
2015-05-19 16:04 GMT+03:00 Sivanupandi, Pitchumani : > Test gcc.c-torture/execute/memcpy-bi.c (-O2) failed for attiny40 device. > Cause seems to be in "load from memory" as it is not restoring base > register after load instructions generated. > > Function avr_out_load_psi_reg_no_disp_tiny in avr.c

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

2015-04-16 Thread Denis Chertykov
2015-04-16 19:47 GMT+03:00 Georg-Johann Lay : > > Am 04/16/2015 um 11:28 AM schrieb Senthil Kumar Selvaraj: >> >> On Thu, Apr 16, 2015 at 11:02:05AM +0200, Georg-Johann Lay wrote: >>> >>> Am 04/16/2015 um 08:43 AM schrieb Senthil Kumar Selvaraj: This patch fixes PR 65657. >>> >>> >>> The

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

2015-04-17 Thread Denis Chertykov
2015-04-17 10:46 GMT+03:00 Senthil Kumar Selvaraj : > > On Thu, Apr 16, 2015 at 06:47:26PM +0200, Georg-Johann Lay wrote: > > Am 04/16/2015 um 11:28 AM schrieb Senthil Kumar Selvaraj: > > >On Thu, Apr 16, 2015 at 11:02:05AM +0200, Georg-Johann Lay wrote: > > >>Am 04/16/2015 um 08:43 AM schrieb Sent

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

2015-04-17 Thread 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 port is not locked for patches. It's not a primary targ

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

2015-04-17 Thread Denis Chertykov
2015-04-17 18:32 GMT+03:00 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 >>> >>

Re: [patch, avr] extend part-clobbered check to AVR_TINY architecture

2015-05-10 Thread Denis Chertykov
chumani >> Sent: Tuesday, April 21, 2015 8:21 PM >> To: Georg-Johann Lay; Denis Chertykov >> Cc: GCC Patches >> Subject: [patch, avr] extend part-clobbered check to AVR_TINY architecture >> >> Hi, >> >> When tried backporting AVR_TINY architecture su

Re: [patch, avr] extend part-clobbered check to AVR_TINY architecture

2015-05-11 Thread Denis Chertykov
2015-05-11 9:07 GMT+03:00 Sivanupandi, Pitchumani : >> -Original Message- >> From: Denis Chertykov [mailto:cherty...@gmail.com] >> Sent: Sunday, May 10, 2015 12:55 PM >> To: Sivanupandi, Pitchumani >> Cc: Georg-Johann Lay; GCC Patches >> Subject: Re

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

2015-02-25 Thread Denis Chertykov
2015-02-24 16:09 GMT+03:00 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,

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

2015-02-26 Thread Denis Chertykov
2015-02-25 18:56 GMT+03:00 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. >

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

2015-02-28 Thread 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 (right >> before .*free_cfg) so that cfg and hence d

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

2015-03-02 Thread Denis Chertykov
2015-03-02 15:32 GMT+03:00 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

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

2015-03-02 Thread Denis Chertykov
2015-03-02 22:40 GMT+03:00 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

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

2015-03-09 Thread Denis Chertykov
2015-03-09 19:02 GMT+03:00 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 >>> >>> - Cle

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

2015-03-11 Thread Denis Chertykov
2015-03-10 18:02 GMT+03:00 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 res

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

2015-03-16 Thread Denis Chertykov
2015-03-16 21:17 GMT+03:00 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 pat

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

2015-04-08 Thread 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 find specs file. > > > > This is because

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

2015-02-17 Thread 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) > (const_int 17)) 0)) > > after elimination. > > Attached

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

2015-02-18 Thread Denis Chertykov
2015-02-18 14:59 GMT+03:00 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 >>&g

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

2015-02-23 Thread Denis Chertykov
2015-02-23 13:53 GMT+03:00 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] Include stdfix-avrlibc.h in stdfix.h

2015-02-23 Thread Denis Chertykov
2015-02-23 17:12 GMT+03:00 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 > . Approved. Denis.

Re: [PATCH][BUILDROBOT] Unused static function (was: RFA: AVR: add infrastructure for device packages)

2014-10-29 Thread Denis Chertykov
2014-10-29 13:42 GMT+03:00 Jan-Benedict Glaw : > > On Wed, 2014-10-29 02:23:31 +0100, Jan-Benedict Glaw > wrote: > > On Wed, 2014-10-08 18:50:32 +0100, Joern Rennecke > > wrote: > > > Attached is the GCC patch for the basic device package infrastructure. > > > OK to apply? > > > > There's some

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

2014-10-29 Thread Denis Chertykov
2014-10-28 15:47 GMT+03:00 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 e

Re: [patch,avr] correct incorrect spec string for device specs

2014-11-03 Thread Denis Chertykov
Committed.

Re: RFA: fix avr C++ preprocessing to pick up device defines

2014-11-09 Thread Denis Chertykov
2014-11-09 19:23 GMT+03:00 Joern Rennecke : > The defaults.h definition of > #define CPLUSPLUS_CPP_SPEC CPP_SPEC > does not do the right thing with the cpp spec picked up from a spec file, > which is now needed for -mmcu processing. > Also, a spec file can't override CPLUSPLUS_CPP_SPEC as such, sin

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

2016-08-03 Thread Denis Chertykov
2016-08-03 18:41 GMT+03:00 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 mea

Re: [patch, avr] Fix mmcu to specs issues

2016-08-08 Thread Denis Chertykov
Sorry for delay. Committed. 2016-08-08 9:17 GMT+03:00 Pitchumani Sivanupandi : > Ping! > > > On Friday 29 July 2016 05:14 PM, Pitchumani Sivanupandi wrote: >> >> On Friday 29 July 2016 02:06 PM, Georg-Johann Lay wrote: >>> >>> On 28.07.2016 13:50, Pitchumani Sivanupandi wrote: On Tuesday

Re: [BUILDROBOT] avr broken

2016-08-17 Thread Denis Chertykov
2016-08-16 21:26 GMT+03:00 Nathan Sidwell : > On 08/16/16 13:04, Jan-Benedict Glaw wrote: > >> That'll probably work. But after all, I'm not an AVR maintainer (not >> even an user), but just running the Build Robot. > > > Does your robot approve? :) > I'm an AVR maintainer. The patch does not have

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

2016-06-15 Thread Denis Chertykov
2016-06-15 12:11 GMT+03:00 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 > *

Re: [patch, avr] Fix PR67353

2016-06-15 Thread Denis Chertykov
2016-06-15 13:19 GMT+03:00 Pitchumani Sivanupandi : > On Mon, 2016-06-13 at 17:48 +0200, Georg-Johann Lay wrote: >> Pitchumani Sivanupandi schrieb: >> > >> > $ avr-gcc test.c -Wno-misspelled-isr >> > $ >> What about -Werror=misspelled-isr? > > Updated patch. > >> > >> > diff --git a/gcc/config/avr/

Re: [Patch, avr] Fix PR 71151

2016-06-16 Thread Denis Chertykov
2016-06-16 10:27 GMT+03:00 Senthil Kumar Selvaraj : > > Senthil Kumar Selvaraj writes: > >> Georg-Johann Lay writes: >> >>> Senthil Kumar Selvaraj schrieb: Hi, This patch fixes PR 71151 by eliminating the TARGET_ASM_FUNCTION_RODATA_SECTION hook and setting JUMP_TABLES

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

2016-06-20 Thread Denis Chertykov
2016-06-20 16:36 GMT+03:00 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 cha

Re: [patch, avr,wwwdocs] PR 58655

2016-06-28 Thread Denis Chertykov
Committed. 2016-06-27 14:41 GMT+03:00 Pitchumani Sivanupandi : > Ping! > > > On Wednesday 22 June 2016 12:05 PM, Pitchumani Sivanupandi wrote: >> >> On Tuesday 21 June 2016 09:39 PM, Georg-Johann Lay wrote: >>> >>> Pitchumani Sivanupandi schrieb: Attached patches add documentation for -m

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

2017-07-07 Thread Denis Chertykov
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://sourceware.org/bugzilla/show_bug.cgi?id=2

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

2017-07-07 Thread Denis Chertykov
I'm sorry for so long delay. Please apply the patch. 2017-07-05 14:19 GMT+04:00 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.

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

2017-07-12 Thread Denis Chertykov
2017-07-12 12:45 GMT+04:00 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. > >

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

2017-07-14 Thread Denis Chertykov
2017-07-14 18:16 GMT+04:00 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

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

2017-07-20 Thread Denis Chertykov
Approved. 2017-07-20 18:28 GMT+04:00 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/ >

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

2017-07-27 Thread Denis Chertykov
2017-07-27 16:50 GMT+04:00 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 th

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

2017-08-21 Thread Denis Chertykov
2017-08-21 16:35 GMT+04:00 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? Approved. Please apply. > > Johann

Re: [patch,avr] Simplify genmultilib.awk

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

Re: [patch,avr] PR78883: Implement CANNOT_CHANGE_MODE_CLASS.

2017-01-06 Thread Denis Chertykov
2017-01-02 19:22 GMT+04:00 Georg-Johann Lay : > On 02.01.2017 15:54, Dominik Vogt wrote: >> >> On Mon, Jan 02, 2017 at 03:47:43PM +0100, Georg-Johann Lay wrote: >>> >>> This fixes PR78883 which is a problem in reload revealed by a >>> change to combine.c. The fix is as proposed by Segher: implemen

Re: [patch,avr]: Increase branch costs after reload.

2017-01-16 Thread Denis Chertykov
2017-01-13 17:28 GMT+04:00 Georg-Johann Lay : > This adds a penalty of 4 to the post-reload branch costs. > > Purpose is reduce the number of out-of-line blocks like in > > unsigned long variant5 (unsigned in) > { > unsigned long out = 0; > if (in & (1 << 0)) out |= 0xful << (4*0); > if

Re: [patch,avr] Fix PR80462

2017-04-19 Thread Denis Chertykov
2017-04-19 14:43 GMT+04:00 Georg-Johann Lay : > This PR is about an incorrect warning for variables in progmem > without initializer. If the variable is just an alias like in > and with -fmerge-all-constants > > const __flash char string1[] = "same string"; > const __flash char string2[] = "same s

Re: Ping#1: [patch,avr]: For PR78883 #3

2017-02-06 Thread Denis Chertykov
2017-02-06 14:06 GMT+04:00 Georg-Johann Lay : > https://gcc.gnu.org/ml/gcc-patches/2017-01/msg00926.html > > On 13.01.2017 12:53, Georg-Johann Lay wrote: >> >> This is 3rd way to fix PR78883 by rejecting malicious expressions >> from the start. >> >> Ok for trunk? >> >> Johann >> >> gcc/ >> PR

Re: [patch,avr] Tweak addhi3_zero_extend.

2017-02-06 Thread Denis Chertykov
2017-02-06 14:03 GMT+04:00 Georg-Johann Lay : > This patch adds an alternative to addhi3_zero_extend for the case > where output operand and the 8-bit addend happen to reside > the the same register. Without the patch this might lead > to additional reloads to satisfy the constraints like > > > ui

Re: install.texi and avr (was: Target maintainers: doc/install.texi love and care)

2017-03-13 Thread Denis Chertykov
2017-03-12 15:32 GMT+04:00 Gerald Pfeifer : > On Sun, 12 Mar 2017, Gerald Pfeifer wrote: >> Also, I'm offering help around one particular aspect I noticed: >> >> References to dependencies on really, really old versions of >> binutils (talking 10+ years here) which I think we can remove. >> Let me

Re: [Patch, avr]Fix multiple ICE fallout of PR 69764

2016-03-15 Thread Denis Chertykov
2016-03-10 16:46 GMT+03:00 Senthil Kumar Selvaraj : > Hi, > >This patch fixes ~230 internal compiler errors that showed up after >the fix for PR 69764. After the patch, target backends need to >explicitly specify mode for operand 2 of shift and rotate patterns - >see md.texi mod at

Re: [patch,avr] Fix PR77326: CC_NONE might clobber condition code

2016-09-20 Thread Denis Chertykov
2016-09-20 13:07 GMT+03:00 Georg-Johann Lay : > This fixes the case of CC_NONE (insn attribute for cc is "none"): > > Even in cases where the instructions of an insn do not change the condition > code of the machine, they still might change some registers by clobber, set, > etc. If one such regist

Re: [Patch, avr] Provide correct LD offset bound in avr_address_cost

2016-09-22 Thread Denis Chertykov
2016-09-22 7:52 GMT+03:00 Senthil Kumar Selvaraj : > Hi, > > This patch fixes cost computation in avr_address_cost - instead of the > hardcoded 61, it uses the already existing MAX_LD_OFFSET(mode) macro. > > This showed up when investigating a code size regression in the ivopts > pass. That

Re: [Patch, avr] Backport fix for PR 65210 to gcc-5-branch

2016-09-26 Thread Denis Chertykov
Approved. Please commit. 2016-09-26 15:30 GMT+03:00 Senthil Kumar Selvaraj : > Ping! > > Regards > Senthil > Senthil Kumar Selvaraj writes: > >> Hi, >> >> Is it ok to backport PR 65210 to gcc-5-branch? The patch is already in >> 6.x and trunk. >> >> Regards >> Senthil >> >> gcc/ChangeLog >> >>

Re: [patch,wwwdocs] Add v7 AVR release notes.

2016-10-07 Thread Denis Chertykov
2016-10-07 17:06 GMT+03:00 Georg-Johann Lay : > Mentioning some AVR target specific improvements. > > Ok? > Ok.

Re: [patch,avr] Use avr-passes.def to register passes.

2016-10-11 Thread Denis Chertykov
2016-10-10 16:36 GMT+03:00 Georg-Johann Lay : > This is a code clean-up using the new -passes.def feature in order > to register avr target passes and to get -fdump-xxx etc. to work for such > passes. > > Ok for trunk? > > Johann > > * config/avr/avr-passes.def: New file. > * config

Re: [patch,avr] Introduce absdata attribute to allow LDS /STS on Tiny

2016-10-14 Thread Denis Chertykov
2016-10-12 14:32 GMT+03:00 Georg-Johann Lay : > This patch introduces a new variable attribute "absdata". > > Reduced Tiny cores have only a limited range of addresses 0x40..0xbf which > can be handled by LDS / STS directly. The attribute allows the user to > assert that it is legitimate to use ab

Re: [patch,avr] Fix PR71676 / PR71678: casesi not working for SImode / Dimode

2016-10-24 Thread Denis Chertykov
2016-10-24 13:33 GMT+03:00 Georg-Johann Lay : > This fixes issues with casesi that originate from taking hard coded > subreg:HI of the SImode switch value: > > * The subreg is cutting away the upper bytes which is wrong code if the > switch actually operates on a value > 16 bits. > > * The hard-cod

Re: [patch,avr] minor tweaks for 8-bit operations

2016-07-13 Thread Denis Chertykov
2016-07-13 14:12 GMT+03:00 Georg-Johann Lay : > > This patch contains some unrelated tweaks > > - Supplying no-ldregs variant for andqi3, iorqi3 where a const_int mask > affects only 1 bit > > - Some patterns that match situations with zero_extend that can be performed > with less instructions /

Re: [patch,avr] make progmem work on AVR_TINY, use TARGET_ADDR_SPACE_DIAGNOSE_USAGE

2016-07-17 Thread Denis Chertykov
2016-07-15 18:26 GMT+03:00 Georg-Johann Lay : > This patch needs new hook TARGET_ADDR_SPACE_DIAGNOSE_USAGE: > https://gcc.gnu.org/ml/gcc-patches/2016-07/msg00839.html > > This patch turns attribute progmem into a working feature for AVR_TINY > cores. > > It boils down to adding 0x4000 to all symbol

Re: [patch,avr] Slightly better memory accesses on avr_tiny

2016-07-19 Thread Denis Chertykov
2016-07-19 13:31 GMT+03:00 Georg-Johann Lay : > This patch tries to improve the bloated code we are currently generating for > AVR_TINY. It's mostly about printing the memory loads and stores and more > usage of reg_unused_after to print shorter instruction sequences in some > cases. > > Ok for tr

Re: [patch,avr] More insns to handle (inverted) bit-bit moves

2016-07-21 Thread Denis Chertykov
2016-07-20 15:59 GMT+03:00 Georg-Johann Lay : > This adds some insns that set a destination bit expressed as zero_extract to > a source bit expressed as extract, right shift, and simple combinations > thereof. > > Purpose is smaller code and to avoid costly extracts or shifts. This > applies mostl

Re: [patch,avr] remove secondary_reload hook implementation

2016-07-22 Thread Denis Chertykov
2016-07-21 18:33 GMT+03:00 Georg-Johann Lay : > This removes avr's TARGET_SECONDARY_RELOAD implementation which never worked > as expected... > > Its intention was to provide an 8-bit scratch register for loads from > non-generic address-spaces as they might need to set RAMPZ to the needed > flash

Re: [patch,avr] Add built-in function to emit NOPs

2016-08-01 Thread Denis Chertykov
2016-08-01 11:23 GMT+03:00 Georg-Johann Lay : > This adds a new built-in function that inserts a requested number of NOPs > into the instruction stream. I found it useful when testing avr-gcc. > > Ok to apply? > > > Johann > > > * doc/extend.texi (AVR Built-in Functions): Document >

Re: [patch,avr] Adjust insn length of forward branches.

2016-08-01 Thread Denis Chertykov
2016-08-01 10:56 GMT+03:00 Georg-Johann Lay : > The length computation of "branch" flavour insn length attribute computed a > length one instruction too short, e.g. in the following test case: > > #define N0(N) if (X++ < N) __builtin_avr_nop() > > #define N1(N) N0(N);N0(N);N0(N);N0(N);N0(N);N0(N);N

Re: [patch,avr] PR70677: Use -fno-caller-saves for avr

2016-08-01 Thread Denis Chertykov
2016-08-01 15:17 GMT+03:00 Georg-Johann Lay : > Problem with -fcaller-saves is that there are situations where it triggers > an expensive frame just to store a variable around a function call even > though there are plenty of call-saved registers. > > Example: > > typedef __UINT8_TYPE__ uint8_t; >

  1   2   3   4   >