Re: [patch, avr] Device macro correction for rev devices

2014-07-14 Thread Georg-Johann Lay
S, Pitchumani schrieb: Attached patch changes the device name macro of two rev devices, from REV to rev in the name. Device name macro: __AVR_ATmega16HVBREVB__ __AVR_ATmega32HVBREVB__ Change to: __AVR_ATmega16HVBrevB__ __AVR_ATmega32HVBrevB__ 'rev' in small letters emphasizes the revision of

Re: [Patch, avr] Add device name to cpp_builtins

2014-07-28 Thread Georg-Johann Lay
Senthil Kumar Selvaraj schrieb: The below patch adds a new preprocessor define for the device name (__AVR_DEVICE_NAME__) that was passed to the compiler. While the device name macro (say __AVR_ATmega128__) can be used to check for a specific device, there is no way right now for code to get

[avr,committed]: Fix ICE with -mdeb

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

Re: [Patch, avr] Propagate -mrelax gcc driver flag to assembler

2014-04-12 Thread Georg-Johann Lay
Senthil Kumar Selvaraj schrieb: This patch modifies AVR target's ASM spec to pass -mlink-relax to the assembler if -mrelax is passed to the compiler driver. This was already being passed on to the linker, this patch merely makes the assembler also aware of it. The corresponding patch in

[patch,avr] Fix PR61055: Wrong branch instruction after INC, DEC.

2014-05-08 Thread Georg-Johann Lay
Some instructions like INC, DEC, NEG currently set cc0 to set_zn which is not the whole story because they also set the V flag. This leads to a wrong branch instruction in the remainder as cc0 is used. Fix is to do same as clobber cc0. For the matter of clarity, I added a new cc0 alternative

[backport,avr,4.9] Fix typo in avr-mcus.de for built-in macro

2014-05-09 Thread Georg-Johann Lay
Hi, I just applied the following backport to 4.9: http://gcc.gnu.org/ml/gcc-cvs/2014-05/msg00310.html Thanks. 2014-04-16 Pitchumani Sivanupandi pitchuman...@atmel.com Backport from 2014-04-16 trunk r209446 2014-04-16 Pitchumani Sivanupandi pitchuman...@atmel.com

[patch,avr,committed]: Fix build warning for -1 in unsigned int initializers.

2014-05-09 Thread Georg-Johann Lay
http://gcc.gnu.org/ml/gcc-cvs/2014-05/msg00311.html Hi, applied this obvious patch to trunk in order to fix build warnings like these: gcc/config/avr/avr-fixed.md:434:59: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]

[patch,arm] Add GCC runtime library exceptions to files that go into libgcc

2014-05-09 Thread Georg-Johann Lay
This patch adds GCC Runtime Library Exception to files that go into libgcc because libgcc2.c includes tm.h and libgcc_tm.h. Most of these files contain much code, some used by libgcc, some not. Some potential users of (lib)gcc have objections that missing RLE might infect their target code.

Re: [patch,arm] Add GCC runtime library exceptions to files that go into libgcc

2014-05-12 Thread Georg-Johann Lay
Am 05/10/2014 02:51 AM, schrieb Ian Lance Taylor: Georg-Johann Lay a...@jlay.de writes: This patch adds GCC Runtime Library Exception to files that go into libgcc because libgcc2.c includes tm.h and libgcc_tm.h. Most of these files contain much code, some used by libgcc, some not. Some

Re: [Patch, avr] Propagate -mrelax gcc driver flag to assembler

2014-05-12 Thread Georg-Johann Lay
Am 04/18/2014 11:52 AM, schrieb Senthil Kumar Selvaraj: On Sat, Apr 12, 2014 at 06:36:01PM +0200, Georg-Johann Lay wrote: Senthil Kumar Selvaraj schrieb: This patch modifies AVR target's ASM spec to pass -mlink-relax to the assembler if -mrelax is passed to the compiler driver

Re: [Patch, avr] Propagate -mrelax gcc driver flag to assembler

2014-05-14 Thread Georg-Johann Lay
Am 05/13/2014 02:48 PM, schrieb Senthil Kumar Selvaraj: On Mon, May 12, 2014 at 01:19:37PM +0200, Georg-Johann Lay wrote: Am 04/18/2014 11:52 AM, schrieb Senthil Kumar Selvaraj: On Sat, Apr 12, 2014 at 06:36:01PM +0200, Georg-Johann Lay wrote: Senthil Kumar Selvaraj schrieb: [...] 2014

[patch,avr,committed] Fix build warnings caused by REG_CLASS_CONTENTS

2014-05-14 Thread Georg-Johann Lay
https://gcc.gnu.org/r210418 Applied this patch in order to fixed build warnings like these gcc/reginfo.c:115:5: warning: narrowing conversion of ‘-1073741824’ from ‘int’ to ‘const unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing] gcc/reginfo.c:115:5: warning: narrowing conversion

