build: rename the module to sourcedock.dev/petrbalvin/gasm-sdk
Test / test (push) Successful in 4m18s

This commit is contained in:
2026-09-26 11:08:43 +02:00
parent 332c63e440
commit 4d01bb3ecf
108 changed files with 216 additions and 209 deletions
+8 -1
View File
@@ -1,6 +1,6 @@
# Changelog # Changelog
All notable changes to gasm-devkit are documented here. All notable changes to gasm-sdk are documented here.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
@@ -41,6 +41,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
without testdata, assembles for all four architectures (250 of 250, without testdata, assembles for all four architectures (250 of 250,
100 %); over the whole tree including testdata the measure is 271 of 100 %); over the whole tree including testdata the measure is 271 of
322 (84.2 %). 322 (84.2 %).
- **The module moves to `sourcedock.dev/petrbalvin/gasm-sdk`.** The
repository and the module rename together with the product, now the
GAsm Software Development Kit. Fresh installs become
`go install sourcedock.dev/petrbalvin/gasm-sdk/cmd/gasm@latest`, and
installs pinned to the old `gasm-sdk` path stop resolving once the
repository takes the new name: reinstall from the new path. The
binary stays `gasm`.
### Fixed ### Fixed
+4 -4
View File
@@ -1,6 +1,6 @@
# Contributing # Contributing
Contributions to **gasm-devkit** are governed by the Contributor terms Contributions to **gasm-sdk** are governed by the Contributor terms
below; submitting one means you accept them. below; submitting one means you accept them.
## Contributor terms ## Contributor terms
@@ -29,8 +29,8 @@ compiler (gcc), because `just gates` includes `just race` and the race
detector needs cgo. detector needs cgo.
```sh ```sh
git clone https://sourcedock.dev/petrbalvin/gasm-devkit.git git clone https://sourcedock.dev/petrbalvin/gasm-sdk.git
cd gasm-devkit cd gasm-sdk
just build just build
just gates just gates
``` ```
@@ -126,7 +126,7 @@ tag, where it would double the time and the memory a shared runner cannot spare.
## Reporting bugs ## Reporting bugs
Open an issue at `https://sourcedock.dev/petrbalvin/gasm-devkit/issues` with the Open an issue at `https://sourcedock.dev/petrbalvin/gasm-sdk/issues` with the
version, the operating system and architecture, the exact command, the full output, version, the operating system and architecture, the exact command, the full output,
and the expected against the actual behaviour. and the expected against the actual behaviour.
+6 -6
View File
@@ -1,6 +1,6 @@
# Plan 9 assembly tooling, inside and outside Go # GAsm: Software Development Kit for Plan 9 Assembly
> **Warning: this is an experiment.** gasm-devkit is under active > **Warning: this is an experiment.** gasm-sdk is under active
> development and is not stable. The version is 0.x.x: commands, flags, > development and is not stable. The version is 0.x.x: commands, flags,
> output formats and behaviour can change without warning at any time. > output formats and behaviour can change without warning at any time.
> A 1.0.0 release is light years away. Nothing in this document is a > A 1.0.0 release is light years away. Nothing in this document is a
@@ -13,7 +13,7 @@
there is no formatter, no linter and no debugger for `.s` files, and no there is no formatter, no linter and no debugger for `.s` files, and no
assembler that works without a Go installation. Developers write assembler that works without a Go installation. Developers write
assembly blind, validate it by benchmark, and debug it by print assembly blind, validate it by benchmark, and debug it by print
statement. gasm-devkit is the missing toolkit: a single, self-contained statement. gasm-sdk is the missing toolkit: a single, self-contained
binary, `gasm`, that serves both purposes. binary, `gasm`, that serves both purposes.
- **Help develop Plan 9 assembly.** Formatting, linting, disassembly, - **Help develop Plan 9 assembly.** Formatting, linting, disassembly,
@@ -58,7 +58,7 @@ Plan 9 (Go): MOVQ AX, total-16(SP)
The same lines, but only one of them tells you what the number is for. The same lines, but only one of them tells you what the number is for.
The syntax is uppercase, regular and boring, which is the highest The syntax is uppercase, regular and boring, which is the highest
compliment a language for machine code can earn. gasm-devkit exists compliment a language for machine code can earn. gasm-sdk exists
to give that syntax the tooling it deserves. to give that syntax the tooling it deserves.
## Features ## Features
@@ -233,11 +233,11 @@ The plan, in the order it is being worked:
Prebuilt binaries for linux/amd64, linux/arm64, linux/riscv64 and Prebuilt binaries for linux/amd64, linux/arm64, linux/riscv64 and
linux/loong64 are on the linux/loong64 are on the
[releases page](https://sourcedock.dev/petrbalvin/gasm-devkit/releases). [releases page](https://sourcedock.dev/petrbalvin/gasm-sdk/releases).
From source (Go 1.27.1): From source (Go 1.27.1):
```sh ```sh
go install sourcedock.dev/petrbalvin/gasm-devkit/cmd/gasm@latest go install sourcedock.dev/petrbalvin/gasm-sdk/cmd/gasm@latest
``` ```
Or from a repository checkout: Or from a repository checkout:
+7 -7
View File
@@ -5,7 +5,7 @@
// toolchain's own assembler source. Go's Plan 9 assembler defines the exact, // toolchain's own assembler source. Go's Plan 9 assembler defines the exact,
// complete set of mnemonics it accepts for each architecture in // complete set of mnemonics it accepts for each architecture in
// $GOROOT/src/cmd/internal/obj/<arch>/anames.go; this tool extracts those // $GOROOT/src/cmd/internal/obj/<arch>/anames.go; this tool extracts those
// names so gasm-devkit supports every instruction the real assembler does, // names so gasm-sdk supports every instruction the real assembler does,
// with no hand-maintained (and therefore inevitably incomplete) lists. // with no hand-maintained (and therefore inevitably incomplete) lists.
// //
// The same data feeds the generated instruction appendices of the assembly // The same data feeds the generated instruction appendices of the assembly
@@ -31,11 +31,11 @@ import (
"sort" "sort"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
) )
// archDirs maps a gasm-devkit architecture name to its obj sub-directory. // archDirs maps a gasm-sdk architecture name to its obj sub-directory.
var archDirs = []struct { var archDirs = []struct {
arch string arch string
sub string sub string
@@ -119,7 +119,7 @@ func filterCommon(names []string) []string {
// writeCommon emits arch/common_gen.go. // writeCommon emits arch/common_gen.go.
func writeCommon(names []string) error { func writeCommon(names []string) error {
var b strings.Builder var b strings.Builder
b.WriteString("// Code generated by gasm-devkit _gen; DO NOT EDIT.\n") b.WriteString("// Code generated by gasm-sdk _gen; DO NOT EDIT.\n")
b.WriteString("// Source: cmd/internal/obj/util.go from the Go toolchain.\n") b.WriteString("// Source: cmd/internal/obj/util.go from the Go toolchain.\n")
b.WriteString("//\n") b.WriteString("//\n")
b.WriteString("// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)\n") b.WriteString("// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)\n")
@@ -190,7 +190,7 @@ func stringLit(elt ast.Expr) string {
// writeGen emits arch/<arch>_gen.go. // writeGen emits arch/<arch>_gen.go.
func writeGen(arch, sub string, names []string) error { func writeGen(arch, sub string, names []string) error {
var b strings.Builder var b strings.Builder
b.WriteString("// Code generated by gasm-devkit _gen; DO NOT EDIT.\n") b.WriteString("// Code generated by gasm-sdk _gen; DO NOT EDIT.\n")
b.WriteString("// Source: cmd/internal/obj/" + sub + "/anames.go from the Go toolchain.\n") b.WriteString("// Source: cmd/internal/obj/" + sub + "/anames.go from the Go toolchain.\n")
b.WriteString("//\n") b.WriteString("//\n")
b.WriteString("// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)\n") b.WriteString("// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)\n")
@@ -216,7 +216,7 @@ func writeDocPage(a arch.Arch, title, file, anames, version string, encodable bo
var b strings.Builder var b strings.Builder
b.WriteString("# " + title + ": instruction inventory\n\n") b.WriteString("# " + title + ": instruction inventory\n\n")
b.WriteString("Generated by gasm-devkit's `_gen` from the Go toolchain's instruction table\n") b.WriteString("Generated by gasm-sdk's `_gen` from the Go toolchain's instruction table\n")
b.WriteString("(`" + anames + "`, " + version + "); DO NOT EDIT. This page lists every mnemonic\n") b.WriteString("(`" + anames + "`, " + version + "); DO NOT EDIT. This page lists every mnemonic\n")
b.WriteString("`go tool asm` accepts on this target, which is the upper bound of the\n") b.WriteString("`go tool asm` accepts on this target, which is the upper bound of the\n")
b.WriteString("language on it: a name absent here is not an instruction of the target,\n") b.WriteString("language on it: a name absent here is not an instruction of the target,\n")
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by gasm-devkit _gen; DO NOT EDIT. // Code generated by gasm-sdk _gen; DO NOT EDIT.
// Source: cmd/internal/obj/x86/anames.go from the Go toolchain. // Source: cmd/internal/obj/x86/anames.go from the Go toolchain.
// //
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org) // Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by gasm-devkit _gen; DO NOT EDIT. // Code generated by gasm-sdk _gen; DO NOT EDIT.
// Source: cmd/internal/obj/arm64/anames.go from the Go toolchain. // Source: cmd/internal/obj/arm64/anames.go from the Go toolchain.
// //
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org) // Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by gasm-devkit _gen; DO NOT EDIT. // Code generated by gasm-sdk _gen; DO NOT EDIT.
// Source: cmd/internal/obj/util.go from the Go toolchain. // Source: cmd/internal/obj/util.go from the Go toolchain.
// //
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org) // Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by gasm-devkit _gen; DO NOT EDIT. // Code generated by gasm-sdk _gen; DO NOT EDIT.
// Source: cmd/internal/obj/loong64/anames.go from the Go toolchain. // Source: cmd/internal/obj/loong64/anames.go from the Go toolchain.
// //
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org) // Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by gasm-devkit _gen; DO NOT EDIT. // Code generated by gasm-sdk _gen; DO NOT EDIT.
// Source: cmd/internal/obj/riscv/anames.go from the Go toolchain. // Source: cmd/internal/obj/riscv/anames.go from the Go toolchain.
// //
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org) // Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestGOObjectAARCH64Structure checks the basic structure of the emitted // TestGOObjectAARCH64Structure checks the basic structure of the emitted
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// assembleARM64 assembles an AArch64 (arm64) TEXT function body into machine // assembleARM64 assembles an AArch64 (arm64) TEXT function body into machine
+1 -1
View File
@@ -33,7 +33,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// arm64RegNum returns the 5-bit register number for an AArch64 register name: // arm64RegNum returns the 5-bit register number for an AArch64 register name:
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
func TestArm64LDRSTREncoding(t *testing.T) { func TestArm64LDRSTREncoding(t *testing.T) {
+1 -1
View File
@@ -53,7 +53,7 @@ package asm
import ( import (
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// arm64FrameInfo holds the frame layout derived from a TEXT directive. // arm64FrameInfo holds the frame layout derived from a TEXT directive.
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"encoding/binary" "encoding/binary"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// parseArm64File is a helper assembling one arm64 source file. // parseArm64File is a helper assembling one arm64 source file.
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// Assemble encodes the body of a TEXT function into x86-64 machine code, // Assemble encodes the body of a TEXT function into x86-64 machine code,
+2 -2
View File
@@ -10,8 +10,8 @@ import (
"golang.org/x/arch/x86/x86asm" "golang.org/x/arch/x86/x86asm"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// firstText parses src and returns its first TEXT function. // firstText parses src and returns its first TEXT function.
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"encoding/binary" "encoding/binary"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// ulebIter reads ULEB128 values, the .debug_abbrev and line-header // ulebIter reads ULEB128 values, the .debug_abbrev and line-header
+2 -2
View File
@@ -12,8 +12,8 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// The object-file tests share one source: two exported functions, one // The object-file tests share one source: two exported functions, one
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"encoding/binary" "encoding/binary"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestELFAARCH64Object checks the structure of the emitted AArch64 ELF64 // TestELFAARCH64Object checks the structure of the emitted AArch64 ELF64
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"encoding/binary" "encoding/binary"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestELFLOONG64Object checks the structure of the emitted LoongArch ELF64 // TestELFLOONG64Object checks the structure of the emitted LoongArch ELF64
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"encoding/binary" "encoding/binary"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestELFRISCVObjectDataRelocation checks that a symbol-valued DATA field // TestELFRISCVObjectDataRelocation checks that a symbol-valued DATA field
+2 -2
View File
@@ -10,8 +10,8 @@ import (
"golang.org/x/arch/x86/x86asm" "golang.org/x/arch/x86/x86asm"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// decode encodes an instruction and decodes it back, returning the decoded // decode encodes an instruction and decodes it back, returning the decoded
+1 -1
View File
@@ -12,7 +12,7 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// goobjView is a minimal parsed view of a GOOBJ payload, enough to check // goobjView is a minimal parsed view of a GOOBJ payload, enough to check
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// The expected bytes are pinned from `go tool asm` output (Go 1.27, amd64, // The expected bytes are pinned from `go tool asm` output (Go 1.27, amd64,
+3 -3
View File
@@ -16,7 +16,7 @@ import (
"golang.org/x/arch/x86/x86asm" "golang.org/x/arch/x86/x86asm"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestAssembleGoFlacAVX2Kernel assembles the whole production AVX2 kernel; // TestAssembleGoFlacAVX2Kernel assembles the whole production AVX2 kernel;
@@ -25,7 +25,7 @@ import (
func TestAssembleGoFlacAVX2Kernel(t *testing.T) { func TestAssembleGoFlacAVX2Kernel(t *testing.T) {
path := "../../go-libraries/go-flac/avx2_amd64.s" path := "../../go-libraries/go-flac/avx2_amd64.s"
if _, err := os.Stat(path); err != nil { if _, err := os.Stat(path); err != nil {
t.Skip("go-libraries repository not present next to gasm-devkit") t.Skip("go-libraries repository not present next to gasm-sdk")
} }
src, err := os.ReadFile(path) src, err := os.ReadFile(path)
if err != nil { if err != nil {
@@ -86,7 +86,7 @@ func TestAssembleGoFlacAVX2Kernel(t *testing.T) {
func TestAssembleGoFlacAVX512Kernel(t *testing.T) { func TestAssembleGoFlacAVX512Kernel(t *testing.T) {
path := "../../go-libraries/go-flac/avx512_amd64.s" path := "../../go-libraries/go-flac/avx512_amd64.s"
if _, err := os.Stat(path); err != nil { if _, err := os.Stat(path); err != nil {
t.Skip("go-libraries repository not present next to gasm-devkit") t.Skip("go-libraries repository not present next to gasm-sdk")
} }
src, err := os.ReadFile(path) src, err := os.ReadFile(path)
if err != nil { if err != nil {
+1 -1
View File
@@ -13,7 +13,7 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// The differential kernels for the DATA-path and front-end gaps are kept in // The differential kernels for the DATA-path and front-end gaps are kept in
+1 -1
View File
@@ -12,7 +12,7 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestGOObjectLOONG64Structure checks the emitted loong64 object's blocks: // TestGOObjectLOONG64Structure checks the emitted loong64 object's blocks:
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"sort" "sort"
"strconv" "strconv"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// Image is an assembled file: the function bodies laid out in source order, // Image is an assembled file: the function bodies laid out in source order,
+1 -1
View File
@@ -12,7 +12,7 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestAssembleFileStaticData checks the whole-image layout; code, padding // TestAssembleFileStaticData checks the whole-image layout; code, padding
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// assembleLOONG64 assembles a LoongArch (loong64) TEXT function body into // assembleLOONG64 assembles a LoongArch (loong64) TEXT function body into
+2 -2
View File
@@ -8,8 +8,8 @@ import (
"encoding/binary" "encoding/binary"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// firstTextLOONG64 parses assembly source and returns the first TEXT body. // firstTextLOONG64 parses assembly source and returns the first TEXT body.
+1 -1
View File
@@ -6,7 +6,7 @@ package asm
import ( import (
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// Loong64 frame mapping, matching the Go toolchain's loong64 backend. // Loong64 frame mapping, matching the Go toolchain's loong64 backend.
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"bytes" "bytes"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestLOONG64_sys exercises the no-operand system instructions and the // TestLOONG64_sys exercises the no-operand system instructions and the
+1 -1
View File
@@ -6,7 +6,7 @@ package asm
import ( import (
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestLOONG64RelocOffsetsIncludePrologue pins the function-relative // TestLOONG64RelocOffsetsIncludePrologue pins the function-relative
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"slices" "slices"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// assembleRISCV assembles a RISC-V TEXT function body into machine code. // assembleRISCV assembles a RISC-V TEXT function body into machine code.
+2 -2
View File
@@ -10,8 +10,8 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// firstTextRISCV parses assembly source and returns the first TEXT function body. // firstTextRISCV parses assembly source and returns the first TEXT function body.
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// RISC-V frame mapping, matching the Go toolchain's riscv64 backend. // RISC-V frame mapping, matching the Go toolchain's riscv64 backend.
+1 -1
View File
@@ -6,7 +6,7 @@ package asm
import ( import (
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestRISCVFrameSpadjAndLines checks that a framed function records its // TestRISCVFrameSpadjAndLines checks that a framed function records its
+1 -1
View File
@@ -13,7 +13,7 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestGOObjectRISCVCallReloc checks that CALL sym(SB) emits a single JAL // TestGOObjectRISCVCallReloc checks that CALL sym(SB) emits a single JAL
+1 -1
View File
@@ -8,7 +8,7 @@
// to the arch package; the AST records syntax only. // to the arch package; the AST records syntax only.
package ast package ast
import "sourcedock.dev/petrbalvin/gasm-devkit/token" import "sourcedock.dev/petrbalvin/gasm-sdk/token"
// File is the parsed representation of one .s source file. // File is the parsed representation of one .s source file.
type File struct { type File struct {
+1 -1
View File
@@ -6,7 +6,7 @@ package ast
import ( import (
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/token" "sourcedock.dev/petrbalvin/gasm-sdk/token"
) )
func pos(line, col int) token.Position { return token.Position{Line: line, Column: col} } func pos(line, col int) token.Position { return token.Position{Line: line, Column: col} }
+1 -1
View File
@@ -17,7 +17,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
) )
// go_asm.h is the header the Go compiler writes for every package that // go_asm.h is the header the Go compiler writes for every package that
+3 -3
View File
@@ -16,9 +16,9 @@ import (
"strconv" "strconv"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// cmdAuditInstructions cross-checks a gasm encoder against the Go toolchain's // cmdAuditInstructions cross-checks a gasm encoder against the Go toolchain's
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"runtime" "runtime"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
) )
func TestDerivedFamily(t *testing.T) { func TestDerivedFamily(t *testing.T) {
+2 -2
View File
@@ -13,8 +13,8 @@ import (
"strings" "strings"
"time" "time"
"sourcedock.dev/petrbalvin/gasm-devkit/debug" "sourcedock.dev/petrbalvin/gasm-sdk/debug"
"sourcedock.dev/petrbalvin/gasm-devkit/verify" "sourcedock.dev/petrbalvin/gasm-sdk/verify"
) )
func cmdDebug(args []string) int { func cmdDebug(args []string) int {
+3 -3
View File
@@ -9,9 +9,9 @@ import (
"sort" "sort"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/disasm" "sourcedock.dev/petrbalvin/gasm-sdk/disasm"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// cmdDis disassembles machine code: either a raw binary (standard input with // cmdDis disassembles machine code: either a raw binary (standard input with
+9 -9
View File
@@ -27,15 +27,15 @@ import (
"sync" "sync"
"syscall" "syscall"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/format" "sourcedock.dev/petrbalvin/gasm-sdk/format"
"sourcedock.dev/petrbalvin/gasm-devkit/lexer" "sourcedock.dev/petrbalvin/gasm-sdk/lexer"
"sourcedock.dev/petrbalvin/gasm-devkit/lint" "sourcedock.dev/petrbalvin/gasm-sdk/lint"
"sourcedock.dev/petrbalvin/gasm-devkit/lsp" "sourcedock.dev/petrbalvin/gasm-sdk/lsp"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
"sourcedock.dev/petrbalvin/gasm-devkit/verify" "sourcedock.dev/petrbalvin/gasm-sdk/verify"
) )
// version reports the release the toolchain recorded for this build: the // version reports the release the toolchain recorded for this build: the
+2 -2
View File
@@ -14,8 +14,8 @@ import (
"syscall" "syscall"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
) )
const clean = "#include \"textflag.h\"\n" + const clean = "#include \"textflag.h\"\n" +
+2 -2
View File
@@ -11,8 +11,8 @@ import (
"os" "os"
"strings" "strings"
gasmast "sourcedock.dev/petrbalvin/gasm-devkit/ast" gasmast "sourcedock.dev/petrbalvin/gasm-sdk/ast"
gasmparser "sourcedock.dev/petrbalvin/gasm-devkit/parser" gasmparser "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// cmdScaffold generates a differential test skeleton for every kernel in a // cmdScaffold generates a differential test skeleton for every kernel in a
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/disasm" "sourcedock.dev/petrbalvin/gasm-sdk/disasm"
) )
// Disassemble decodes the instruction at the given address in the debuggee's // Disassemble decodes the instruction at the given address in the debuggee's
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/disasm" "sourcedock.dev/petrbalvin/gasm-sdk/disasm"
) )
// Disassemble decodes the instruction at the given address in the debuggee's // Disassemble decodes the instruction at the given address in the debuggee's
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/disasm" "sourcedock.dev/petrbalvin/gasm-sdk/disasm"
) )
// Disassemble decodes the instruction at the given address in the debuggee's // Disassemble decodes the instruction at the given address in the debuggee's
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/disasm" "sourcedock.dev/petrbalvin/gasm-sdk/disasm"
) )
// Disassemble decodes the instruction at the given address in the debuggee's // Disassemble decodes the instruction at the given address in the debuggee's
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/disasm" "sourcedock.dev/petrbalvin/gasm-sdk/disasm"
) )
// Disassemble decodes the instruction at the given address in the debuggee's // Disassemble decodes the instruction at the given address in the debuggee's
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/disasm" "sourcedock.dev/petrbalvin/gasm-sdk/disasm"
) )
// Disassemble decodes the instruction at the given address in the debuggee's // Disassemble decodes the instruction at the given address in the debuggee's
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/disasm" "sourcedock.dev/petrbalvin/gasm-sdk/disasm"
) )
// Disassemble decodes the instruction at the given address in the debuggee's // Disassemble decodes the instruction at the given address in the debuggee's
+2 -2
View File
@@ -17,8 +17,8 @@ import (
"time" "time"
"unsafe" "unsafe"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
"sourcedock.dev/petrbalvin/gasm-devkit/verify" "sourcedock.dev/petrbalvin/gasm-sdk/verify"
) )
// Integration tests beyond the basic entry breakpoint: hardware watchpoints, // Integration tests beyond the basic entry breakpoint: hardware watchpoints,
+2 -2
View File
@@ -11,7 +11,7 @@ import (
"runtime" "runtime"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/verify" "sourcedock.dev/petrbalvin/gasm-sdk/verify"
) )
// TestLaunchAndBreakpoint is the FreeBSD twin of the Linux integration // TestLaunchAndBreakpoint is the FreeBSD twin of the Linux integration
@@ -29,7 +29,7 @@ func TestLaunchAndBreakpoint(t *testing.T) {
defer runtime.UnlockOSThread() defer runtime.UnlockOSThread()
bin := filepath.Join(t.TempDir(), "gasm") bin := filepath.Join(t.TempDir(), "gasm")
out, err := exec.Command("go", "build", "-o", bin, "sourcedock.dev/petrbalvin/gasm-devkit/cmd/gasm").CombinedOutput() out, err := exec.Command("go", "build", "-o", bin, "sourcedock.dev/petrbalvin/gasm-sdk/cmd/gasm").CombinedOutput()
if err != nil { if err != nil {
t.Fatalf("build gasm: %v: %s", err, out) t.Fatalf("build gasm: %v: %s", err, out)
} }
+2 -2
View File
@@ -14,7 +14,7 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/verify" "sourcedock.dev/petrbalvin/gasm-sdk/verify"
) )
// buildGasm produces the gasm binary the debugger spawns as its debuggee. // buildGasm produces the gasm binary the debugger spawns as its debuggee.
@@ -24,7 +24,7 @@ func buildGasm(t *testing.T) string {
return p return p
} }
bin := filepath.Join(t.TempDir(), "gasm") bin := filepath.Join(t.TempDir(), "gasm")
cmd := exec.Command("go", "build", "-o", bin, "sourcedock.dev/petrbalvin/gasm-devkit/cmd/gasm") cmd := exec.Command("go", "build", "-o", bin, "sourcedock.dev/petrbalvin/gasm-sdk/cmd/gasm")
out, err := cmd.CombinedOutput() out, err := cmd.CombinedOutput()
if err != nil { if err != nil {
t.Fatalf("build gasm: %v: %s", err, out) t.Fatalf("build gasm: %v: %s", err, out)
+3 -3
View File
@@ -17,9 +17,9 @@ import (
"golang.org/x/sys/unix" "golang.org/x/sys/unix"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
"sourcedock.dev/petrbalvin/gasm-devkit/verify" "sourcedock.dev/petrbalvin/gasm-sdk/verify"
) )
// mapRWX maps code into a read-write-execute region. // mapRWX maps code into a read-write-execute region.
+3 -3
View File
@@ -12,9 +12,9 @@ import (
"syscall" "syscall"
"unsafe" "unsafe"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
"sourcedock.dev/petrbalvin/gasm-devkit/verify" "sourcedock.dev/petrbalvin/gasm-sdk/verify"
) )
// RunTarget is the debuggee entry point (gasm debug --target). // RunTarget is the debuggee entry point (gasm debug --target).
+3 -3
View File
@@ -12,9 +12,9 @@ import (
"syscall" "syscall"
"unsafe" "unsafe"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
"sourcedock.dev/petrbalvin/gasm-devkit/verify" "sourcedock.dev/petrbalvin/gasm-sdk/verify"
) )
// RunTarget is the debuggee entry point (gasm debug --target). // RunTarget is the debuggee entry point (gasm debug --target).
+3 -3
View File
@@ -12,9 +12,9 @@ import (
"syscall" "syscall"
"unsafe" "unsafe"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
"sourcedock.dev/petrbalvin/gasm-devkit/verify" "sourcedock.dev/petrbalvin/gasm-sdk/verify"
) )
// RunTarget is the debuggee entry point (gasm debug --target). // RunTarget is the debuggee entry point (gasm debug --target).
+3 -3
View File
@@ -12,9 +12,9 @@ import (
"syscall" "syscall"
"unsafe" "unsafe"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
"sourcedock.dev/petrbalvin/gasm-devkit/verify" "sourcedock.dev/petrbalvin/gasm-sdk/verify"
) )
// RunTarget is the debuggee entry point (gasm debug --target). // RunTarget is the debuggee entry point (gasm debug --target).
+1 -1
View File
@@ -15,7 +15,7 @@ import (
"golang.org/x/arch/riscv64/riscv64asm" "golang.org/x/arch/riscv64/riscv64asm"
"golang.org/x/arch/x86/x86asm" "golang.org/x/arch/x86/x86asm"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
) )
// Instruction is one decoded instruction: its text form, its length in bytes // Instruction is one decoded instruction: its text form, its length in bytes
+4 -4
View File
@@ -7,10 +7,10 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
func TestDecodeKnownBytes(t *testing.T) { func TestDecodeKnownBytes(t *testing.T) {
+2 -2
View File
@@ -1,8 +1,8 @@
# Architecture # Architecture
How gasm-devkit is put together and why. How gasm-sdk is put together and why.
Repository: [sourcedock.dev/petrbalvin/gasm-devkit](https://sourcedock.dev/petrbalvin/gasm-devkit) Repository: [sourcedock.dev/petrbalvin/gasm-sdk](https://sourcedock.dev/petrbalvin/gasm-sdk)
## Overview ## Overview
+3 -3
View File
@@ -1,6 +1,6 @@
# Development Guide # Development Guide
Repository: [sourcedock.dev/petrbalvin/gasm-devkit](https://sourcedock.dev/petrbalvin/gasm-devkit) Repository: [sourcedock.dev/petrbalvin/gasm-sdk](https://sourcedock.dev/petrbalvin/gasm-sdk)
## Prerequisites ## Prerequisites
@@ -19,8 +19,8 @@ Repository: [sourcedock.dev/petrbalvin/gasm-devkit](https://sourcedock.dev/petrb
## Setup ## Setup
```sh ```sh
git clone https://sourcedock.dev/petrbalvin/gasm-devkit.git git clone https://sourcedock.dev/petrbalvin/gasm-sdk.git
cd gasm-devkit cd gasm-sdk
just build # compile bin/gasm, zero errors and zero warnings just build # compile bin/gasm, zero errors and zero warnings
just gates # build, fmt-check, vet, test, race: the definition of done just gates # build, fmt-check, vet, test, race: the definition of done
``` ```
+2 -2
View File
@@ -11,7 +11,7 @@ internal interface with no stability promise, and it can change in any
release. This specification was therefore produced by reverse engineering release. This specification was therefore produced by reverse engineering
that source and by parsing real objects produced by `go tool asm` and that source and by parsing real objects produced by `go tool asm` and
`go tool compile`, byte for byte, against the layout described here. Within `go tool compile`, byte for byte, against the layout described here. Within
gasm-devkit it is kept honest by the differential tests in `asm/goobj_test.go` gasm-sdk it is kept honest by the differential tests in `asm/goobj_test.go`
and `asm/link_test.go`, which compare `gasm asm --format goobj` output against and `asm/link_test.go`, which compare `gasm asm --format goobj` output against
the toolchain's own products and feed gasm objects to `go build`. the toolchain's own products and feed gasm objects to `go build`.
@@ -615,7 +615,7 @@ objects, in one place:
8. Compute the content hashes exactly as the toolchain does, or emit no 8. Compute the content hashes exactly as the toolchain does, or emit no
hashed definitions at all. hashed definitions at all.
## How gasm-devkit implements and verifies it ## How gasm-sdk implements and verifies it
The writer lives in `asm/goobj.go`, which carries the shared container and the The writer lives in `asm/goobj.go`, which carries the shared container and the
amd64 relocation emission, with per-architecture relocation emitters in amd64 relocation emission, with per-architecture relocation emitters in
+1 -1
View File
@@ -1,6 +1,6 @@
# AMD64: instruction inventory # AMD64: instruction inventory
Generated by gasm-devkit's `_gen` from the Go toolchain's instruction table Generated by gasm-sdk's `_gen` from the Go toolchain's instruction table
(`cmd/internal/obj/x86/anames.go`, go1.27.1); DO NOT EDIT. This page lists every mnemonic (`cmd/internal/obj/x86/anames.go`, go1.27.1); DO NOT EDIT. This page lists every mnemonic
`go tool asm` accepts on this target, which is the upper bound of the `go tool asm` accepts on this target, which is the upper bound of the
language on it: a name absent here is not an instruction of the target, language on it: a name absent here is not an instruction of the target,
+1 -1
View File
@@ -1,6 +1,6 @@
# ARM64: instruction inventory # ARM64: instruction inventory
Generated by gasm-devkit's `_gen` from the Go toolchain's instruction table Generated by gasm-sdk's `_gen` from the Go toolchain's instruction table
(`cmd/internal/obj/arm64/anames.go`, go1.27.1); DO NOT EDIT. This page lists every mnemonic (`cmd/internal/obj/arm64/anames.go`, go1.27.1); DO NOT EDIT. This page lists every mnemonic
`go tool asm` accepts on this target, which is the upper bound of the `go tool asm` accepts on this target, which is the upper bound of the
language on it: a name absent here is not an instruction of the target, language on it: a name absent here is not an instruction of the target,
+1 -1
View File
@@ -1,6 +1,6 @@
# LoongArch 64: instruction inventory # LoongArch 64: instruction inventory
Generated by gasm-devkit's `_gen` from the Go toolchain's instruction table Generated by gasm-sdk's `_gen` from the Go toolchain's instruction table
(`cmd/internal/obj/loong64/anames.go`, go1.27.1); DO NOT EDIT. This page lists every mnemonic (`cmd/internal/obj/loong64/anames.go`, go1.27.1); DO NOT EDIT. This page lists every mnemonic
`go tool asm` accepts on this target, which is the upper bound of the `go tool asm` accepts on this target, which is the upper bound of the
language on it: a name absent here is not an instruction of the target, language on it: a name absent here is not an instruction of the target,
+1 -1
View File
@@ -1,6 +1,6 @@
# RISC-V 64: instruction inventory # RISC-V 64: instruction inventory
Generated by gasm-devkit's `_gen` from the Go toolchain's instruction table Generated by gasm-sdk's `_gen` from the Go toolchain's instruction table
(`cmd/internal/obj/riscv/anames.go`, go1.27.1); DO NOT EDIT. This page lists every mnemonic (`cmd/internal/obj/riscv/anames.go`, go1.27.1); DO NOT EDIT. This page lists every mnemonic
`go tool asm` accepts on this target, which is the upper bound of the `go tool asm` accepts on this target, which is the upper bound of the
language on it: a name absent here is not an instruction of the target, language on it: a name absent here is not an instruction of the target,
+1 -1
View File
@@ -97,5 +97,5 @@ the debuggee.
.PP .PP
The full command reference, with worked examples and every flag, is in The full command reference, with worked examples and every flag, is in
docs/CLI.md of the repository docs/CLI.md of the repository
.UR https://sourcedock.dev/petrbalvin/gasm-devkit .UR https://sourcedock.dev/petrbalvin/gasm-sdk
.UE . .UE .
+2 -2
View File
@@ -11,8 +11,8 @@ package format
import ( import (
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/lexer" "sourcedock.dev/petrbalvin/gasm-sdk/lexer"
"sourcedock.dev/petrbalvin/gasm-devkit/token" "sourcedock.dev/petrbalvin/gasm-sdk/token"
) )
// Source returns the canonical formatting of src. // Source returns the canonical formatting of src.
+4 -4
View File
@@ -9,10 +9,10 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/lexer" "sourcedock.dev/petrbalvin/gasm-sdk/lexer"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
"sourcedock.dev/petrbalvin/gasm-devkit/token" "sourcedock.dev/petrbalvin/gasm-sdk/token"
) )
func TestGolden(t *testing.T) { func TestGolden(t *testing.T) {
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// FuzzFormatIdempotency hammers the formatter with arbitrary input. The // FuzzFormatIdempotency hammers the formatter with arbitrary input. The
+1 -1
View File
@@ -14,7 +14,7 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestRoundTripRealGoLibraries checks that formatting the production kernels // TestRoundTripRealGoLibraries checks that formatting the production kernels
+1 -1
View File
@@ -1,4 +1,4 @@
module sourcedock.dev/petrbalvin/gasm-devkit module sourcedock.dev/petrbalvin/gasm-sdk
go 1.27.1 go 1.27.1
+2 -2
View File
@@ -1,6 +1,6 @@
# gasm-devkit. # gasm-sdk.
# #
# Replace gasm-devkit here and the values in the variable block. Everything below the block # Replace gasm-sdk here and the values in the variable block. Everything below the block
# is the standard recipe set: the names and their meanings are fixed, identical in every # is the standard recipe set: the names and their meanings are fixed, identical in every
# repository, and `gates` is the definition of done. # repository, and `gates` is the definition of done.
binary := "gasm" binary := "gasm"
+1 -1
View File
@@ -13,7 +13,7 @@ import (
"unicode" "unicode"
"unicode/utf8" "unicode/utf8"
"sourcedock.dev/petrbalvin/gasm-devkit/token" "sourcedock.dev/petrbalvin/gasm-sdk/token"
) )
const ( const (
+1 -1
View File
@@ -6,7 +6,7 @@ package lexer
import ( import (
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/token" "sourcedock.dev/petrbalvin/gasm-sdk/token"
) )
// kinds tokenizes src and returns the kind sequence, dropping Newline/EOF. // kinds tokenizes src and returns the kind sequence, dropping Newline/EOF.
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// checkABI0Args flags TEXT functions whose // func signature declares // checkABI0Args flags TEXT functions whose // func signature declares
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// checkFuncdata validates the structure of FUNCDATA and PCDATA directives, // checkFuncdata validates the structure of FUNCDATA and PCDATA directives,
+2 -2
View File
@@ -10,8 +10,8 @@ import (
"strings" "strings"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestGoRuntimeCorpus parses and lints every runtime .s file the local Go // TestGoRuntimeCorpus parses and lints every runtime .s file the local Go
+1 -1
View File
@@ -6,7 +6,7 @@ package lint
import ( import (
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
) )
func TestUnencodableInstruction(t *testing.T) { func TestUnencodableInstruction(t *testing.T) {
+2 -2
View File
@@ -13,8 +13,8 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestRealGoLibrariesHasNoErrors asserts that the production go-flac kernels // TestRealGoLibrariesHasNoErrors asserts that the production go-flac kernels
+4 -4
View File
@@ -14,10 +14,10 @@ import (
"strings" "strings"
"unicode/utf8" "unicode/utf8"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/token" "sourcedock.dev/petrbalvin/gasm-sdk/token"
) )
// Severity ranks a diagnostic. // Severity ranks a diagnostic.
+4 -4
View File
@@ -7,10 +7,10 @@ import (
"os" "os"
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/asm" "sourcedock.dev/petrbalvin/gasm-sdk/asm"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
func lintSrc(t *testing.T, src string) []Diagnostic { func lintSrc(t *testing.T, src string) []Diagnostic {
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"slices" "slices"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// This file implements register liveness by dataflow over a function's // This file implements register liveness by dataflow over a function's
+2 -2
View File
@@ -6,8 +6,8 @@ package lint
import ( import (
"testing" "testing"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// TestRegisterClobber checks the register-clobber audit is calibrated to the // TestRegisterClobber checks the register-clobber audit is calibrated to the
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/token" "sourcedock.dev/petrbalvin/gasm-sdk/token"
) )
// amd64WordNames are the canonical 64-bit register spellings of go tool asm: // amd64WordNames are the canonical 64-bit register spellings of go tool asm:
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
) )
// reservedRegister returns the platform-reserved general-purpose register of // reservedRegister returns the platform-reserved general-purpose register of
+7 -7
View File
@@ -17,13 +17,13 @@ import (
"unicode/utf16" "unicode/utf16"
"unicode/utf8" "unicode/utf8"
"sourcedock.dev/petrbalvin/gasm-devkit/arch" "sourcedock.dev/petrbalvin/gasm-sdk/arch"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/format" "sourcedock.dev/petrbalvin/gasm-sdk/format"
"sourcedock.dev/petrbalvin/gasm-devkit/lexer" "sourcedock.dev/petrbalvin/gasm-sdk/lexer"
"sourcedock.dev/petrbalvin/gasm-devkit/lint" "sourcedock.dev/petrbalvin/gasm-sdk/lint"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
"sourcedock.dev/petrbalvin/gasm-devkit/token" "sourcedock.dev/petrbalvin/gasm-sdk/token"
) )
// textflagMacros are the flag names defined by runtime/textflag.h; they are // textflagMacros are the flag names defined by runtime/textflag.h; they are
+2 -2
View File
@@ -14,8 +14,8 @@ import (
"strings" "strings"
"sync" "sync"
"sourcedock.dev/petrbalvin/gasm-devkit/lint" "sourcedock.dev/petrbalvin/gasm-sdk/lint"
"sourcedock.dev/petrbalvin/gasm-devkit/token" "sourcedock.dev/petrbalvin/gasm-sdk/token"
) )
// Server is a GAsm language server bound to a byte stream. // Server is a GAsm language server bound to a byte stream.
+2 -2
View File
@@ -13,8 +13,8 @@ import (
"strings" "strings"
"time" "time"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/parser" "sourcedock.dev/petrbalvin/gasm-sdk/parser"
) )
// workspaceIndex indexes the .s files under the workspace roots that the // workspaceIndex indexes the .s files under the workspace roots that the
+1 -1
View File
@@ -13,7 +13,7 @@
package parser package parser
import ( import (
"sourcedock.dev/petrbalvin/gasm-devkit/token" "sourcedock.dev/petrbalvin/gasm-sdk/token"
) )
// foldExpr evaluates the constant integer expression at the head of ts and // foldExpr evaluates the constant integer expression at the head of ts and
+1 -1
View File
@@ -19,7 +19,7 @@ import (
func TestParseRealGoLibraries(t *testing.T) { func TestParseRealGoLibraries(t *testing.T) {
matches, _ := filepath.Glob("../../go-libraries/go-*/*.s") matches, _ := filepath.Glob("../../go-libraries/go-*/*.s")
if len(matches) == 0 { if len(matches) == 0 {
t.Skip("go-libraries repository not present next to gasm-devkit") t.Skip("go-libraries repository not present next to gasm-sdk")
} }
for _, path := range matches { for _, path := range matches {
src, err := os.ReadFile(path) src, err := os.ReadFile(path)
+3 -3
View File
@@ -13,9 +13,9 @@ import (
"strconv" "strconv"
"strings" "strings"
"sourcedock.dev/petrbalvin/gasm-devkit/ast" "sourcedock.dev/petrbalvin/gasm-sdk/ast"
"sourcedock.dev/petrbalvin/gasm-devkit/lexer" "sourcedock.dev/petrbalvin/gasm-sdk/lexer"
"sourcedock.dev/petrbalvin/gasm-devkit/token" "sourcedock.dev/petrbalvin/gasm-sdk/token"
) )
// Error is a single parse diagnostic. // Error is a single parse diagnostic.

Some files were not shown because too many files have changed in this diff Show More