[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Add builtins in avr target.
From: |
Anatoly Sokolov |
Subject: |
Re: [avr-gcc-list] Add builtins in avr target. |
Date: |
Fri, 18 Apr 2008 01:44:02 +0400 |
Hi.
> 2008/4/17, Wouter van Gulik <address@hidden>:
>
>> 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 not remove the 'rjmp
.' instruction. Now I do not wish to complicate a code and to optimize 3..6
cycles delays.
>
> 7 cycles delay requires four instructions and delay loop is more
> efficient in code size:
>
>>> If 'delay' is from 3 to 756 then code:
>
> 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 cycles delay
>
Ok. I shall check it.
Anatoly.
- Re: [avr-gcc-list] Add builtins in avr target., (continued)
Re: [avr-gcc-list] Add builtins in avr target., Anatoly Sokolov, 2008/04/17
- Re: [avr-gcc-list] Add builtins in avr target., Anatoly Sokolov, 2008/04/17
- Re: [avr-gcc-list] Add builtins in avr target., Wouter van Gulik, 2008/04/17
- Re: [avr-gcc-list] Add builtins in avr target., Oleksandr Redchuk, 2008/04/17
- Re: [avr-gcc-list] Add builtins in avr target., Oleksandr Redchuk, 2008/04/17
- Re: [avr-gcc-list] Add builtins in avr target.,
Anatoly Sokolov <=
- RE: [avr-gcc-list] Add builtins in avr target., Weddington, Eric, 2008/04/17
- Re: [avr-gcc-list] Add builtins in avr target., Dmitry K., 2008/04/17
- RE: [avr-gcc-list] Add builtins in avr target., Weddington, Eric, 2008/04/18
- Re: [avr-gcc-list] Add builtins in avr target., Dmitry K., 2008/04/18
Re: [avr-gcc-list] Add builtins in avr target., hutchinsonandy, 2008/04/17
Re: [avr-gcc-list] Add builtins in avr target., Anatoly Sokolov, 2008/04/18
Re: [avr-gcc-list] Add builtins in avr target., Rolf Ebert, 2008/04/21
RE: [avr-gcc-list] Add builtins in avr target., Weddington, Eric, 2008/04/21
RE: [avr-gcc-list] Add builtins in avr target., Weddington, Eric, 2008/04/18
Re: [avr-gcc-list] Add builtins in avr target., Anatoly Sokolov, 2008/04/20