Re: [Patch, avr] Propagate -mrelax gcc driver flag to assembler

2014-05-16 Thread Georg-Johann Lay
Am 05/15/2014 09:55 AM, schrieb Senthil Kumar Selvaraj: On Wed, May 14, 2014 at 12:56:54PM +0200, Rainer Orth wrote: Georg-Johann Lay a...@gjlay.de writes: Or what about simply that, which works for me: Index: config/avr/avr.h

[backport,avr,47] Apply fix for PR60991

2014-05-20 Thread Georg-Johann Lay
Backportet the fix for PR60991 also to 4.7 so that the issue can be closed: http://gcc.gnu.org/r210635 Johann gcc/ 2014-05-20 Senthil Kumar Selvaraj senthil_kumar.selva...@atmel.com Backport from mainline r210325 2014-05-12 Senthil Kumar Selvaraj

Ping #1: [patch,arm] Add GCC runtime library exceptions to files that go into libgcc

2014-05-26 Thread Georg-Johann Lay
: Georg-Johann Lay a...@jlay.de writes: This patch adds GCC Runtime Library Exception to files that go into libgcc because libgcc2.c includes tm.h and libgcc_tm.h. Most of these files contain much code, some used by libgcc, some not. Some potential users of (lib)gcc have objections that missing RLE

[patch,doc,avr] PR61044: Note that label defferences are not supported

2014-05-26 Thread Georg-Johann Lay
This adds a note to the user manual that code with label differences is not supported. This is because adding an offset to a stub address as generated with gs() will in general not yield the address of the label+offset. This actually occurs only if gs() has something to do, e.g. on devices

[patch,libgcc]: More fixes for PR61152

2014-05-27 Thread Georg-Johann Lay
This adds runtime library exceptions for some more files that go into libgcc.c via tm.h, mostly due to v850. Ok for trunk? Johann gcc/ PR libgcc/61152 * config/dbx.h (License): Add Runtime Library Exception. * config/newlib-stdint.h (License): Same. *

[patch,avr] Fix ICE PR61443

2014-06-11 Thread 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 load such MEMs in one chunk. Ok to apply? Johann

[patch,avr] Fix PR60486: Typo cc_plus against cc_minus in calls of avr_out_plus_1

2014-03-12 Thread Georg-Johann Lay
This fixes a problem because cc_plus and cc_minus are in the wrong places in calls of avr_out_plus_1. This is important when avr_out_plus is called from notice_update_cc. This means that cc_status might be determined incorrectly. In the vast majority of cases this leads to performance

[patch,avr] Fix PR59396: Ignore leading '*' in warning generation for ISR names

2014-03-13 Thread Georg-Johann Lay
This is again a request for approval to fix PR59396. Problem is that the assembler name might or might not be prefixed by '*' depending on when TARGET_SET_CURRENT_FUNCTION is called. The change is just to fix wrong warning because the current implementation of TARGET_SET_CURRENT_FUNCTION

Re: [patch,avr] Fix PR59396, take 2: Ignore leading '*' in warning generation for ISR names

2014-03-13 Thread Georg-Johann Lay
Am 03/13/2014 07:36 PM, schrieb Denis Chertykov: 2014-03-13 21:41 GMT+04:00 Georg-Johann Lay: Am 03/13/2014 04:41 PM, schrieb Senthil Kumar Selvaraj: On Thu, Mar 13, 2014 at 02:24:06PM +0100, Georg-Johann Lay wrote: Problem is that the assembler name might or might not be prefixed

[patch,avr,committed]: Fix __do_global_dtors

2014-10-22 Thread Georg-Johann Lay
This patch fixed the wrong pre-increment of .dtors addresses to a post-increment. The first .dtor was bypassed and the last access read beyond __dtors_end. Installed as obvious: http://gcc.gnu.org/r216550 Johann * config/avr/lib1funcs.S (__do_global_dtors): Fix wrong code

[patch,avr,4.9,committed]: ad PR63223

2014-10-22 Thread Georg-Johann Lay
This addendum to PR63223 reverses the order in which __do_global_dtors traverses .dtors: The order is from first to last so that it matches trunk implementation and is inverse direction as __do_global_ctors (which is from last .ctors entry to first). Applied as http://gcc.gnu.org/r216551

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

2014-10-23 Thread 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/ * config/avr/avr.c: Fix GNU coding rules and

[patch,avr] tweak sign extensions

