tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Re: C67 Support


From: Peter \"Firefly\" Lund
Subject: Re: [Tinycc-devel] Re: C67 Support
Date: Sun, 16 Mar 2003 14:37:41 +0100 (MET)

On Sun, 16 Mar 2003, Fabrice Bellard wrote:

> ELF is very simple if no relocation are done. All we need is to define a
> correspondant machine id for TMS320C6xx.

I know -- but if tcc is the only tool that uses ELF, what's the point ?

> Ok for pointer and longs (it is needed for 64 bit CPUs). For ints I am
> not sure it is useful and it would be more complicated.

For easier portability testing using only one machine -- no, I don't know
how hard it would be and of course it is not like I'm going to push
patches for it to you tomorrow.  tcc needs many other things first.

> Do you agree that only compile time selection is needed for that ?

Errr... possibly yes.  Compile-time for what?  For the compiler?  No.
For the compiled program?  Why, naturally.

> Bochs is incredibly slow and written in C++.

Some of the slow speed is because it has to handle the hardware and it
does that in a not so efficient way.  Some of it is because it has to
handle memory mapping.  Some of it is due to a speed bug in the screen
updating code.  And then some of it is due to it not being a JIT -- but
that is not the most important part.

> valgrind) and portable (I use some GCC tricks to avoid writing any code
> generator). The main limitation is that only user space Linux is emulated.

Let me guess...

1) You first write a main loop as an interpreter with a big switch in it.
2) when that works you compile (in the true sense of the word) snippets
from that switch between the cases as the translation for a piece of code.

I got that idea, too, about a year ago (I was playing with Moscow ML to
see how I could speed it up).  Unfortunately, somebody else had invented
that technique and published on it in 1998:

http://citeseer.nj.nec.com/piumarta98optimizing.html

(my actual implementation was somewhat different: it required less code
and was slightly faster and tighter but you had to inspect the code the
compiler generated -- but you really have to with Piumarta/Riccardi's
implementation, too, because it is not as truly portable as it looks like)

> > Emulators are fun, but I think the world needs a usable Linux debugger
> > more (which is what I'm working on).
>
> Interesting. A good emulator will be useful if you want higher level
> debugging (think of execution trace recording/single step backward).

That would be one way of doing it.  Just recording the effects of each
instruction would probably be enough, though.

(I'd like to combine my debugger with bochs later on -- it should prove
quite useful for both projects)

-Peter

      "In addition to these ample facilities, there exists a powerful
       configuration tool called gcc." - Elliot Hughes, author of lwm




reply via email to

[Prev in Thread] Current Thread [Next in Thread]