From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 68E16BC6C for ; Thu, 6 Sep 2007 11:07:16 +0200 (CEST) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l8697F9o027955 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 6 Sep 2007 11:07:16 +0200 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1ITDKP-0003BU-00; Thu, 06 Sep 2007 10:07:09 +0100 Date: Thu, 6 Sep 2007 10:07:09 +0100 To: Tom Cc: Caml-list List Subject: Re: [Caml-list] More registers in modern day CPUs Message-ID: <20070906090709.GA11869@furbychan.cocan.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at concorde with ID 46DFC343.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0200,:01 compiler:01 compiler:01 wikipedia:01 wikipedia:01 wiki:01 wrote:01 compilers:01 caml-list:01 emulate:01 thu:05 variable:06 sep:06 red:92 quite:08 On Thu, Sep 06, 2007 at 08:20:06AM +0200, Tom wrote: > I was thinking about compiler implementation recently, and figured that it > is difficult to design the compiler for a variable number of hardware > registers - compared for designing a compiler witha fixed number of > registers. > > However, would it be possible to "emulate" cpu registers using software? By > keeping registers in the main memory, but accessing them often enough to > keep them in primary cache? That would be quite fast I believe... You might want to grab a good book on compilers and read about register allocation. Or take a look at this Wikipedia page: http://en.wikipedia.org/wiki/Register_allocation Rich. -- Richard Jones Red Hat