Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #4518
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!border2.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Sun, 08 Jun 2014 04:57:40 -0500 |
| From | "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> |
| Newsgroups | comp.programming |
| References | <428b3a94-4ea5-4545-b1ab-9a65c44230a5@googlegroups.com> |
| Subject | Re: register count |
| Date | Sun, 8 Jun 2014 10:54:22 +0100 |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5512 |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.5512 |
| X-RFC2646 | Format=Flowed; Original |
| Message-ID | <JdWdnSWj7JUJrgnOnZ2dnUVZ8lOdnZ2d@bt.com> (permalink) |
| Lines | 40 |
| X-Usenet-Provider | http://www.giganews.com |
| X-AuthenticatedUsername | NoAuthUser |
| X-Trace | sv3-QIcoU4meplqOEG/gVHmsrMnWOoz04aF9w8yAwkKZ3mCxkfG5AE2l+vdiqqbiNsHQ/TAv3Uwf+G6dR3B!uwxO3WYzuOFS09gT9xKDDikyAJeH2PmHjHJn2b5KgpsAeFb/pZsw8DY7Mhl9kYW8lCRI6wmKqhU= |
| X-Complaints-To | abuse@btinternet.com |
| X-DMCA-Complaints-To | abuse@btinternet.com |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 2815 |
| Xref | csiph.com comp.programming:4518 |
Show key headers only | View raw
bob smith wrote:
> Let's say you are creating your own Virtual Machine.
OK, I'm writing my own VM
> For instance, it might be like the Java VM.
Could be...
> How do you decide how many registers to put in it?
Depends on why I'm writing it, and what architecture I've chosen.
If I'm emulating a real machine, then the decision is out of my hands.
If I'm writing it as a tool to explore register architectures then there is no
decision to make.
If I'm writing an interpreted VM but still want the thing to be reasonably
quick then I'll want the VM to do as much work in each step as possible (to
minimise instruction dispatch overhead (which is a big drain in most
interpreted VMs), in which case I may want to use an "infinite register" model
(just use as many registers as you want, let the VM look after it). One
possible downside of that is that it probably requires the virtual machine code
to identify functions (methods, frames, whatever) separately. Another is that
it doesn't work so well if I'm targeting Forth ;-)
If I'm writing a VM that I intend to be JITed (or other approaches where the VM
code is the /input/ to a more-or-less traditional compilation stage), then I
will design the VM code to make that as easy as possible. I might even bake
SSA into the VM code design. I'm not aware of any work comparing different VM
code architectures on how well they can be compiled -- after all, writing a JIT
isn't something you do everyday -- but from what I've seen people generally
seem to go for the infinite-register model too. (Certainly the stack model is
considered "difficult").
-- chris
Back to comp.programming | Previous | Next — Previous in thread | Find similar | Unroll thread
register count bob smith <bob@coolfone.net63.net> - 2014-06-04 17:55 -0700 Re: register count "BartC" <bc@freeuk.com> - 2014-06-07 19:28 +0100 Re: register count "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-06-08 10:54 +0100
csiph-web