On Sat, May 31, 2014 at 3:10 PM, Alan Cox <a...@lxorguk.ukuu.org.uk> wrote:
> On Sat, 31 May 2014 13:38:55 +0200
> > Ardillas del Monte <ardillasdelmo...@gmail.com> wrote:
> >
> > Hi,
> > I'm trying to find some way of compiling C code for the Z380, with 32bit
> > linear addressing. The Z380 is compatible with the Z80, so any Z80
compiler
> > could be a good start point.
>
> I think not. The Z80 is a horrible processor for C because it lacks
> proper stack relative addressing modes. Z380 has stack pointer relative
> addressing. It also has a lot of register banks. It may be able to run
> Z80 code but its 'native' instruction set needs a very different compiler.
>
> The simple fact you can do things like LD HL, (SP-30) totally changes the
> way you generate code IMHO.
>
>
Thanks a lot for your comments (as well as feqin's comments). Maybe the
best way would be to write a new LLVM backend from scratch, but it sounds
like a painful way to go. Most people who tried to write a new backend gave
up in the process.
Regarding Zilog's compiler for Z380, AFAIK it's not open-source, and I
don't want to be tied to neither Windows nor to a company. I want to have
the choice of recompiling the compiler on another OS in case I need it at
any point in the future.
Thanks a lot for your comments,
ardi
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user