[A89] Re: p55x


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

[A89] Re: p55x



> > By the
> > way, don't libticables and libticalcs work on other Unix derivates?
> > I see at least FreeBSD on www.tilp.info. What about those?
> These are loadable modules.

For Linux. Or do they work on FreeBSD, too?

> I mean drop the front end.

OK. That would be an improvement, I think.

> But no, I haven't seen the gcc patch. Oops.

It doesn't really affect the gcc front end a lot, but mostly cc1, the
actual compiler. So you probably won't need to read it just to get rid
of the tigcc front end.

> The issue with modular programming is really code readability.

Yes. And being able to plug one module into multiple programs, in
theory.

> AFAIK, unless you de-inline things that would otherwise be inlined,
> it doesn't affect size or speed.

Unfortunately, this is not true. If you have separate modules, the
compiler and assembler don't know how far away the external references
are. Therefore they have to assume they are far enough to event require
an absolute reloc on the MC68000 processor (which is true only if they
are 32KB or more away). On systems where every byte makes a difference,
this can be a problem.

> I don't mean totally breaking programs into independent modules, just
> into separate source files handing separate things. For anything over
> a certain size, this is a very good idea.

It's always a good idea. As I said, things will become much better with
the next version of TIGCC.

> Make the functions more ANSI/POSIX like.

Which functions? The ones in stdio.h, stdlib.h, string.h, etc. are
already almost ANSI. Kevin event wrote a scanf implementation, which is
available through a link on the TIGCC message board. You could write a
POSIX layer on top of them, but it won't be real POSIX: For example,
what's the use of POSIX-style file descriptors if you cannot implement a
'select' function to watch them?

> Yes, like ANSI/POSIX.

You mean like this:
#define __NEED_HANDLE
#include <alloc.h>

That might be a good idea. It would be nice to integrate it into the
documentation system, though, which is used to build the documentation
and header files at the same time.

> I'm a purist, so sue me.

I'm not saying that your suggestions are bad, I'm just trying to point
out some possible problems before you start coding.

-- 
Sebastian Reichelt



Follow-Ups: References: