"Ethan Gardener" <eeke...@fastmail.fm> writes:

> On Mon, Feb 1, 2021, at 7:16 AM, cigar562hfsp952f...@icebubble.org wrote:
>> Anthony Sorace <a...@9srv.net> writes:
>> 
>> (6) Incorporating Inferno's Dis virtual machine into the Plan 9 kernel,
>>     so Plan 9 can run Dis binaries natively, without having to run the
>>     Inferno emulator (emu) as a user process.
>
> This idea keeps popping up, but I just thought a Dis to native code
> compiler would achieve the same result without bloating the
> kernel. Perhaps it could even be built into Inferno, if the JIT
> compiler could be modified to output an object file instead of running
> the code.

That's a brilliant idea: a "Dis" assembler for Plan 9, to compile (well,
assemble, really) Dis code to binaries for the host architecture.  The
Dis architecture was specifically designed to make it easy to map the
Dis machine to the underlying architecture.  But... the binary interface
would have to be the Plan 9 one, so the proper place to do such assembly
would be on Plan 9.  If it were an extension of Inferno's JIT, it would
have to track changes made to Plan 9.  Since Dis is stable and
standardized, it makes more sense for a Plan 9 tool to track Dis than
the other way around.  Come to think of it, you wouldn't even need to
implement a full assembler.  Assembling Dis on Plan 9 could be achieved
simply by dis-assembling (a la appl/cmd/disdump.b) Dis modules to Plan 9
assembly language.  The Plan 9 assembler suite already exists.

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T39aec8f3f9d8503d-Me3982e6c0fa36b0478965cb7
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to