PeachPy
PeachPy copied to clipboard
go-generate: invalid UTF-8 encoding
After running go generate and trying to build the example using the main branch of PeachPy, I get the following error:
.\dot_product_amd64.s:11:6: invalid UTF-8 encoding
.\dot_product_amd64.s:11:6: invalid UTF-8 encoding
.\dot_product_amd64.s:11: expected '(', found DotProduct
asm: assembly of .\dot_product_amd64.s failed
After some investigation, using asm code from other examples, and a hex editor, it turns out that editing
TEXT ·DotProduct(SB),4,$0-28
to
TEXT ·DotProduct(SB),4,$0-28
solves the issue.
i.e.: the byte c2
seems to be missing before the function name declaration? But it doesn't show by default in an editor.
I'm new to go ASM and I have no idea of what is going on here.
I'm using go1.18.2 windows/amd64