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
As before I disagree.
But let Eric and users decide:
1) Should __builtin_return_address() be disable for 256K device. Since
it will only return word not 3 bytes.
2) Should function pointer arithmetic be disabled for 256K device -
since it will only operate on word address.
I think answer
Anatoly Sokolov schreef:
Hello.
I have considered all proposals on changing '__builtin_avr_delay_cycles'
builtin. Also has added '__builtin_avr_fmul*' builtins.
There is one thing that crosses my mind. A user would not only want a
voidinterrupt_enable (void)
uint8_t interrupt_disable
Anatoly Sokolov schrieb:
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.
I have no problem in Ada calling inline
-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
org] On Behalf Of Rolf Ebert
Sent: Monday, April 21, 2008 10:24 AM
To: Anatoly Sokolov
Cc: avr-gcc-list@nongnu.org
Subject: Re: [avr-gcc-list] Add builtins in avr target.
Anatoly Sokolov schrieb:
Hi
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
-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
org] On Behalf Of Dmitry K.
Sent: Thursday, April 17, 2008 9:24 PM
To: avr-gcc-list@nongnu.org
Subject: Re: [avr-gcc-list] Add builtins in avr target.
On Friday 18 April 2008 12:56, Weddington, Eric wrote
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 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
Anatoly Sokolov schreef:
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'
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
4 cycles:
rjmp .
rjmp .
5 cycles:
rjmp .
rjmp .
nop
6 cycles:
rjmp .
rjmp .
rjmp .
All code portions use no more program
2008/4/17, Oleksandr Redchuk [EMAIL PROTECTED]:
7 to 756
ldi rX, (delay/3)
1:dec rX
brne 1b
is generated. 'ldi' instruction can be removed by optimizer.
and removed ldi instruction execution time (1 cycle) for 7+ cycles
will produce less relative error than for 3..6
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
-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
org] On Behalf Of Anatoly Sokolov
Sent: Thursday, April 17, 2008 3:44 PM
To: Oleksandr Redchuk; avr-gcc-list@nongnu.org
Subject: Re: [avr-gcc-list] Add builtins in avr target.
Hi.
2008/4/17, Wouter
On Friday 18 April 2008 12:56, Weddington, Eric wrote:
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.
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
Anatoly,
__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
-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
org] On Behalf Of Anatoly Sokolov
Sent: Friday, April 04, 2008 2:51 PM
To: avr-gcc-list@nongnu.org
Subject: [avr-gcc-list] Add builtins in avr target.
Hello.
This patch add '__builtin_avr_swap',
Unless the builtins expose more information to gcc, I cannot see any
benefit from the addins - with the possible exception of FMUL.
The result will be the same. No better code, no fewer bugs.
Yes there are lots of outstanding patches that fix real bugs. It would
seem to me that these are more
20 matches
Mail list logo