2014-10-23 Thread 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/ * config/avr/avr.md (extendqihi2, extendqipsi2,

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

2014-10-24 Thread 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 numbers are different. Source and destination may overlap. Ok for trunk? Johann gcc/ *

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

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

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

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

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

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

[Patch,avr] PR55243: Mistimed use of STAMP in Ada build

2013-01-07 Thread Georg-Johann Lay
This patch is a rewrite of t-avr so that STAMP is not needed. Ada triggers a mistimed re-build of targets using STAMP which causes PR55243 because the respective places in gnattools ada/gcc-interface don't set STAMP. With this patch, files that were formerly auto-generated must be generated by

[Patch,avr] PR55897: Allocate __memx to .progmemx.data

2013-01-07 Thread Georg-Johann Lay
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 and wastes precious memory in the first 64 Ki. The patch puts __memx data into .progmemx.data so that a

[patch,doc,avr] ad PR54461: Document --with-avrlibc

2013-01-07 Thread Georg-Johann Lay
This addendum adds --with-avrlibc to the (web) documentation. It inserts the explanation after --with-newlib which seems to be a reasonable place. Ok to apply? Johann PR target/PR54461 * doc/install.texi (Cross-Compiler-Specific Options): Document --with-avrlibc.

Re: [patch,doc,avr] ad PR54461: Document --with-avrlibc

2013-01-07 Thread Georg-Johann Lay
Weddington, Eric wrote: Georg-Johann Lay Sent Document --with-avrlibc This addendum adds --with-avrlibc to the (web) documentation. It inserts the explanation after --with-newlib which seems to be a reasonable place. Ok to apply? Change: +This option is only supported

Re: [patch,doc,avr] ad PR54461: Document --with-avrlibc

2013-01-07 Thread Georg-Johann Lay
Weddington, Eric wrote: Georg-Johann Lay Sent Document --with-avrlibc This option is only supported for the AVR target and only for non-RTEMS configurations, which currently use newlib. The option is supported since version I forgot to mention that it looks like there might be some work

[Patch,avr] Add predicate symbols for the linker script to bump sections containing addr-space data

2013-01-07 Thread Georg-Johann Lay
This is a tentative patch that adds symbols that can be used as predicates in the linker script. Background is binutils PR14406: Data in address space __flash1 must be located in such a way that the high byte (hh8) of the address is 0x1. This is needed because avr-gcc sets RAMPZ to 0x1 before

[patch,libgcc] Fix fixed-bit.c build warning

2013-01-11 Thread Georg-Johann Lay
Variables min_high and min_low are set but not used which cases build warnings, fixed by this patch. Build fine for i686-pc-linux-gnu and avr-unknown-none, the latter definitely using this code. Ok for trunk? Johann * fixed-bit.c (SATFRACT) FROM_TYPE = 1, TO_TYPE = 4: Only

Re: [patch,libgcc] Fix fixed-bit.c build warning

2013-01-11 Thread Georg-Johann Lay
Georg-Johann Lay wrote: Variables min_high and min_low are set but not used which cases build warnings, fixed by this patch. Better attach the patch... Build fine for i686-pc-linux-gnu and avr-unknown-none, the latter definitely using this code. Ok for trunk? Johann

[avr,committed] Some no-op changes: Typo, Add copyright notices, Coding rules, Trailing blanks, etc.

2013-01-14 Thread Georg-Johann Lay
Added copyright notices (avr-lib.h, avr-modes.def): http://gcc.gnu.org/viewcvs?view=revisionrevision=195143 http://gcc.gnu.org/viewcvs?view=revisionrevision=195145 Fix typos, remove trailing blanks, coding rules, ... http://gcc.gnu.org/viewcvs?view=revisionrevision=195151

[patch,avr]:

2013-01-14 Thread Georg-Johann Lay
This patch is a no-op change that uses typedefs starting with avr_ in order to make clear that they are in the avr namespace. Old types were: struct base_arch_s, struct arch_info_s, struct mcu_type_s. avr-cross builds fine. Ok to apply? * config/avr/avr-arch.h (struct

[patch,avr]: Minor fixes to some built-in macros

2013-01-14 Thread Georg-Johann Lay
This patch does: 1) With 8-bit int, __INT24_MAX__ and __UINT24_MAX__ need a long long suffix. 2) Defines like __FLASH that indicate if address space is available should be like a predicate, i.e. 1 if the space is available. Obvious and lightly tested. Ok? Johann *

Re: [patch,avr]: Minor fixes to some built-in macros

2013-01-14 Thread Georg-Johann Lay
Weddington, Eric wrote: This patch does: 1) With 8-bit int, __INT24_MAX__ and __UINT24_MAX__ need a long long suffix. 2) Defines like __FLASH that indicate if address space is available should be like a predicate, i.e. 1 if the space is available. I'm not seeing #2 being done in

[patch,avr] Tidy builtins.def

2013-01-15 Thread Georg-Johann Lay
This patch factors out stuff from builtins.def that is used again and again. Strings like the __builtin_avr_ common to all builtins is moved to the implementation of DEF_BUILTIN. Similar for ICODE and CODE_FOR_. ID is no more needed, the needed enums are derived from NAME. There is no

