unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Mark H Weaver <mhw@netris.org>
Cc: "Ludovic Courtès" <ludo@gnu.org>, guile-devel@gnu.org
Subject: Re: Register VM WIP
Date: Wed, 16 May 2012 09:15:23 +0200	[thread overview]
Message-ID: <87fwb0k35g.fsf@pobox.com> (raw)
In-Reply-To: <871umkbvp3.fsf@netris.org> (Mark H. Weaver's message of "Wed, 16 May 2012 00:23:36 -0400")

On Wed 16 May 2012 06:23, Mark H Weaver <mhw@netris.org> writes:

> It's surprising to me for another reason: in order to make the
> instructions reasonably compact, only a limited number of bits are
> available in each instruction to specify which registers to use.

It turns out that being reasonably compact isn't terribly important --
more important is the number of opcodes it takes to get something done,
which translates to the number of dispatches.  Have you seen the "direct
threading" VM implementation strategy?  In that case the opcode is not
an index into a jump table, it's a word that encodes the pointer
directly.  So it's a word wide, just for the opcode.  That's what
JavaScriptCore does, for example.  The opcode is a word wide, and each
operand is a word as well.

The design of the wip-rtl VM is to allow 16M registers (24-bit
addressing).  However many instructions can just address 2**8 registers
(8-bit addressing) or 2**12 registers (12-bit addressing).  We will
reserve registers 253 to 255 as temporaries.  If you have so many
registers as to need more than that, then you have to shuffle operands
down into the temporaries.  That's the plan, anyway.

Cheers,

Andy
-- 
http://wingolog.org/



  reply	other threads:[~2012-05-16  7:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 16:19 Register VM WIP Andy Wingo
2012-05-11 20:29 ` Stefan Israelsson Tampe
2012-05-16 15:01   ` Andy Wingo
2012-05-14 21:09 ` Ludovic Courtès
2012-05-14 21:28   ` Andrew Gwozdziewycz
2012-05-15 18:45     ` Andy Wingo
2012-05-16  0:39       ` Noah Lavine
2012-05-16  4:23         ` Mark H Weaver
2012-05-16  7:15           ` Andy Wingo [this message]
2012-05-16 13:44             ` Mark H Weaver
2012-05-16 14:00               ` David Kastrup
2012-05-16 14:54               ` Noah Lavine
2012-05-16 15:05                 ` Andy Wingo
2012-05-16 20:39                 ` Ludovic Courtès
2012-05-16 14:58               ` Andy Wingo
2012-05-16 16:27                 ` Mark H Weaver
2012-05-16 16:39                   ` Andy Wingo
2012-05-16 18:23                     ` Noah Lavine
2012-05-16  7:10         ` Andy Wingo
2012-05-15 18:49   ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fwb0k35g.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).