<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 15, 2022 at 10:22 AM tim Rowledge <<a href="mailto:tim@rowledge.org">tim@rowledge.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> <br>
I could have sworn I've read emails from someone that did a MIPS cog port, but it hasn't made it to the 'official' opensmalltalk-vm repository as yet.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Ryan Macnak did a 32-bit MIPS simulator; it's still in VMMaker.oscog, but it needs a little love to make it simulate fully.  AFAIA it was never used to produce C sources and a "real" JIT.</div><div class="gmail_default" style="font-size:small"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">A complication for a RiscV cog that I would anticipate from my fairly limited reading on RiscV is that the actual instruction set for any particular cpu can vary quite a lot because of the building-block nature of the specification. I hope it's not quite as confusing as it seems to me so far.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">That's not such an issue for the core Smalltalk JIT. Its use of instruction sets is pretty unsophisticated; for example, it doesn't use vector instructions, etc.  The situation is similar on ARMv8.  The only sophistication is in locking for the multithreaded FFI (where I implemented both 8.1 and 8.0 style locking; see CogARMv8Compiler protocol multi-threading), initialization & cache flushing code. But one doesn't have to go near these areas if one doesn't want to.  So to a first approximation the JIT uses only core ISA instructions.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Now see below in response to Ken's status report "No JIT (no squeak,cog.spur) yet".</div><div class="gmail_default" style="font-size:small"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
> On 2022-06-15, at 5:59 AM, <a href="mailto:ken.dickey@whidbey.com" target="_blank">ken.dickey@whidbey.com</a> wrote:<br>
> <br>
> On 2022-06-15 03:06, Gerald Klix via Cuis-dev wrote:<br>
> <br>
>> Nevertheless I don't understand Ken's answer.<br>
> <br>
>> To make a story too long short: Obviously there never was a JIT version of the<br>
>> opensmalltalk VM for the RiscV-architecture (I don't know to state this in a more explicit way).<br>
> <br>
> Gerald,<br>
> <br>
> Sorry to be confusing.<br>
> <br>
> OpenSmalltalk-VM has many delivery targets.<br>
>  OSs: Windows, Linux, MacOS, SunOS. [?RiscOS?]<br>
<br>
<br>
Ah. RISC OS. Yes, well, I haven't had any time to update that in quite a while. I really would like to do a cog version since we have the ARM cog already sorted, but *time*. What even is that thing *spare time*?<br>
<br>
<br>
>  CPU Architectures: Intel, Arm, now Risc-V<br>
>     32 bit, 64 bit variants<br>
>  Displays & plugins<br>
>     [X-Windows, FrameBuffer, ..]<br>
> <br>
> There are three basic VM "flavors"<br>
>   Original stack VM ["Back to the Future"]<br>
>   Spur [Stack VM with top of stack mapped to machine registers]<br>
>      a.k.s. squeak.stack.spur<br>
>   Cog [Above + JIT]<br>
>      a.k.a. squeak.cog.spur<br>
> <br>
> The VM easiest to port is squeak.stack.spur<br>
> <br>
> The squeak.stack.spur flavor is running now on RISC-V RV64 (64 bit) Debian Linux.<br>
> <br>
> No JIT (no squeak,cog.spur) yet.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Boris Shingarov has done one but hasn't contributed it back because he's interested in auto-generating the JIT backend (the mapping of the JIT's abstract instruction set to the processor's concrete instructions) from a formal processor description. And, at least when last we talked, he was interested in interpreting the description when generating the code rather than generating the mapping methods (such as concretizeCall, concretizeMoveRR, etc) from the specification.  Perhaps Boris would be willing to help someone port his work back so we could have a RISC-V port done quickly.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Tom Braun & Leon Matthes are doing a RISC-V backend now to learn how the JIT works before they work on the incremental garbage collector and compactor with me as a mentor/collaborator.  I don't know if they're interested in finishing and/or collaborating with someone to finish, to produce a production RISC-V JIT.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In any case, taking Tom & Leon & Boris's work together should get someone a long way towards a production RISC-V back end.  And in generating ARMv8 (fully 64-bit) back ends for Linux aarch64 and MacOS M1/arm64 platforms a number of 64-bit RISC issues have been solved.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Boris, Tom & Leon would you care to comment?</div><div class="gmail_default" style="font-size:small"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
> <br>
> HTH,<br>
> -KenD<br>
> <br><br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" rel="noreferrer" target="_blank">http://www.rowledge.org/tim</a><br>
Strange OpCodes: SDP: Search and Destroy Pointer<br></blockquote></div><br><div dir="ltr" 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>