[wwwdocs,avr,committed]: Mention avr specific improvments

2013-01-16 Thread Georg-Johann Lay
http://gcc.gnu.org/ml/gcc-cvs-wwwdocs/2013/msg00015.html http://gcc.gnu.org/gcc-4.8/changes.html#avr Index: changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v retrieving revision 1.85 diff -u -p -r1.85

[Patch] PR56064: Fold VIEW_CONVERT_EXPR with FIXED_CST

2013-01-21 Thread Georg-Johann Lay
This is tentative patch as discussed in http://gcc.gnu.org/ml/gcc/2013-01/msg00187.html fold-const.c gets 2 new function native_encode_fixed and native_interpret_fixed. Code common with the integer case is factored out and moved to the new constructor-like function double_int::from_buffer. The

[patch,avr] Ad PR54222: Add bitsfx and fxbits to stdint.h

2013-01-21 Thread Georg-Johann Lay
This adds the Embedded C bitsfx and fxbits functions to stdfix.h. The original stdfix.h is installed as stdfix-gcc.h and included by the new, avr-specific stdfix.h. The implementation uses __builtin_memcpy to get a no-op implementation. Ok for trunk? Johann PR target/54222 *

Re: [patch,avr] Ad PR54222: Add bitsfx and fxbits to stdint.h

2013-01-23 Thread Georg-Johann Lay
Denis Chertykov wrote: 2013/1/21 Georg-Johann Lay: This adds the Embedded C bitsfx and fxbits functions to stdfix.h. The original stdfix.h is installed as stdfix-gcc.h and included by the new, avr-specific stdfix.h. The implementation uses __builtin_memcpy to get a no-op implementation

[avr,committed] Fix fixed-point conversion

2013-01-24 Thread Georg-Johann Lay
Committed the following change: http://gcc.gnu.org/r195424 * config/avr/avr.c (avr_out_fract): Make register numbers that might be outside of source operand signed. The problem occurs with fixed-point conversions to a wider mode and where the input operand is in a small regno

[patch,avr]: Ad PR54222: Support absolute value functions to stdfix.h

2013-01-24 Thread Georg-Johann Lay
This patch adds the absolute value functions to stdfix.h. DEF_BUILTIN gets one more argument LIBNAME that sets the library name. If no folding is found, for some builtins it's more convenient to call libgcc support directly instead of expanding to an insn. gcc's folding is not very good, thus

Re: [PING^2] [Patch] Ignore Invalid Memory operands in constraint 'X'

2013-01-24 Thread Georg-Johann Lay
Hurugalawadi, Naveen wrote: Hi, Please consider this as a reminder to review the patch posted at following link:- http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00765.html What is this good for? Why are you changing the semantics of an existing, global constraint?

[doc,committed] Fix missing ':' in inline asm example

2013-01-25 Thread Georg-Johann Lay
Applied as obvious: http://gcc.gnu.org/r195471 * doc/extend.texi (Example of asm with clobbered asm reg): Fix missing ':' in asm example.

[Patch] Fix PR54814

2013-01-25 Thread Georg-Johann Lay
PR54814 causes spill fails because reload.c:find_valid_class_1 tests only one hard register instead of all hard registers of regno:mode in rclass: http://gcc.gnu.org/PR54814 The patch was originally worked out by Bernd Schmidt and fixed a problem introduced in http://gcc.gnu.org/r190252 The

[doc,avr,committed] Document __XMEGA__ built-in macro

2013-01-25 Thread Georg-Johann Lay
Committed as obvious: http://gcc.gnu.org/r195473 http://gcc.gnu.org/r195472 * doc/invoke.texi (AVR Built-in Macros): Document __XMEGA__.

Re: [Patch] Fix PR54814

2013-01-25 Thread Georg-Johann Lay
Jeff Law schrieb: On 01/25/2013 11:41 AM, Georg-Johann Lay wrote: PR54814 causes spill fails because reload.c:find_valid_class_1 tests only one hard register instead of all hard registers of regno:mode in rclass: http://gcc.gnu.org/PR54814 The patch was originally worked out by Bernd

Re: [Patch] Fix PR54814

2013-01-27 Thread Georg-Johann Lay
Georg-Johann Lay schrieb: Jeff Law schrieb: On 01/25/2013 11:41 AM, Georg-Johann Lay wrote: PR54814 causes spill fails because reload.c:find_valid_class_1 tests only one hard register instead of all hard registers of regno:mode in rclass: http://gcc.gnu.org/PR54814 The patch was originally

Re: [avr,committed] Fix fixed-point conversion

