avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: [avr-gcc-list] update on the last issue


From: Anton Erasmus
Subject: Re: AW: [avr-gcc-list] update on the last issue
Date: Tue, 05 Apr 2005 22:19:12 +0200

On 5 Apr 2005 at 9:32, Haase Bjoern (PT-BEU/EMT) * wrote:

> Hi,
>
> Expect long long support to be *extremely* inefficient for AVR. IIRC,
> e.g., long long adds are implemented by a library function written in
> C that will add one bit at a time ... The back-end does not supply any
> support for using long longs so anything we have at the moment is the
> generic support of GCC's libgcc2.
>

In avr-gcc 3.4.3 it does not call a library routine for adding 2 long long 
variables. It
does it directly. The values are added 8 bits at a time until all 64bits have 
been
handled. All in all the code generated is quite good for an 8 bit MCU. One 
should
obviously not use 64bit variables if not necessary, but the code is definitely 
NOT
extremely inefficient.  From a quick calculation based on the number of 
instructions,
a 64bit add should take less than 15us on a 16MHz AVR.

Regards
   Anton Erasmus



> -----Ursprüngliche Nachricht-----
> Von: address@hidden
> [mailto:address@hidden Im
> Auftrag von David Gesswein Gesendet: Montag, 4. April 2005 20:53 An:
> address@hidden Betreff: Re: [avr-gcc-list] update on the last
> issue
>
> Haven't played enough with the GCC avr port to have direct knowledge
> of long long in it but these should help:
>
> http://gcc.gnu.org/onlinedocs/gcc/Long-Long.html
>
> http://lists.gnu.org/archive/html/avr-libc-dev/2004-09/msg00038.html
>
> >
> > Hi,
> > I did a little bit more of search and figured that if i use the long
> > long for my X, Y coordinates and the sums, I should be able to
> > handle extremely large numbers. But now When i do that, it still
> > give me incorrect results. Even when i try to assign them those high
> > values directly, it fails!!!!
> >
> ...
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>
>
>
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

--
A J Erasmus





reply via email to

[Prev in Thread] Current Thread [Next in Thread]