[A86] Re: SDCC v2.3.0 (fib.c)


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

[A86] Re: SDCC v2.3.0 (fib.c)




> > I think that's a poor example.  It uses printf[..]
>
> Did you want an example or did you want politicaly correct code?

It's fine for an example of C code, but I don't think it's very
representative of how you would be writing code the for the calc.  I
apologize if I offended you.

> > You were saying that SDCC generates good code?  I'm sorry, but that code
> > looks terrible to me.  Why is it passing values on the stack when it
> > could be passing them using registers?  Especially when it's a single
> > value? And it's creating a stack frame when it's not needed.
>
> Reported that (already) to Micheal Hope, he manages the (GB)Z80 port. And
> could you please look for yourself at it, as it seems that you know so
well
> what we need to test (no flames meant).

I will take a look at it when I get some time.

> Oh, and ever looked at other Z80 C compilers, compared to that, this code
> is quite comfy.

Remind me not to look at those then :)

> If you find some 'obscurity' in SDCC I'd like to compile the same code for
> the z88dk (or maybe even with the 'beloved' TISCO), to compare with.
>
> To begin with:
>
> -----fib.c compiled with the z88dk-------

Wow.  I see what you mean.  But I still wouldn't call SDCC good code.
Definitely better, but not good.  And that's what people use for GB
development?  You'd fill page 0 really fast.  I'll have to ask Justin how
well it worked for Infiniti.

> > > At the moment I've got a fibonacci calculator, it works on the z88dk,
> > > haven't/couldn't/whatever test it for SDCC.
>
> fib.c was the first c-file (I recently used with the z88dk) that compiled
> right (please, don't understand me wrong)...

I understand.  I'll see if I can write a small game in C and test it with
the various compilers.






References: