9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Aram Hăvărneanu" <aram.h@mgk.ro>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>,
	Brantley Coile <brantley@coraid.com>,
	Charles Forsyth <charles.forsyth@gmail.com>
Subject: Re: [9fans] FP register usage in Plan9 assembler
Date: Thu,  4 Feb 2016 15:30:31 +0100	[thread overview]
Message-ID: <CAEAzY391f6z+PF=2neRyN4jtp+n-ymBLZahXsGC3JbDzGfaR=Q@mail.gmail.com> (raw)
In-Reply-To: <CAEAzY38_vqFn5pBszqpOnPk2x9XdsikmfPMAct_4hy_UGWGZ8w@mail.gmail.com>

(Totally unrelated to the original post, but hey, we've already
left that path, so why not?)

Speaking of the Plan 9 toolchain, I much prefer the way it works
internally compared to the Go toolchain because it is much easier
to re-target. I haven't ported the Plan 9 toolchain (only saw Charles
do it), but I did port the Go toolchain twice, once for arm64, and
once for sparc64; once in C, and once in Go.

In Plan 9 porting is easy because the assembler, the compiler, and
the loader are all separate programs. Apart from trivial things
like a.out.h, they are completely independent. One could work on
them in any order. Better yet, the compiler can generate object
files before the loader is ready, and when the loader is finally
ready, it can just consume these already-produced object files.

Alternativelly, one can have the assembler ready very quickly, and
write enough of a libc so he can test the compiler when that is
written.

In Go it's not like this. The assembler, compiler, and linker all
link against a library which does roughly what the Plan 9 loader
does. This means that you have to have this working in some capacity
before you can start the other programs.

But this library is very hard to test since you don't have an
assembler yet.

Even worse, once you wrote enough of this library to have the
assembler and compiler produce some kind of output, you still can't
test anything because you need a runtime.

But the runtime is written in Go, so now you have to write large
quantities of Go and tricky assembly, without having the possibilty
to test anything, and while using a broken compiler (since the
compiler has not ran a single program yet, it's bound to be broken).

This tightly-coupled design makes development very difficult. Having
it done twice (actually three times), I'd say it's about 7x-10x
more work to re-target the Go toolchain than it is to re-target the
Plan 9 toolchain.

Mind you, compared to gcc and clang, 7x-10x more work is still
pretty good...

-- 
Aram Hăvărneanu



  reply	other threads:[~2016-02-04 14:30 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 16:47 Giacomo Tesio
2016-02-01 22:38 ` Charles Forsyth
2016-02-01 22:44   ` Charles Forsyth
2016-02-01 22:48 ` cinap_lenrek
2016-02-01 23:34   ` Giacomo Tesio
2016-02-02  0:36     ` Charles Forsyth
2016-02-02  0:58       ` Giacomo Tesio
2016-02-02 12:39         ` Aram Hăvărneanu
2016-02-02 16:42 ` Steven Stallion
2016-02-02 17:16   ` lucio
2016-02-03 15:24   ` erik quanstrom
2016-02-03 15:51     ` Steven Stallion
2016-02-03 16:36       ` erik quanstrom
2016-02-04 10:08     ` Aram Hăvărneanu
2016-02-04 12:04       ` lucio
2016-02-04 15:58         ` Ryan Gonzalez
2016-02-04 16:09           ` lucio
2016-02-04 18:06             ` Ryan Gonzalez
2016-02-04 18:14               ` balaji
2016-02-04 18:28             ` Ryan Gonzalez
2016-02-04 19:31           ` Skip Tavakkolian
2016-02-04 12:24       ` Brantley Coile
2016-02-04 12:53         ` lucio
2016-02-04 14:57           ` erik quanstrom
2016-02-04 14:05         ` Aram Hăvărneanu
2016-02-04 14:10           ` Aram Hăvărneanu
2016-02-04 14:30             ` Aram Hăvărneanu [this message]
2016-02-04 15:07         ` Charles Forsyth
2016-02-04 15:16           ` erik quanstrom
2016-02-04 15:11         ` erik quanstrom
2016-02-04 15:22           ` erik quanstrom
2016-02-04 15:26             ` Charles Forsyth
2016-02-04 20:34               ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEAzY391f6z+PF=2neRyN4jtp+n-ymBLZahXsGC3JbDzGfaR=Q@mail.gmail.com' \
    --to=aram.h@mgk.ro \
    --cc=9fans@9fans.net \
    --cc=brantley@coraid.com \
    --cc=charles.forsyth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).