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]

Re: GCC


On Wed, Sep 19, 2001 at 03:05:21PM +0100, Joern Rennecke wrote:
> > Hi,
> >  I want to know on what kind of architectures gcc will
> > run. Is there any limitat
> > ion on the no of registers (eg. m68hc11 uses soft
> > registers) and addressing
> > modes.Suppose is it possible to port GCC for an
> 
> That's basically only limited by the size of long integers / pointers
> on your host system.  I.e. for all practical purposes it's unlimited.
> 
> > architecture like 8051,
> > where there is no indexed addressing mode. I do n't
> > know 8051's architecture,
> > but I want to know for my research interest.
> 
> The lack of an indexed addressing mode is no problem, as long as there
> is a register indirect addressing mode.  However, you might run into
> problems if there are too few registers for reload - which you can work
> around by pretending some memory / stack locations are registers, and/or
> defining multi-insn patterns that implement addressing modes not directly
> supported by the hardware.
> Lack of a proper stack would be a more serious problem, as are separate
> address spaces.  You can still get some functionality with these
> idiosyncracies, but it makes the port harder to implement and the
> large parts of the testsuite won't run.
>
The 8051 is a pure 8 bit CPU. You need a 16 bit compiler. Can gcc be a 16
bit compiler? And you still have a lot of internal special features which
are speaking against a not specialized compiler. It is difficult enough to
write assembler code for the 8031/51/535 family because there's not the
slightest support of 16 bit arithmetic like the Z80 it has. 

Assembler programmers try to lay array so, that they do not cross page
boundaries, this speeds up code by a factor between 1.8 and 3.

There are specialized C compilers for the 8051, so you can control the
code generation. It's something like _near, _far and _huge in MS-DOS.

-- 
Frank Klemm


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