2013-01-28 Thread Georg-Johann Lay
Gerald Pfeifer wrote: On Thu, 24 Jan 2013, Georg-Johann Lay wrote: Committed the following change: http://gcc.gnu.org/r195424 * config/avr/avr.c (avr_out_fract): Make register numbers that might be outside of source operand signed. Can you still post patches to the list

Re: [doc,committed] Fix missing ':' in inline asm example

2013-01-28 Thread Georg-Johann Lay
Georg-Johann Lay wrote: Applied as obvious: http://gcc.gnu.org/r195471 * doc/extend.texi (Example of asm with clobbered asm reg): Fix missing ':' in asm example. The patch: --- trunk/gcc/doc/extend.texi 2013/01/25 17:55:09 195470 +++ trunk/gcc/doc/extend.texi

[Patch,avr] Remove fixed-point MUL and DIV routines from libgcc build

2013-01-28 Thread Georg-Johann Lay
This removes modules from libgcc that are already supported by avr-specific fixed-point implementation and avoids duplicate functions like __mulsa3. Ok for trunk? Johann libgcc/ * config/avr/t-avr (LIB2FUNCS_EXCLUDE): Add: _mulQQ, _mulHQ, _mulHA, _mulSA, _mulUQQ,

Ping: [Patch] PR56064: Fold VIEW_CONVERT_EXPR with FIXED_CST

2013-01-28 Thread Georg-Johann Lay
Ping #1 for http://gcc.gnu.org/ml/gcc-patches/2013-01/msg01053.html Release Manager approval is here: http://gcc.gnu.org/ml/gcc/2013-01/msg00222.html This is tentative patch as discussed in http://gcc.gnu.org/ml/gcc/2013-01/msg00187.html fold-const.c gets 2 new function native_encode_fixed

Re: [Patch] PR56064: Fold VIEW_CONVERT_EXPR with FIXED_CST, Take #2

2013-01-29 Thread Georg-Johann Lay
Richard Biener wrote: Georg-Johann Lay wrote: This is tentative patch as discussed in http://gcc.gnu.org/ml/gcc/2013-01/msg00187.html fold-const.c gets 2 new function native_encode_fixed and native_interpret_fixed. Code common with the integer case is factored out and moved to the new

[Patch] Ad PR 56064: Extend fixed_from_double_int input

2013-02-07 Thread Georg-Johann Lay
This patch solves a problem with VIEW_CONVERT_EXPR folding for fixed_cst and that use fixed-value.c:fixed_from_double_int. The patch sign/zero extends the double_int input according to the requested fixed-point mode. The patch bootstraps on x86-linux-gnu and passes testsuite on avr-unknown one.

[Patch,avr] Implement PR56254

2013-02-08 Thread Georg-Johann Lay
This adds variable delays to __builtin_avr_delay_cycles. Is this okay? Johann gcc/ PR target/56254 * config/avr/avr.c (avr_expand_builtin) AVR_BUILTIN_DELAY_CYCLES: Expand to delay_cycles for non-const delays. * config/avr/avr.md (delay_cycles): New expander.

Re: [Patch,avr] Implement PR56254

2013-02-08 Thread Georg-Johann Lay
Weddington, Eric wrote: From: Georg-Johann Lay This adds variable delays to __builtin_avr_delay_cycles. Is this okay? What does this do? How does it work? Could you explain the statement in the documentation if ticks is not a compile-time constant, the delay might be overestimated

Re: [Patch,avr] Implement PR56254

2013-02-08 Thread Georg-Johann Lay
Weddington, Eric wrote: -Original Message- From: Georg-Johann Lay Sent: Friday, February 08, 2013 9:00 AM To: Weddington, Eric Cc: gcc-patches@gcc.gnu.org; Denis Chertykov; Joerg Wunsch Subject: Re: [Patch,avr] Implement PR56254 Weddington, Eric wrote: What does this do? How does

[Patch,avr]: ad PR54222: Add saturated multiply

2013-02-11 Thread Georg-Johann Lay
This patch adds optimized support for (short) (un)signed _Sat _Accum multiplication (HA, UHA, SA, USA). The 32-bit multiply uses 64 = 32 * 32 widening multiplication. As a spin-off, the widening mul is available as [u]mulsidi3 default pattern. Okay for trunk? Johann gcc/ PR

Re: [Patch,avr]: Add more devices take #2: 1/2

2013-02-13 Thread Georg-Johann Lay
: Regenerate. Georg-Johann Lay wrote: This patch adds more devices to avr-mcus.def and regenerates depending files. There is a new spec function that is the worker for ASM_SPEC and that transforms -mmcu=device to -mmcu=arch for avr-as. This transformation was already performed for avr25

Re: [Patch,avr]: Add more devices take #2: 2/2

