avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] [RFC] sections stub patch


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] [RFC] sections stub patch
Date: Thu, 29 Aug 2002 22:50:27 +0200
User-agent: Mutt/1.2.5i

As Theodore A. Roth wrote:

> Just try the attached patch. You should not need the 3.0.4 patch. I don't
> think I was being very clear with that.

It was clear to me after looking at both of them. ;-)

> I just compiled and installed with the patch with no problem, but I don't
> have any C++ code to test it.

The patch makes sense to me, also after reading the description of the
respective compiler options.  Basically, it disables those parts of C++
by default that are currently unavailable for the AVR target (or that
don't seem to make sense at all due to space constraints).

I'm attaching a simple C++ test file.  The code doesn't do very much and
of course is far away from being a real project, but it contains about
everything that is needed to verify constructors and destructors of an
object (including a global one).  It's impressive to me that the compiler
can even eliminate the explicit call to the constructor routine in the
-O2 case (just compile it with -S and see the function _ZN6simpleC1Ei
go away).  I tried compiling it on the IA32 platform (by declaring an
imaginary external function itoa(int, char *, int) on top), the
optimization there looks a lot worse considering that the AVR is an
8-bit machine where a lot of data movement is needed.  But OK, IA32
suffers from lack of available registers.

Ted, maybe you could run it through the simulator.  I still didn't
manage it to also produce FreeBSD ports for avrsim and avr-gdb.
-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

Attachment: simpleclass.C
Description: Text document


reply via email to

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