From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: Register VM WIP Date: Wed, 16 May 2012 09:15:23 +0200 Message-ID: <87fwb0k35g.fsf@pobox.com> References: <871umqr8q0.fsf@pobox.com> <873972zczy.fsf@gnu.org> <87bolpmgew.fsf@pobox.com> <871umkbvp3.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1337152548 19640 80.91.229.3 (16 May 2012 07:15:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 16 May 2012 07:15:48 +0000 (UTC) Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed May 16 09:15:47 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SUYSY-0007Rh-0x for guile-devel@m.gmane.org; Wed, 16 May 2012 09:15:46 +0200 Original-Received: from localhost ([::1]:59024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUYSX-0007Vb-5c for guile-devel@m.gmane.org; Wed, 16 May 2012 03:15:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUYSP-0007VU-PK for guile-devel@gnu.org; Wed, 16 May 2012 03:15:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUYSJ-000246-Ch for guile-devel@gnu.org; Wed, 16 May 2012 03:15:37 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:60928 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUYSJ-00023n-3g; Wed, 16 May 2012 03:15:31 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 7430B8345; Wed, 16 May 2012 03:15:28 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=G8KkVtAVqLfw8XUjRvaG/D+C66Y=; b=E+Zils ryB/6jxauGlpI0wPj2zbZOllYHY7lKJjOGQImcK2vIGTkqZtYVtdymoe0FbAL7/j FLEoumGL4HSH8zDAhdePHqtKbgIvpWafqR41Pqxq8JCMBxIiQvQweyZOqZ1HOoEX lb527lva5B1dtEjorXHNE94HtQny7EZPFQoxQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=KTDV0OlPlBIyJQ6JylU+ArbFtj9DQmQv a19ngSDF2T4WaE7bgM9vaXq/P/0mZxEbC1UooDqw3TV/68jryOYFqPEYbY563OIa kLFhp/tNGeHrAY3646Ru5itm67qYsQy842lFkTkbS3Z/R19Lg5TDvhWOzw9iUk7I 2HAH1AS4oD4= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 6D0088344; Wed, 16 May 2012 03:15:28 -0400 (EDT) Original-Received: from badger (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id C30938343; Wed, 16 May 2012 03:15:26 -0400 (EDT) In-Reply-To: <871umkbvp3.fsf@netris.org> (Mark H. Weaver's message of "Wed, 16 May 2012 00:23:36 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Pobox-Relay-ID: E94D19AC-9F26-11E1-99EE-E981AF15ED39-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 74.115.168.62 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14463 Archived-At: On Wed 16 May 2012 06:23, Mark H Weaver 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/