New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ir,build: add support for comments #41

Closed
mmcloughlin opened this Issue Jan 7, 2019 · 1 comment

Comments

1 participant
@mmcloughlin
Copy link
Owner

mmcloughlin commented Jan 7, 2019

It would be good to support comments in the output. At the moment it is natural to have comments in the generator:

avo/examples/sha1/asm.go

Lines 21 to 28 in 022d24d

// Load initial hash.
h0, h1, h2, h3, h4 := GP32(), GP32(), GP32(), GP32(), GP32()
MOVL(h.Offset(0), h0)
MOVL(h.Offset(4), h1)
MOVL(h.Offset(8), h2)
MOVL(h.Offset(12), h3)
MOVL(h.Offset(16), h4)

This could just as well be replaced with Comment("Load initial hash") and it would serve to document the generator and the output.

mmcloughlin added a commit that referenced this issue Jan 11, 2019

mmcloughlin added a commit that referenced this issue Jan 11, 2019

build: Commentf function
Convenience for adding a comment generated with fmt.Sprintf.

Updates #41

mmcloughlin added a commit that referenced this issue Jan 11, 2019

mmcloughlin added a commit that referenced this issue Jan 11, 2019

mmcloughlin added a commit that referenced this issue Jan 11, 2019

@mmcloughlin

This comment has been minimized.

Copy link
Owner

mmcloughlin commented Jan 13, 2019

Consider this done. #8 remains open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment