This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC for 8051 based architectures


On Tue, Jul 15, 2003 at 10:35:37AM -0700, Julia Nilsson wrote:
> > Yes, the 8051 instruction set was not really
> > designed for 
> > compiler-generated code. It was designed in an era
> > when hand 
> > assembly was more common.
> > 
> Thats true but commercial compilers do exist for
> microcontrollers. What can be the possible issues with
> GCC for such a target?

GCC is designed for targets that have many registers; in fact
its intermediate form (RTL) assumes an infinite number of
pseudo-registers, some of which get mapped to real registers
and some of which get spilled to memory.

There has been lots of research on techniques for dealing with
irregular processors with limited register sets, multiple memory
banks, and odd addressing modes, and commercial compilers for
DSPs and 8-bit microcontrollers aggressively use such techniques
(for example, offset assignment of local variables so that they
can quickly be accessed through address registers with auto
increment or decrement).  GCC does not implement such techniques
because they are not needed for the 32- and 64-bit CISC and RISC
processors that are its main target.  So, GCC lacks the algorithms
needed to get really good code on such processors (though it
is possible to get correct but slow code).



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]