[Vm-dev] Fwd: [vm-dev-owner@lists.squeakfoundation.org: Re: Amazing ARM simulator experience]

Eliot Miranda eliot.miranda at gmail.com
Wed Jun 1 19:35:40 UTC 2016


---------- Forwarded message ----------
From: ghost <ghost at major2nd.com>
Date: Wed, Jun 1, 2016 at 12:12 PM
Subject: [vm-dev-owner at lists.squeakfoundation.org: Re: Amazing ARM
simulator experience]
To: eliot.miranda at gmail.com


Eliot, please pass this along to the mailing list if you like. Thanks- P.

From: ghost <ghost at major2nd.com>
To: Eliot Miranda <eliot.miranda at gmail.com>
CC: vm-dev at lists.squeakfoundation.org
In-reply-to: <
CAC20JE1dBwTXJNxOaiLbwhU8O8eeTV4Wg_AJtUSuA2ZO4bkKtA at mail.gmail.com>
        (message from Eliot Miranda on Wed, 1 Jun 2016 10:43:24 -0700)
Subject: Re: Amazing ARM simulator experience
Date: Wed,  1 Jun 2016 12:11:29 -0700 (PDT)

Eliot,

I can't top your adventure, but I have a similar experience to share.

As part of work I was doing on binary code decompilation, for each ISA I had
to build a translator from binary code into something fairly close to C
parse trees.  Now, I didn't intend these trees to be used for anything other
than analysis, but it turned out to be pretty easy to actually execute them.
The project is all written in JavaScript*, and compiling the trees into
JavaScript code turned out to only require a few hundred lines of code
because the primitives are all very low-level and there aren't many of them.
So what we have here is binary code, decompiled into machine-oriented
JavaScript, which is then executed by Google's v8 JIT compiler.

My primo test case was Ghostscript executing "-dNODISPLAY -c 3 4 add =
quit", which doesn't look like much but does require loading and
initializing the entire graphics rendering system (a good deal of which is
written in PostScript and interpreted by GS).  This took 522M ARMv7
instructions in 472 seconds, or a bit over 1 MIPS, on a 2014-era x86/64
workstation.  I wasn't sure whether to be more impressed by v8, or appalled
by how much work GS had to do to get up to speed.

--

L Peter Deutsch <ghost at major2nd.com> :: Aladdin Enterprises :: Healdsburg,
CA

         Was your vote really counted?  http://www.verifiedvoting.org
----------------------------------------------------------------
*If you want to discuss the choice of JavaScript as implementation language,
please e-mail me privately. :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160601/82949255/attachment.htm


More information about the Vm-dev mailing list