update
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
"text/tabwriter"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
)
|
||||
|
||||
// Function represents a function that constructs some collection of
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
)
|
||||
|
||||
func TestFunctionsDuplicateFormSignatures(t *testing.T) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
const (
|
||||
// Package is the avo package import path.
|
||||
Package = "github.com/mmcloughlin/avo"
|
||||
Package = "sources.truenas.cloud/code/avo"
|
||||
|
||||
// IRPackage is the package that defines intermediate representation types.
|
||||
IRPackage = "ir"
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"go/token"
|
||||
"testing"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
)
|
||||
|
||||
func TestISAsIdentifier(t *testing.T) {
|
||||
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/gen"
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/load"
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
"sources.truenas.cloud/code/avo/internal/gen"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/load"
|
||||
"sources.truenas.cloud/code/avo/printer"
|
||||
)
|
||||
|
||||
var generators = map[string]gen.Builder{
|
||||
@@ -34,7 +34,7 @@ var (
|
||||
bootstrap = flag.Bool("bootstrap", false, "regenerate instruction list from original data")
|
||||
datadir = flag.String(
|
||||
"data",
|
||||
filepath.Join(build.Default.GOPATH, "src/github.com/mmcloughlin/avo/internal/data"),
|
||||
filepath.Join(build.Default.GOPATH, "src/sources.truenas.cloud/code/avo/internal/data"),
|
||||
"path to data directory",
|
||||
)
|
||||
output = flag.String("output", "", "path to output file (default stdout)")
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/mmcloughlin/avo/tests/thirdparty"
|
||||
"sources.truenas.cloud/code/avo/tests/thirdparty"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<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" />
|
||||
<a href="https://pkg.go.dev/github.com/mmcloughlin/avo"><img src="https://img.shields.io/badge/doc-reference-007d9b?logo=go&style=flat-square" alt="go.dev" /></a>
|
||||
<a href="https://sources.truenas.cloud/code"><img src="https://img.shields.io/badge/doc-reference-007d9b?logo=go&style=flat-square" alt="go.dev" /></a>
|
||||
<a href="https://goreportcard.com/report/github.com/mmcloughlin/avo"><img src="https://goreportcard.com/badge/github.com/mmcloughlin/avo?style=flat-square" alt="Go Report Card" /></a>
|
||||
</p>
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/api"
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/api"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
)
|
||||
|
||||
// Enum is a generated enumeration type. This assists with mapping between the
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/prnt"
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/prnt"
|
||||
"sources.truenas.cloud/code/avo/printer"
|
||||
)
|
||||
|
||||
type asmtest struct {
|
||||
|
||||
@@ -3,10 +3,10 @@ package gen
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/api"
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/prnt"
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
"sources.truenas.cloud/code/avo/internal/api"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/prnt"
|
||||
"sources.truenas.cloud/code/avo/printer"
|
||||
)
|
||||
|
||||
type build struct {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package gen
|
||||
|
||||
import (
|
||||
"github.com/mmcloughlin/avo/internal/api"
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/prnt"
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
"sources.truenas.cloud/code/avo/internal/api"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/prnt"
|
||||
"sources.truenas.cloud/code/avo/printer"
|
||||
)
|
||||
|
||||
type buildtest struct {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package gen
|
||||
|
||||
import (
|
||||
"github.com/mmcloughlin/avo/internal/api"
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/prnt"
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
"sources.truenas.cloud/code/avo/internal/api"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/prnt"
|
||||
"sources.truenas.cloud/code/avo/printer"
|
||||
)
|
||||
|
||||
type ctors struct {
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/api"
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/prnt"
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
"sources.truenas.cloud/code/avo/internal/api"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/prnt"
|
||||
"sources.truenas.cloud/code/avo/printer"
|
||||
)
|
||||
|
||||
type ctorstest struct {
|
||||
|
||||
@@ -3,8 +3,8 @@ package gen
|
||||
import (
|
||||
"go/format"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/printer"
|
||||
)
|
||||
|
||||
// Interface of an instruction code generator.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package gen
|
||||
|
||||
import (
|
||||
"github.com/mmcloughlin/avo/internal/api"
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/prnt"
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
"sources.truenas.cloud/code/avo/internal/api"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/prnt"
|
||||
"sources.truenas.cloud/code/avo/printer"
|
||||
)
|
||||
|
||||
type godata struct {
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/api"
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/prnt"
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
"sources.truenas.cloud/code/avo/internal/api"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/prnt"
|
||||
"sources.truenas.cloud/code/avo/printer"
|
||||
)
|
||||
|
||||
type mov struct {
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/api"
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/prnt"
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
"sources.truenas.cloud/code/avo/internal/api"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/prnt"
|
||||
"sources.truenas.cloud/code/avo/printer"
|
||||
)
|
||||
|
||||
type optab struct {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package gen
|
||||
|
||||
import (
|
||||
"github.com/mmcloughlin/avo/internal/api"
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/prnt"
|
||||
"sources.truenas.cloud/code/avo/internal/api"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/prnt"
|
||||
)
|
||||
|
||||
// DeclareTestArguments prints a block of variables declaring a valid operand of
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/test"
|
||||
"sources.truenas.cloud/code/avo/internal/test"
|
||||
)
|
||||
|
||||
func TestClientRepository(t *testing.T) {
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/gen"
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/test"
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
"sources.truenas.cloud/code/avo/internal/gen"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/test"
|
||||
"sources.truenas.cloud/code/avo/printer"
|
||||
)
|
||||
|
||||
func TestHaveInstructions(t *testing.T) {
|
||||
|
||||
@@ -10,17 +10,17 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/opcodescsv"
|
||||
"github.com/mmcloughlin/avo/internal/opcodesextra"
|
||||
"github.com/mmcloughlin/avo/internal/opcodesxml"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/opcodescsv"
|
||||
"sources.truenas.cloud/code/avo/internal/opcodesextra"
|
||||
"sources.truenas.cloud/code/avo/internal/opcodesxml"
|
||||
)
|
||||
|
||||
// This file is a mess. Some of this complexity is unavoidable, since the state
|
||||
// of x86 instruction databases is also a mess, especially when it comes to
|
||||
// idiosyncrasies of the Go assembler implementation. Some of the complexity is
|
||||
// probably avoidable by migrating to using Intel XED
|
||||
// (https://github.com/mmcloughlin/avo/issues/23), but for now this is an unholy
|
||||
// (https://sources.truenas.cloud/code/avo/issues/23), but for now this is an unholy
|
||||
// mix of PeachPy's Opcodes database and Go's x86 CSV file.
|
||||
//
|
||||
// The goal is simply to keep as much of the uglyness in this file as possible,
|
||||
@@ -796,7 +796,7 @@ func evexLLsize(f opcodesxml.Form) int {
|
||||
// version is to encode suffixes, and these are represented by other instruction
|
||||
// forms.
|
||||
//
|
||||
// TODO(mbm): restrict use of vector registers https://github.com/mmcloughlin/avo/issues/146
|
||||
// TODO(mbm): restrict use of vector registers https://sources.truenas.cloud/code/avo/issues/146
|
||||
func vexevex(fs []inst.Form) ([]inst.Form, error) {
|
||||
// Group forms by deduping ID.
|
||||
byid := map[string][]inst.Form{}
|
||||
|
||||
@@ -3,11 +3,11 @@ package load_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/gen"
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"github.com/mmcloughlin/avo/internal/load"
|
||||
"github.com/mmcloughlin/avo/internal/test"
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
"sources.truenas.cloud/code/avo/internal/gen"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/load"
|
||||
"sources.truenas.cloud/code/avo/internal/test"
|
||||
"sources.truenas.cloud/code/avo/printer"
|
||||
)
|
||||
|
||||
func Load(t *testing.T) []inst.Instruction {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package opcodesextra
|
||||
|
||||
import "github.com/mmcloughlin/avo/internal/inst"
|
||||
import "sources.truenas.cloud/code/avo/internal/inst"
|
||||
|
||||
// bitalg is the "Bit Algorithms" instruction set.
|
||||
var bitalg = []*inst.Instruction{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package opcodesextra
|
||||
|
||||
import "github.com/mmcloughlin/avo/internal/inst"
|
||||
import "sources.truenas.cloud/code/avo/internal/inst"
|
||||
|
||||
// Reference: https://github.com/golang/go/blob/go1.19.3/src/cmd/internal/obj/x86/avx_optabs.go#L376-L383
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package opcodesextra
|
||||
|
||||
import "github.com/mmcloughlin/avo/internal/inst"
|
||||
import "sources.truenas.cloud/code/avo/internal/inst"
|
||||
|
||||
// gfni is the "Galois Field New Instructions" instruction set.
|
||||
var gfni = []*inst.Instruction{
|
||||
|
||||
@@ -4,7 +4,7 @@ package opcodesextra
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
)
|
||||
|
||||
// sets of extra instructions.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package opcodesextra
|
||||
|
||||
import "github.com/mmcloughlin/avo/internal/inst"
|
||||
import "sources.truenas.cloud/code/avo/internal/inst"
|
||||
|
||||
// MOVLQZX does not appear in either x86 CSV or Opcodes, but does appear in stdlib assembly.
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package opcodesextra
|
||||
|
||||
import "github.com/mmcloughlin/avo/internal/inst"
|
||||
import "sources.truenas.cloud/code/avo/internal/inst"
|
||||
|
||||
// vaes is the "Vector Advanced Encryption Standard" instruction set.
|
||||
var vaes = []*inst.Instruction{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package opcodesextra
|
||||
|
||||
import (
|
||||
"github.com/mmcloughlin/avo/internal/inst"
|
||||
"sources.truenas.cloud/code/avo/internal/inst"
|
||||
)
|
||||
|
||||
// vbmi2 is the "Vector Bit Manipulation Instructions 2" instruction set.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package opcodesextra
|
||||
|
||||
import "github.com/mmcloughlin/avo/internal/inst"
|
||||
import "sources.truenas.cloud/code/avo/internal/inst"
|
||||
|
||||
// vnni is the "Vector Neural Network Instructions" instruction set.
|
||||
var vnni = []*inst.Instruction{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package opcodesextra
|
||||
|
||||
import "github.com/mmcloughlin/avo/internal/inst"
|
||||
import "sources.truenas.cloud/code/avo/internal/inst"
|
||||
|
||||
// vpclmulqdq is the "Vector Carry-less Multiplication" instruction set.
|
||||
var vpclmulqdq = []*inst.Instruction{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package opcodesextra
|
||||
|
||||
import "github.com/mmcloughlin/avo/internal/inst"
|
||||
import "sources.truenas.cloud/code/avo/internal/inst"
|
||||
|
||||
// vpopcntdq is the "Vector Population Count" instruction set.
|
||||
var vpopcntdq = []*inst.Instruction{
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"github.com/mmcloughlin/avo/internal/stack"
|
||||
"sources.truenas.cloud/code/avo/internal/stack"
|
||||
)
|
||||
|
||||
const pkg = "github.com/mmcloughlin/avo/internal/stack_test"
|
||||
const pkg = "sources.truenas.cloud/code/avo/internal/stack_test"
|
||||
|
||||
func TestFramesFirst(t *testing.T) {
|
||||
fs := stack.Frames(0, 1)
|
||||
|
||||
Reference in New Issue
Block a user