PeachPy icon indicating copy to clipboard operation
PeachPy copied to clipboard

go-generate: invalid UTF-8 encoding

Open Pro7ech opened this issue 2 years ago • 0 comments

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

Pro7ech avatar Jun 03 '22 18:06 Pro7ech