On Thu, May 18, 2017 at 11:12 AM,  <alexanderao...@gmail.com> wrote:
>
> I want to develop a new target for Go and I want to know what sort of
> support Go has to facilitate this.
>
> I know I could use some functionality that's provided in in gotypes. I can
> use Gotypes to generate AST and typecheck it, but before I went ahead with
> making my own visitor for the AST, I wanted to know if there is some other
> framework already established for accomplishing this sort of thing.
>
> GCC, for example, allows new targets by operating on their IR, but I don't
> know if there is some analog for the Go compiler.
>
> I'm aware of gccgo, but I wanted to accomplish this task entirely in Go, if
> possible.

Do you mean that you want to generate code for a different processor?
Which processor?

Basically you need to start by adding your processor to
cmd/internal/obj.  Then cmd/asm/internal/arch, cmd/compile/internal,
and cmd/link/internal.  Look at the existing processor support while
adding your new processor.

Then you can move on to runtime (including internal/sys and
internal/atomic) and syscall and sync/atomic.

Then you are done, except for writing assembly-optimized versions of
code in crypto and maybe a couple of other places.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to