Hello.
Studying avr-libc bug #14486 I have written the following test case.
#define SFR (*(unsigned char *)(0x80))
#define foo() \
({ \
__asm__ __volatile__\
(
Hello.
I have created the patch which allows the gcc to use 'MOVW' instruction for
new ATtiny devices:
https://savannah.nongnu.org/task/?func=detailitemitem_id=5089 (task #5089
overview: Add new arhitecture 'avr25' in gcc toolchain for new ATtiny
devices.)
Please test it.
Anatoly.
Hello.
Whether you plan to add an __AVR_HAVE_LPMX__ ?
I plan to add 'avr55' architecture for ATmega128(x) devices, for which
__AVR_HAVE_ELPM__ is defined.
It will allow to solve a following problem:
Some functions from 'fplib', for example ' fp_powerseries', always use LPM
the instruction of
Hello.
Attached is modifed Andy Hutchinson patch that changes AVR GCC to use RTL
prologue/epilogue generation.
Original patch: http://gcc.gnu.org/ml/gcc/2005-03/msg00923.html
New pach is for GCC 4.2.
Anatoly.
Index: gcc/config/avr/avr-protos.h
- Original Message -
From: Denis Chertykov [EMAIL PROTECTED]
To: Anatoly Sokolov [EMAIL PROTECTED]
Cc: avr-libc-dev@nongnu.org; avr-gcc-list@nongnu.org; Denis Chertykov
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, June 26, 2006 6:51 PM
Subject: Re: [avr-libc-dev] [AVR] RTL
- Original Message -
From: Björn Haase [EMAIL PROTECTED]
To: avr-gcc-list@nongnu.org
Sent: Saturday, August 19, 2006 9:31 PM
Subject: [avr-gcc-list] Re: Removal of unused functions
Hello people,
I've read quite a bit about the removal of unused functions when using
avr-gcc. In
- Original Message -
From: Denis Chertykov
Sent: Tuesday, September 05, 2006 9:34 PM
Subject: Re: AVR toolchain patch hell
I have the one big problem. The AVR port havn't working GCC testsuit.
Mike Stein mstein at phenix dot rootshell dot be (mstein) every day sends
results
-Original Message-
From: Anatoly Sokolov [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 23, 2006 9:13 PM
To: [EMAIL PROTECTED]
Subject: [AVR] RTL prologue/epilogue
Hello.
Attached is patched for 4.3.0 head that changes AVR target to use RTL
prologue/epilogue generation.
Tested
Hello.
This is Bjorn Haase 'mega256' patch adapted for GCC4.2. Review and testing is
welcomed.
I add new punctuation characters (%!), which generate symbol 'e' if
AVR_HAVE_EIJMP_EICALL is true. It allows to replace code:
if (AVR_HAVE_EIJMP_EICALL)
return \eicall\;
else
Hi,
From: Wouter van Gulik [EMAIL PROTECTED]
Sent: Sunday, August 05, 2007 11:46 PM
After some testing I found out that inverting shift and and
instruction can significantly reduce speed and size. In the first is
case the compiler misses that it can optimise the shifts for bit 4..7
by
Hi.
This patch optimizes logic left shift of unsigned char by 4, 5, and 6,
excluding double 'andi' instructions in some cases.
...
uint8_t getBit4InvShift(uint8_t temp) { uint8_t r = 0; if((temp4)1)
r|=0x1; return r; }
uint8_t getBit5InvShift(uint8_t temp) { uint8_t r = 0; if((temp5)1)
Anatoly Sokolov wrote:
Hi.
This patch optimizes logic left shift of unsigned char by 4, 5, and 6,
excluding double 'andi' instructions in some cases.
Patch.
Anatoly.
begin 666 gcc_fix_11259_33028.txt
[EMAIL PROTECTED](=C8R]R96-O9RYCCT]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T
Hi.
I try to build the avr-gcc 4.3-20080104 snapshot.
Binutils is 2.18.
Build is fault at compilation 'libgcc' for avr35:
illegal opcode movw.
Is there any method to configure GCC to work with
binutils-2.18 ?
Use patch:
http://sourceware.org/ml/binutils/2008-01/msg00037.html
Hi.
From: David Brown [EMAIL PROTECTED]
Sent: Sunday, January 27, 2008 10:57 PM
I'd imagine that the use of pgm_read_*_far macros
within interrupt functions is pretty rare - perhaps the best idea is to
use the patch, but make -mno-save-rampz the default?
Rare for 128K devices, but are more
- Original Message -
From: [EMAIL PROTECTED]
To: AVR-GCC-list@nongnu.org
Sent: Thursday, January 31, 2008 7:14 PM
Subject: Re: [avr-gcc-list] Save RAMPZ register in interrupt handler
routines
The perfect way to handle RAMPZ is declare it as fixed register to GCC.
Then for each
Hello.
This patches move '_do_copy_data' code for devices with 128KB and up FLASH
from avr-libc to libgcc.
Anatoly.
begin 666 gcc-4.3-do_copy_data.txt
[EMAIL PROTECTED](=C8R]C;VYF:6O879R+VQI8F=C8RY3CT]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
Hello.
The M3000 devices from System Semiconductor have AVR core and therefore can be
added in the avr-gcc toolchain.
We shall add them?
http://www.systemsemi.com/index.htm
Anatoly.___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
Hello.
This patch add '__builtin_avr_swap', '__builtin_avr_sei' and
'__builtin_avr_cli' builtins in avr backend. It will allow to use 'SWAP',
'SEI' and 'CLI' instructions, without use inline assembly.
I wish to add:
1. builtins for 'SLEEP' and 'WDR' instructions;
2. builtins for
Hi.
My patch adds avr specific builtins, and has no attitude to GCC standard
builtins.
See GCC bug #21080:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21080
Andy Hutchinson wrote a patch (attached to bug report) to fix this bug
which adds support for __builtin_return_address.
As far as I
Hello.
Also, I get an average increase of the codesize (everything identical
but the gcc version) of 5% moving from 4.2.3 to 4.3.0 (averiged
over 12 projects, varying from 1% to 9%). I did not yet did research
on the cause.
Try use --param inline-call-cost=5 switch.
The minimal
Hi.
I wish to add:
..
3. builtin similarly to IAR '__delay_cycles';
..
This unfinished patch add '__builtin_avr_delay_cycles(long delay)' builtin to
the avr backend. The 'delay' parameter should be constant.
If 'delay' is 1 or 2 then one or two 'nop' instructions is generated.
If
I wish to add:
..
3. builtin similarly to IAR '__delay_cycles';
..
This unfinished patch add '__builtin_avr_delay_cycles(long delay)' builtin
to the avr backend. The 'delay' parameter should be constant.
The patch attached.
Anatoly.Index: gcc/config/avr/avr.md
Hi.
2008/4/17, Wouter van Gulik [EMAIL PROTECTED]:
For a 2 cycles delays an rjmp can be used. Saves an instruction!
And so on:
3 cycles:
rjmp .
nop
I shall try to replace 'nop' with 'rjmp .' for two cycle delay. It is
necessary to check that the linker relaxation pass will
Hi.
Why can not this be done with library/inline functions?
I consider that use builtins allows to realize universal delay function
easier. Also use builtins will allow to the same delay funcianality it ADA
language.
Why does delay always have to be constant?
If to allow input parameter
Hi.
I just installed WinAvr-20080411 and re-compiled a recent project (lab4a).
I was surprised that the code increased by almost 400 bytes (lab4b).
Looking into the reason I see that the compiler generated my EEPROM_read
function and then started generating the function in-line in all of
Hello.
I have considered all proposals on changing '__builtin_avr_delay_cycles'
builtin. Also has added '__builtin_avr_fmul*' builtins.
Anatoly.Index: gcc/config/avr/predicates.md
===
--- gcc/config/avr/predicates.md
Hi.
__builtin_return_address is extremely useful for target error reporting.
e.g. a function can be called(or trapped) to report error in another
part of program. This allows such routines to determine the address of
the caller without using naked asm functions.
You are correct, that
Hello.
Now AVR-GCC for multiplication of two unsigned and two signed char
operands uses instructions 'MUL' and 'MULS' accordingly and is
8x8=16bits operation. Multiplication signed on unsigned chars is carried
out as multiplication of two 16-bit values, though in AVR core there
is
in tests.
I to wait month for user responses before to add the patch in the GCC.
Take the decision themselves.
Anatoly.
- Original Message -
From: Weddington, Eric [EMAIL PROTECTED]
To: Anatoly Sokolov [EMAIL PROTECTED]; avr-GCC avr-gcc-list@nongnu.org
Sent: Sunday, April 27, 2008 11:11
Hello.
This patch adds 'maddqihi4' and 'maddqihi4' multiply-add insn patterns
for 16bit += 8x8bit operations. Where multiplication is signed on signed
or unsigned on unsigned . Code decreased on one 'MOVW' instruction
per multiply-add operation.
The patch madd.diff caused 0 gcc testsuite
Hi.
Anatoly, Andy, can you look at this?
Testcase:
#include avr/interrupt.h
void foo (void)
{
char tmp = PORTA;
}
ISR(INT0_vect)
{
foo();
}
int
main (void)
{
return 0;
}
Code compiled with -O0:
void foo (void)
{
ce: df 93push r29
d0: cf 93push r28
d2: 0f 92
Hello.
The unit has a bit mapped display. With 4.3.0 I have random pixels
that I don't have with 4.1.2, which probably indicates that I have
something marginal in my display driver timing. When I assert INT0
the unit eventually locks up with 4.3.0, but not with 4.1.2.
All rather vague
Hi.
An alternative way to handle this sort of thing would be to implement a
critical function attribute like in the msp430 port of gcc - a
function with this attribute has interrupts disabled at the start, and
restored at the end.
It will work for for tiny and mega devices, but xmega
Hi.
Do you have a GCC bug report for this yet? I could not find one...
Eric
The bug and patch:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424
Anatoly.___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
Hi.
Is there some documentation out there about the effect of all the AVR
specific attributes? I'd like to understand the puposes and (generated
code) consequences of
OS_main
Function with OS_main and 'OS_task' attributes do not save any
call-saved registers.
1. OS_main attribute
Hello.
I've stumbled across another problem with ATmega2560 support. Although
the problem is triggered from avr-libc, I believe this to be a gcc
problem.
Then the do_rand() calls __prologue_saves__. That function saves the
appropriate registers, but then assembles an EIJUMP without
Hi.
The patch add progmem_far attribute in GCC.
Anatoly.
- Original Message -
From: Anatoly Sokolov [EMAIL PROTECTED]
To: avr-GCC avr-gcc-list@nongnu.org
Cc: Anatoliy Sokolov [EMAIL PROTECTED]
Sent: Friday, May 02, 2008 8:36 PM
Subject: progmem_far attribute
Hello.
Now GCC have
Hi.
From: Andy H [EMAIL PROTECTED]
Sent: Sunday, July 20, 2008 8:51 PM
A better name would be progmem_high. FAR is entirely different.
Ok.
Unlike some cpu AVR does not need different direct JMP/CALL/RET...
This patch adderss only to data. User space of 'progmem' section
limeted to
Hi.
Well actually it is not, the other place i found is
define_insn negsf2
which could be repaired too.
fplib in avr-libc use T bit. atoi, atol, itoa ltoa and vfprintf
(__ultoa_invert) functions use T bit also.
Anatoliy.___
AVR-GCC-list
Hi.
I look avr.c file, set instruction used for implementation shift operation
and for loading constant with one bit set (0b0010).
T-bit is used by avr-gcc for internal purpose, the same way as temp reg (r0)
and cannot be used for storing value.
Is there a WinAVR bug report filed for this?
Yes. This is the sourceforge.ne bug #2490164 XMega (128A1): subroutine calling
may
corrupt stack pointer
http://sourceforge.net/tracker/index.php?func=detailaid=2490164group_id=68108atid=520074
Anatoly.
Hi.
I'm ok with say that we require some verion = X. Anything X should fail.
Anything = X should be allowed. With X being the lowest version that we
check for.
Test for autoconf min version alredy present in configure.ac:
38: AC_PREREQ(2.57)
Test for automake version can add this way:
Hi
Richard F wrote:
So doesn't look like any more optimisation to be had there!
Sorry. I has not understood your phrase.
If you consider that the jump table optimisation is not effective for your
project, you can disable it with the -fno-jump-tables switch. The target
specific
Hi,
add OS_main attribute to main function,
-mtiny-stack
Anatoly.
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Hi.
Consider this test case:
unsigned long rotl (int dummy, unsigned long x)
{
return (x 8) | (x 24);
}
Compile with, e.g.
avr-gcc -mmcu=atmega8 -S -Os -fno-split-wide-types
This will map 0x33221100 to 0x33110033 instead of to 0x22110033
Please test the patch.
And what version
Hi.
Are there any caveats to the use of this option?
How would one know if it is safe to use for a given code base?
The -mtiny-stack may (and should) be used only for devices with 0xFF max RAM
adderss, i.e. if SP register is 8-bit.
All devices with 1KB and 2KB FLASH memory satisfy this
Hi.
On 5/12/09, Weddington, Eric eric.wedding...@atmel.com wrote:
I don't understand what you're doing here.
You've completely removed EIJMP from gcc.
That is correct. It is better for gcc not to use this instruction.
This prevent using indirect function call in bootloader code for
- Original Message -
From: Sean D'Epagnier geckosena...@gmail.com
To: Anatoly Sokolov ae...@post.ru
Cc: Weddington, Eric eric.wedding...@atmel.com;
avr-gcc-list@nongnu.org
Sent: Wednesday, May 13, 2009 6:35 PM
Subject: Re: [avr-gcc-list] mcall-prologues completely broken for 128k
In any case, the rules of EIND usage must be documented.
The avr-gcc/avr-ld internally use the EIND for indirect function call, case
statement optimization (tablejump) and -mcall-prologues optimization. The
EIND always should contain hh8(pm(start of .trampolines section)) value,
i.e. 0 when
Hi.
../../gcc/config/avr/avr.c -o avr.o
.../../gcc/config/avr/avr.c: In function �‘avr_override_options�’:
.../../gcc/config/avr/avr.c:396: error: �‘PARAM_INLINE_CALL_COST�’
undeclared (first use in this func )
.../../gcc/config/avr/avr.c:396: error: (Each undeclared identifier
Hi.
There is one issue I would like to get clarified. In prologue, conditional
check for is_OS_main is happening but not the same in epilogue.
expand_prologue() {
...
+ else if (TARGET_NO_INTERRUPTS
+|| cfun-machine-is_signal
+|| cfun-machine-is_OS_main)
+ {
insn =
Hi.
This patch removes obsolete GO_IF_MODE_DEPENDENT_ADDRESS macro from the
M32R back end in the GCC and introduces equivalent
TARGET_MODE_DEPENDENT_ADDRESS_P target hook.
Regression tested on m32r-unknown-elf.
OK to install?
* config/m32r/m32r.c
52 matches
Mail list logo