2013-02-13 Thread Georg-Johann Lay
And here 2/2 with the device - arch mapping for gas. Ok for trunk? Johann * config/avr/avr.h (device_to_arch): Rename to device_to_ld. (avr_device_to_arch): Rename to avr_device_to_ld. (avr_device_to_as): New prototype. (EXTRA_SPEC_FUNCTIONS): Add device_to_as.

Re: [Patch, AVR]: PR42240 - Fix epilogue of naked functions

2011-03-04 Thread Georg-Johann Lay
Weddington, Eric schrieb: -Original Message- From: Georg-Johann Lay [mailto:a...@gjlay.de] Sent: Thursday, March 03, 2011 11:01 AM To: Denis Chertykov Cc: gcc-patches@gcc.gnu.org; Anatoly Sokolov; Weddington, Eric Subject: Re: [Patch, AVR]: PR42240 - Fix epilogue of naked functions

[Patch][AVR]: Support tail calls

2011-03-11 Thread Georg-Johann Lay
know if you have suggestion on how call prologues can be combine with tail calls. Regards, Johann 2011-03-10 Georg-Johann Lay a...@gjlay.de * config/avr/avr-protos.h (expand_epilogue): Change prototype * config/avr/avr.h (struct machine_function): Add field sibcall_fails

Re: [Patch][AVR]: Support tail calls

2011-03-16 Thread Georg-Johann Lay
Richard Henderson schrieb: On 03/16/2011 03:32 AM, Georg-Johann Lay wrote: Richard Henderson schrieb: On 03/11/2011 05:43 AM, Georg-Johann Lay wrote: I did not find a way to make this work together with -mcall-prologues. Please let me know if you have suggestion on how call prologues can

Re: [Patch][AVR]: Support tail calls

2011-03-21 Thread Georg-Johann Lay
Denis Chertykov schrieb: 2011/3/18 Georg-Johann Lay a...@gjlay.de: Is it tested for regressions ? Denis. I ran tests against svn 170942 (latest 4.7.0 snapshot). Besides timestamps, the diff looks like this: 1435a1436,1437 XPASS: gcc.dg/sibcall-3.c execution test XPASS: gcc.dg/sibcall-4

[Patch][AVR]: Use define_c_enum where appropriate

2011-03-23 Thread Georg-Johann Lay
Use define_c_enum instead of magic numbers to get unspec resp. unspec_volatile constants. 2011-03-23 Georg-Johann Lay a...@gjlay.de * config/avr/avr.md (define_constants): Move UNSPEC_* resp. UNSPECV_* defines to... (define_c_enum unspec) ...this new enum resp

Re: [Patch][AVR]: Use define_c_enum where appropriate

2011-03-23 Thread Georg-Johann Lay
Weddington, Eric schrieb: -Original Message- From: Georg-Johann Lay [mailto:a...@gjlay.de] Sent: Wednesday, March 23, 2011 8:45 AM To: gcc-patches@gcc.gnu.org Cc: Denis Chertykov; Anatoly Sokolov; Weddington, Eric Subject: [Patch][AVR]: Use define_c_enum where appropriate Use

[Patch, testsuite]: Don't xfail sibcalls on AVR

2011-03-24 Thread Georg-Johann Lay
Target avr now supports tail calls, so don't xfail on that. testsuite/ 2011-03-24 Georg-Johann Lay a...@gjlay.de * gcc.dg/sibcall-3.c: Don't xfail on AVR. * gcc.dg/sibcall-4.c: Don't xfail on AVR. Index: testsuite/gcc.dg/sibcall-3.c

Re: Cleaning up expand optabs code

