tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] OSX [run-time code generation]


From: Peter \"Firefly\" Lund
Subject: Re: [Tinycc-devel] OSX [run-time code generation]
Date: Mon, 21 Apr 2003 14:53:30 +0200 (MEST)

On Mon, 21 Apr 2003, Peter "Firefly" Lund wrote:

> You will also need to insert either instructions or OS X calls to handle
> the run-time code generation (cache flushing/invalidation, perhaps also
> TLB flushing/invalidation) + you might need mprotect() or similar to tell
> OS X that the piece of memory you are generating code into should be
> marked executable.

I think these two URLs are what you want - I haven't looked, though, since
developer.apple.com went down shortly after I started looking at their
docs.

http://developer.apple.com/techpubs/mac/Processes/Processes-171.html
http://developer.apple.com/techpubs/mac/runtimehtml/RTArch-5.html


A general discussion of self-modifying code:

http://yarchive.net/comp/self_modify.html

(Mashey worked on MIPS chips then and now works on Power for IBM, Andy
Glew designed much of the PentiumPro, Dennis Ritchie dabbled a bit in C
and Unix, Anton Ertl is comaintainer of a Forth implementation)


GNU Lightning has a PPC backend that already does cache
flushing/invalidation for run-time code generation.  You should be able to
steal most of that.   It is the jit_flush_code() function in ppc/funcs.h.

http://ftp.gnu.org/gnu/lightning/
(There is also a savannah page but it has the same 1.0 release and an
empty CVS)

-Peter




reply via email to

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