unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* wip-rtl status
@ 2012-06-03 21:41 Andy Wingo
  2012-06-03 22:30 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Wingo @ 2012-06-03 21:41 UTC (permalink / raw)
  To: guile-devel

Hi,

A brief status update on wip-rtl.  If this means nothing to you, just
skip this mail; at some point in the future there will be more
information.

I started to look at static constant allocation.  In order to do so I
needed an object format that could link together different sections with
different permissions and alignments, so I imported an old ELF branch I
had hanging around, and adapted it to work with wip-rtl.  Now the
interface is that you make an assembler, emit some programs, then link,
resulting in a list of ELF objects.  You then link-elf to produce a
bytevector, which can be written to disk, then loaded with
load-thunk-from-disk from (system vm objcode).  You can also load via
load-thunk-from-memory, which takes a bytevector.  In that case you
might want to skip alignment and permissions and just operate on
read-write memory, so there is the #:page-aligned? kwarg to link-elf for
that situation.

Instructions that take constants take them literally.  The various
emit-foo procedures will add the constant to a table if necessary, and
link-objects will serialize a constant table if necessary.  Not sure if
this is being too clever or not.

Currently there are a couple of broken bits.  One is that we don't
currently write an init thunk, to fix up the car and cdr links in static
pairs, for example.  Also a lot of it is untested.  But we needed the
loader facility so that we could actually write tests, so hopefully
things will come together.

Anyway, the hack is ongoing, if a bit sporadic.  Hopefully we'll be able
to start compiling some Scheme shortly.

Cheers,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-06-05  8:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-03 21:41 wip-rtl status Andy Wingo
2012-06-03 22:30 ` Ludovic Courtès
2012-06-04  9:03   ` Andy Wingo
2012-06-04 21:12     ` Ludovic Courtès
2012-06-05  8:04       ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).