update
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
<p align="center">
|
||||
<img src ="https://raw.githubusercontent.com/mmcloughlin/avo/master/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" />
|
||||
|
||||
<img src ="logo.svg" width="40%" border="0" alt="avo"/>
|
||||
</p>
|
||||
|
||||
<p align="center"><b>Generate x86 Assembly with Go</b></p>
|
||||
|
||||
@@ -10,7 +10,7 @@ The [code generator](asm.go) is as follows:
|
||||
|
||||
package main
|
||||
|
||||
import . "github.com/mmcloughlin/avo/build"
|
||||
import . "sources.truenas.cloud/code/avo/build"
|
||||
|
||||
func main() {
|
||||
TEXT("Add", NOSPLIT, "func(x, y uint64) uint64")
|
||||
|
||||
@@ -59,7 +59,7 @@ Struct fields can be accessed with the `Field()` method. Note that this _require
|
||||
|
||||
[embedmd]:# (asm.go go /.*Package\(.*/)
|
||||
```go
|
||||
Package("github.com/mmcloughlin/avo/examples/args")
|
||||
Package("sources.truenas.cloud/code/avo/examples/args")
|
||||
```
|
||||
|
||||
This package contains the struct definition:
|
||||
|
||||
@@ -8,7 +8,7 @@ In this case, you will need to write the function stub yourself.
|
||||
```go
|
||||
package ext
|
||||
|
||||
import "github.com/mmcloughlin/avo/examples/ext/ext"
|
||||
import "sources.truenas.cloud/code/avo/examples/ext/ext"
|
||||
|
||||
// StructFieldB returns field B.
|
||||
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.*/)
|
||||
```go
|
||||
Package("github.com/mmcloughlin/avo/examples/ext")
|
||||
Package("sources.truenas.cloud/code/avo/examples/ext")
|
||||
Implement("StructFieldB")
|
||||
b := Load(Param("e").Field("B"), GP8())
|
||||
Store(b, ReturnIndex(0))
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
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/ $)
|
||||
```go
|
||||
func main() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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.
|
||||
|
||||
Based on the pull request
|
||||
|
||||
Reference in New Issue
Block a user