Show HN: C to Go Assembly
github.com
Show HN: C to Go Assembly
1–10 of 12 posts
Re: Show HN: C to Go Assembly
#2Out of curiosity, any idea how well does Go asm works with Delve (the Go debugger)?
Re: Show HN: C to Go Assembly
#3Probably worth mentioning the blog post too: https://blog.minio.io/c2goasm-c-to-go-assembly-bb723d2f777f Out of curiosity, any idea how well does Go asm works with Delve (the Go debugger)?
Re: Show HN: C to Go Assembly
#4Re: Show HN: C to Go Assembly
#5So, is go assembly the IR inside the Go compiler?
Re: Show HN: C to Go Assembly
#6So, is go assembly the IR inside the Go compiler?
No, it is not an IR code such as in Java or .Net. At compile time it is translated into opcodes for the corresponding architecture that you are compiling for.
Fundamentally, it's a representation and it's intermediate isn't it?
Re: Show HN: C to Go Assembly
#7Earlier quoted context omitted.
No, it is not an IR code such as in Java or .Net. At compile time it is translated into opcodes for the corresponding architecture that you are compiling for.
I disagree. I think saying that it's the lowered intermediate representation in the Go compiler pipeline is a really good description. It's equivalent to the LIR in Java's C2 compiler. I'm not sure what the equivalent is in .net. Fundamentally, it's a representation and it's intermediate isn't it?
Freedoms taken by the go assemblers also seem to be decreasing as the compiler becomes smarter. E.g. instruction reordering is no longer performed (https://github.com/golang/go/issues/15837).
You can read about the assemblers here: https://golang.org/doc/asm
Re: Show HN: C to Go Assembly
#8Re: Show HN: C to Go Assembly
#9Probably worth mentioning the blog post too: https://blog.minio.io/c2goasm-c-to-go-assembly-bb723d2f777f Out of curiosity, any idea how well does Go asm works with Delve (the Go debugger)?
Re: Show HN: C to Go Assembly
#10Earlier quoted context omitted.
I disagree. I think saying that it's the lowered intermediate representation in the Go compiler pipeline is a really good description. It's equivalent to the LIR in Java's C2 compiler. I'm not sure what the equivalent is in .net. Fundamentally, it's a representation and it's intermediate isn't it?
No, not really. Go's assembly might be considered somewhat higher level than regular assembly code, but it's certainly architecture specific. The examples highlighted use x86 SIMD instructions unavailable on other architectures. Freedoms taken by the go assemblers also seem to be decreasing as the compiler becomes smarter. E.g. instruction reordering is no longer performed ( https://github.com/golang/go/issues/15837…