2011-04-01 Thread Georg-Johann Lay
Richard Sandiford schrieb: Georg-Johann Lay a...@gjlay.de writes: Richard Henderson schrieb: On 03/25/2011 05:41 AM, Georg-Johann Lay wrote: On 03/22/2011 06:48 PM, Richard Henderson wrote: Ok. Watch out for other target problems this week. libgcc fails to build for avr (SVN 171446

[Patch,AVR]: Fix PR45263

2011-04-01 Thread Georg-Johann Lay
This is straight forward fix for PR45263 (R20 clobbered by constructor/destructor). Using call-saved register like R15 is undesired because upcoming ATtiny10 architecture. 2011-04-01 Georg-Johann Lay a...@gjlay.de PR target/45263 * config/avr/libgcc.S (__do_global_ctors

Re: [Patch,AVR]: Fix PR45263

2011-04-01 Thread Georg-Johann Lay
This is a better fix that does not need push/pop and does not increase numer of instructions. r16 takes the role of r20, and the value formerly in r16, i.e. hh8(__dtors_end resp. __ctors_start) is recreated as needed. 2011-04-02 Georg-Johann Lay a...@gjlay.de PR target/45263

Re: [Patch,AVR]: Fix PR45263

2011-04-04 Thread Georg-Johann Lay
Weddington, Eric schrieb: -Original Message- From: Georg-Johann Lay [mailto:a...@gjlay.de] Sent: Friday, April 01, 2011 4:01 PM To: Georg-Johann Lay Cc: gcc-patches@gcc.gnu.org; Denis Chertykov; Anatoly Sokolov; Weddington, Eric Subject: Re: [Patch,AVR]: Fix PR45263

Re: [Ping #2][Patch, testsuite]: Don't xfail sibcalls on AVR

2011-04-06 Thread Georg-Johann Lay
Weddington, Eric schrieb: -Original Message- From: Georg-Johann Lay [mailto:a...@gjlay.de] To: Weddington, Eric Please commit, Johann. Thanks. I don't have write privilege, and I don't think I want write access at the moment. Oh! I didn't know. I thought you did. I signed

Re: [Patch,AVR]: Fix PR45263

2011-04-06 Thread Georg-Johann Lay
Georg-Johann Lay schrieb: Weddington, Eric schrieb: -Original Message- From: Georg-Johann Lay [mailto:a...@gjlay.de] Sent: Friday, April 01, 2011 4:01 PM To: Georg-Johann Lay Cc: gcc-patches@gcc.gnu.org; Denis Chertykov; Anatoly Sokolov; Weddington, Eric Subject: Re: [Patch,AVR

[Patch][AVR]: Initial builtins support

2011-04-06 Thread Georg-Johann Lay
are introduced so that use can easily query if or if not a specific builtin is available. This might be useful as builtin support evolves, because #ifdef is easier then to twiddle out which version brings what builtin. 2011-04-06 Georg-Johann Lay a...@gjlay.de * config/avr/avr.c: (insn

Re: [Patch][AVR]: Initial builtins support

2011-04-06 Thread Georg-Johann Lay
Added Anatoly and Eric to changelog entry Johann 2011-04-06 Anatoly Sokolov ae...@post.ru Eric Weddington eric.wedding...@atmel.com Georg-Johann Lay a...@gjlay.de * config/avr/avr.c: (insn-codes.h, optabs.h, langhooks.h): New Includes

Re: [Ping #2][Patch, testsuite]: Don't xfail sibcalls on AVR

2011-04-08 Thread Georg-Johann Lay
Gerald Pfeifer schrieb: On Wed, 6 Apr 2011, Georg-Johann Lay wrote: I signed a fsf copyright assignment. AFAIK there is no automatism that grants write access when copyright assignment is approved. Yes, this is correct. I would have to be maintainer or something like that. Nope. All

Re: Ping [Patch,AVR]: Fix PR target/44643

2011-04-11 Thread Georg-Johann Lay
Georg-Johann Lay schrieb: This is fix of PR44643 which is triggered by http://savannah.nongnu.org/bugs/?32988 i.e. include/avr/pgmspace.h:PSTR has to be changed, too: PSTR has to generate __c as static const char[], not as static char[]. Note that avr-libc has to be changed anyway

Re:Ping: [Patch][AVR]: Initial builtins support

2011-04-11 Thread Georg-Johann Lay
Georg-Johann Lay schrieb: This patch adds builtin support for some RTL builtins to avr backend. One builtin implements loop for delay of specific number of ticks (under the assumption IRQs are off), others simply map to machine instructions like SEI, CLI, NOP, SLEEP, WDR, FMUL, FMAULS, FMULSU

Re: Ping: [Patch,AVR]: Fix PR45263

2011-04-11 Thread Georg-Johann Lay
Georg-Johann Lay schrieb: Georg-Johann Lay schrieb: Weddington, Eric schrieb: -Original Message- From: Georg-Johann Lay [mailto:a...@gjlay.de] Sent: Friday, April 01, 2011 4:01 PM To: Georg-Johann Lay Cc: gcc-patches@gcc.gnu.org; Denis Chertykov; Anatoly Sokolov; Weddington, Eric

Added myself to MAINTAINERS

2011-04-13 Thread Georg-Johann Lay
Added myself to MAINTAINERS. Please update your MAINTAINERS file. Johann Index: ChangeLog === --- ChangeLog (Revision 172381) +++ ChangeLog (Revision 172382) @@ -1,3 +1,7 @@ +2011-04-13 Georg-Johann Lay a...@gjlay.de

[Committed][AVR]: PR target/45263: Don't use r20 around calls of __tablejump_elpm__

2011-04-13 Thread Georg-Johann Lay
PR target/45263 * config/avr/libgcc.S (__do_global_ctors, __do_global_dtors): Don't use r20 around calls of __tablejump_elpm__ http://gcc.gnu.org/viewcvs?view=revisionrevision=172384 http://gcc.gnu.org/viewcvs?view=revisionrevision=172385 Index: config/avr/libgcc.S

[testsuite,AVR] test for PR46779, PR45291, PR41894

2011-04-14 Thread Georg-Johann Lay
This tests are intended to reveal the respective PRs because the test case is more stable under slight variations in code (both of application or compiler). This test case migh also be helpful for older versions of avr-gcc, in particular if PR41894 is actually fixed. 2011-04-14 Georg-Johann Lay

[Patch,testsuite,avr]: add -finline-limit=0 to pr41885.c options

2011-04-14 Thread Georg-Johann Lay
This patchlet adds -finline-limit=0 to dg-options in testsuite/gcc.target/avr/torture/pr41885.c because otherwise optimizers will fold all tests and actually no test function is called when optimization is on. The test case still passes all tests. testsuite/ 2011-04-14 Georg-Johann Lay

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-14 Thread Georg-Johann Lay
Denis Chertykov schrieb: 2011/4/14 Georg-Johann Lay a...@gjlay.de: The rotlmode3 expanders (mode \in {HI,SI,DI}) violates synopsis by using 4 operands instead of 3. This runs in ICE in top of optabs.c:maybe_gen_insn. The right way to do this is to use match_dup, not match_operand. So

[Patch,AVR]: Fix PR50449

2011-09-20 Thread Georg-Johann Lay
This is fix for a minor performance regression introduced by my changes in trunk r175956: To load a 32-bit constant like 1 into R2, 4.6 uses CLR R2 CLR R3 MOVW R4,R2 INC R2 whereas trunk prints the longer CLR R2 INC R2 CLR R3 CLR R4 CLR R5

[AVR,committed]: ad PR45099: change error to warning

2011-09-21 Thread Georg-Johann Lay
As proposed in PR45099, avr-gcc will now just print a warning instead of an error when a fixed register is needed to pass a parameter to a function. That way the user can inspect the source, and there are situation imaginable where clobbering a fixed register is not a problem. Committed as trunk

[Patch,AVR]: Fix PR50447 (1/n)

2011-09-21 Thread Georg-Johann Lay
This patch improves IOR, XOR, AND for HI and SI. There is room for improvement in the current implementation: - better analysis if a scratch is actually needed - add clobber operands to some insns - use 8-bit scratch instead of reload the constant - reuse value in scratch register if known -

Re: [AVR,committed]: ad PR45099: change error to warning

2011-09-21 Thread Georg-Johann Lay
Nathan Froyd wrote: On 9/21/2011 5:49 AM, Georg-Johann Lay wrote: As proposed in PR45099, avr-gcc will now just print a warning instead of an error when a fixed register is needed to pass a parameter to a function. Where's the proposal in the PR? I see a problem report that was addressed

[Patch,AVR]: Implement PR50446

2011-09-22 Thread Georg-Johann Lay
This adds rotate left/right by 1 for HI and SI and rotates by QI. It's all straight forward. The test case in the PR leads to generation of the new rotate patterns. Passed without regressions. Ok? Johann PR target/50446 * config/avr/avr.md (rotlqi3): Support all offsets 0..7.

[Patch,AVR]: Fix PR50447

2011-09-22 Thread Georg-Johann Lay
This patch adds the PLUS part to fix the PR. addsi3 has a 8-bit scratch register now so that constants that are not covered by the constraints won't force a reload of the constant. The output routine tries adding the constant and subtracting the negated constant and then chooses the shortest

Re: [Patch,AVR]: Fix PR50447

2011-09-23 Thread Georg-Johann Lay
Denis Chertykov schrieb: 2011/9/22 Georg-Johann Lay a...@gjlay.de: This patch adds the PLUS part to fix the PR. addsi3 has a 8-bit scratch register now so that constants that are not covered by the constraints won't force a reload of the constant. The output routine tries adding

Re: [Patch,AVR]: Fix PR50447 (2/n)

2011-09-23 Thread Georg-Johann Lay
Paolo Bonzini schrieb: On 09/23/2011 10:56 AM, Paolo Bonzini wrote: Also, I am curious about one thing: while this is of course a very pragmatic solution, you could also convert AVR to get rid of CC0, do this at expansion time, and get split-wide-types to work as intended. My changes are just

[Patch,AVR]: Fix PR50447 (3/n)

2011-09-23 Thread Georg-Johann Lay
This is the compare part to fix PR50447. Just like the preceding changes to fix PR50447 it's a micro-optimization to smarter print-out of instructions. The patch covers comparisons against HI and SI integers. The byte-wide comparison allows reusing the value in the scratch register and

[Patch,AVR]: Clean-up loading HI constants.

2011-09-25 Thread Georg-Johann Lay
This is just a code clean-up that deals with loading 16-bit constants (HImode). o Length adjustment is triggered by insn attribute adjust_len o To print the constant output_movhi can use output_reload_inhi o output_reload_inhi can use the same function as output_reload_insisf uses, just a

  1   2   3   4   5   6   7   8   9   10   >