This commit is contained in:
2026-03-06 20:46:23 +00:00
parent 33208a2356
commit 36e917b768
6 changed files with 6 additions and 11 deletions

View File

@@ -1,8 +1,5 @@
<p align="center"> <p align="center">
<img src ="https://raw.githubusercontent.com/mmcloughlin/avo/master/logo.svg" width="40%" border="0" alt="avo"/> <img src ="logo.svg" width="40%" border="0" alt="avo"/>
<br/>
<img src="https://img.shields.io/github/actions/workflow/status/mmcloughlin/avo/ci.yml?style=flat-square" alt="Build Status" />
</p> </p>
<p align="center"><b>Generate x86 Assembly with Go</b></p> <p align="center"><b>Generate x86 Assembly with Go</b></p>

View File

@@ -10,7 +10,7 @@ The [code generator](asm.go) is as follows:
package main package main
import . "github.com/mmcloughlin/avo/build" import . "sources.truenas.cloud/code/avo/build"
func main() { func main() {
TEXT("Add", NOSPLIT, "func(x, y uint64) uint64") TEXT("Add", NOSPLIT, "func(x, y uint64) uint64")

View File

@@ -59,7 +59,7 @@ Struct fields can be accessed with the `Field()` method. Note that this _require
[embedmd]:# (asm.go go /.*Package\(.*/) [embedmd]:# (asm.go go /.*Package\(.*/)
```go ```go
Package("github.com/mmcloughlin/avo/examples/args") Package("sources.truenas.cloud/code/avo/examples/args")
``` ```
This package contains the struct definition: This package contains the struct definition:

View File

@@ -8,7 +8,7 @@ In this case, you will need to write the function stub yourself.
```go ```go
package ext package ext
import "github.com/mmcloughlin/avo/examples/ext/ext" import "sources.truenas.cloud/code/avo/examples/ext/ext"
// StructFieldB returns field B. // StructFieldB returns field B.
func StructFieldB(e ext.Struct) byte func StructFieldB(e ext.Struct) byte
@@ -18,7 +18,7 @@ Then in place of the usual `TEXT` declaration we use `Implement` to state that w
[embedmd]:# (asm.go go /.*Package.*/ /RET.*/) [embedmd]:# (asm.go go /.*Package.*/ /RET.*/)
```go ```go
Package("github.com/mmcloughlin/avo/examples/ext") Package("sources.truenas.cloud/code/avo/examples/ext")
Implement("StructFieldB") Implement("StructFieldB")
b := Load(Param("e").Field("B"), GP8()) b := Load(Param("e").Field("B"), GP8())
Store(b, ReturnIndex(0)) Store(b, ReturnIndex(0))

View File

@@ -2,8 +2,6 @@
Integer [geohash](https://en.wikipedia.org/wiki/Geohash) encoding. Integer [geohash](https://en.wikipedia.org/wiki/Geohash) encoding.
Refer to ["Geohash in Golang Assembly"](https://mmcloughlin.com/posts/geohash-assembly) for implementation details.
[embedmd]:# (asm.go /func main/ $) [embedmd]:# (asm.go /func main/ $)
```go ```go
func main() { func main() {

View File

@@ -1,5 +1,5 @@
Regression test for [issue Regression test for [issue
#100](https://github.com/mmcloughlin/avo/issues/100) based on the original #100](sources.truenas.cloud/code/avo/issues/100) based on the original
reported allocation failure. reported allocation failure.
Based on the pull request Based on the pull request