<div dir="ltr">Hi Dimitris,<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 1, 2016 at 3:07 PM, Dimitris Chloupis <span dir="ltr">&lt;<a href="mailto:kilon.alios@gmail.com" target="_blank">kilon.alios@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <br><div dir="ltr"><div><div>My first computer that my father bought me in 1988 was an Amstrad CPC 6128 , with a 4 Mhz CPU and 128kb Ram<br><br></div>My latest computer is a late 2013 quad core 3 Ghz iMac with 8 gb memory. Which makes it at least 3000 times faster than my Amstrad , technology has come a long way the past 30 years. I could not imagine this future even in my wildest dreams. <br><br></div><div>By Gdb you mean the GNU debugger ? <br></div></div></blockquote><div><br></div><div>Yes.  Gdb comes with a lot of different simulators.  So far for executing machine code in Cog we&#39;ve used Bochs for x86 and x86_64, Gdb for ARM v6 and hand-written Smalltalk for MIPSEL.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 1, 2016 at 8:43 PM Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <div dir="ltr">Hi All,<div><br></div><div>    just had to tell people about this morning&#39;s experience using the ARM simulator.  I&#39;ve been building Smalltalk VMs since 1983, so 33 years.  My first on the Three Rivers PERQ was dog slow.  My undergraduate project was done the the National Semiconductor 32016 based Whitechapel Computer Works workstation and its and 32032-based successor.</div><div><br></div><div>This morning I was revamping register management in Cog&#39;s ARMv5/v6 back end, making more registers available by using two of the C argument registers for two of registers the Cogit assigns to various fixed tasks, and using store and load multiple instructions to save and restore concisely the registers around calls into the runtime.</div><div><br></div><div>Remember the architecture here.  The simulator generates ARM machine code into the ByteArray that re[resents the address space, holding all of generated machine code, a small C stack, and the Smalltalk heap.  A plugin, derived from Gdb&#39;s ARM simulator written in C, interprets that machine code, running for a couple of milliseconds at a time in a loop, applying breakpoint calculations, and asserts on every call into the run-time, and that calls into the run-time and accesses of variables in the simulator is done by using illegal addresses in the generated machine code.  Each illegal access causes the Gdb-derived machine code interpreter to return with an error, this error is turned into an exception, the handler for which maps the specific illegal address into a variable or message selector, accesses the variable or activates the message selector, providing the result, and allowing the execution to continue.</div><div><br></div><div>In changing the register management I had a test case that worked, an image that prompted for an expression ands evaluated it, which worked both in the simulator and with the generated VM.  But the real VM, crashed when used on a proper image.  So to debug I started launching the real interactive image in the simulator.</div><div><br></div><div>Well, the amazing experience is that that image, whose machine code is being _interpreted by a C program_ feels /faster/ than my 32016 based implementation back in 1984-ish.  Quite amazing.  I can open windows, type text, access source code (was playing with Message Names) etc.  It&#39;s sluggish, but usable.  Amazing how fast modern machines are.  All on my 2012 vintage 2.2 Ghz Core i7 MacBook Pro.  I&#39;m blown away :-)</div><div><br><div><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>
</blockquote></div>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>