You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As referenced in #39, Avo cannot generate TEXT directives without prepending the "pesky unicode dot" to the associated symbol.
I have been working on porting the amd64 assembly in Go's crypto libraries to Avo. A few files (crypto/aes/asm_amd64.s, crypto/internal/nistec/p256_asm_amd64.s, and golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s) contain internal assembly functions that are not linked to any Go package.
Avo unconditionally prepends the "pesky unicode dot" to all function names:
This makes it impossible to write internal assembly functions using Avo.
Proposal
I propose adding an IsInternal field to the existing Function struct. This can be used to conditionally prepend the unicode dot during the printing process. We could add an InternalFunction() call which runs parallel to the existing Function() call but sets IsInternal to true. Additionally a call to SignatureExpr() should create an error if the active function has IsInternal: true
This will allow the generation of internal assembly functions. I am using the phrase "internal function" as that naming convention appears in crypto/internal/nistec/p256_asm_amd64.s and golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s
Reference
Internal amd64 assembly functions currently in Go's crypto library:
Adds support for internal assembly functions. The new InternalFunction()
call outputs a TEXT directive sans the pesky unicode dot used in Go
assembly. This allows Avo to generate an internal assembly function that
is not linked to any symbols in the corresponding package.
Closesmmcloughlin#442
Issue
As referenced in #39, Avo cannot generate
TEXT
directives without prepending the "pesky unicode dot" to the associated symbol.I have been working on porting the amd64 assembly in Go's crypto libraries to Avo. A few files (
crypto/aes/asm_amd64.s
,crypto/internal/nistec/p256_asm_amd64.s
, andgolang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s
) contain internal assembly functions that are not linked to any Go package.Avo unconditionally prepends the "pesky unicode dot" to all function names:
avo/printer/goasm.go
Line 90 in 13668f4
This makes it impossible to write internal assembly functions using Avo.
Proposal
I propose adding an
IsInternal
field to the existingFunction
struct. This can be used to conditionally prepend the unicode dot during the printing process. We could add anInternalFunction()
call which runs parallel to the existingFunction()
call but setsIsInternal
totrue
. Additionally a call toSignatureExpr()
should create an error if the active function hasIsInternal: true
This will allow the generation of internal assembly functions. I am using the phrase "internal function" as that naming convention appears in
crypto/internal/nistec/p256_asm_amd64.s
andgolang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s
Reference
Internal amd64 assembly functions currently in Go's crypto library:
The text was updated successfully, but these errors were encountered: