> I disagree. sdcc supports targets that might be called horrible for C.
> But the Z80 is not one of them. The Z80 is okay; not pefect, but okay.
> It is not too hard to set up a frame pointer (as sdcc usually does in
> ix), and use it for accessing the stack.

I guess its all relative, but if you compare native assembler to compiler
performance then Z80 does not run C that well compared to many processors
with better stack relative operations. It's great at COBOL but not C.

8bit at a time IX relative operations with very long cycle times may
work, but the performance versus non stack argument languages is awful.

Yes there are CPU's a lot worse at running C and SDCC does minor miracles.

> > The simple fact you can do things like LD HL, (SP-30) totally
> > changes the way you generate code IMHO.
> 
> Not really. You save the code for setting up the frame pointer at
> function entry, but otherwise the generated code is very similar. sdcc
> has backends for the Rabbit 2000, Rabbit 3000A and TLCS-90. These do
> have some instructions with stack-pointer-relative adressing, but in
> the sdcc source the backend is the same as the Z80 one (with a few
> if(TARGET_IS_TLCS90), etc) in there.

You also need to allocate stuff carefully to the various register banks
and the stack but I bow to your far superior knowledge of SDCC

Alan

------------------------------------------------------------------------------
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

Reply via email to