Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# plan9asm

`github.com/goplus/plan9asm`
`github.com/xgo-dev/plan9asm`

Plan 9 assembly parser and LLVM IR translator, extracted as an independent module.

## Repository layout

- `github.com/goplus/plan9asm`: parser + lowering library.
- `github.com/xgo-dev/plan9asm`: parser + lowering library.
- `cmd/plan9asm`: package/file oriented helper (`list`, `transpile`), moved from `llgo-stdlib-opt/chore/plan9asm`.
- `cmd/plan9asmll`: stdlib-oriented converter/test tool (`.s -> .ll`, optional `llc` compile).

Expand All @@ -22,7 +22,7 @@ Plan 9 assembly parser and LLVM IR translator, extracted as an independent modul

## LLVM backend

- `TranslateModule` builds an in-memory `llvm.Module` (`github.com/goplus/llvm`).
- `TranslateModule` builds an in-memory `llvm.Module` (`github.com/xgo-dev/llvm`).
- `Translate` keeps compatibility and returns textual IR from that module.
- Root module dependency stays small (`goplus/llvm`).
- `golang.org/x/tools/go/packages` is used only in `cmd/plan9asmll` submodule.
Expand Down
8 changes: 4 additions & 4 deletions cmd/plan9asm/go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module github.com/goplus/plan9asm/cmd/plan9asm
module github.com/xgo-dev/plan9asm/cmd/plan9asm

go 1.24.0

require (
github.com/goplus/plan9asm v0.0.0
github.com/xgo-dev/plan9asm v0.0.0
golang.org/x/tools v0.42.0
)

require (
github.com/goplus/llvm v0.8.7 // indirect
github.com/xgo-dev/llvm v0.9.0 // indirect
golang.org/x/mod v0.33.0 // indirect
golang.org/x/sync v0.19.0 // indirect
)

replace github.com/goplus/plan9asm => ../..
replace github.com/xgo-dev/plan9asm => ../..
4 changes: 2 additions & 2 deletions cmd/plan9asm/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/goplus/llvm v0.8.7 h1:FUpjuZ4Y+F9wNw2ztN5dCGnZnAQgH1YHaYEiX2QpfkQ=
github.com/goplus/llvm v0.8.7/go.mod h1:PeVK8GgzxwAYCiMiUAJb5wJR6xbhj989tu9oulKLLT4=
github.com/xgo-dev/llvm v0.9.0 h1:WHagpgXmo0dx7sLvl93o3BwzhHeYEHQ0xiIj870qS54=
github.com/xgo-dev/llvm v0.9.0/go.mod h1:42vav2/cI5BAIcL543DZSMO9do8/aCK2z7JERH+AE+M=
golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8=
golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w=
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
Expand Down
2 changes: 1 addition & 1 deletion cmd/plan9asm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"strconv"
"strings"

"github.com/goplus/plan9asm"
"github.com/xgo-dev/plan9asm"
"golang.org/x/tools/go/packages"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/plan9asmll/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/goplus/plan9asm/cmd/plan9asmll
module github.com/xgo-dev/plan9asm/cmd/plan9asmll

go 1.24.0

require (
github.com/goplus/llvm v0.8.7
github.com/goplus/plan9asm v0.0.0
github.com/xgo-dev/llvm v0.9.0
github.com/xgo-dev/plan9asm v0.0.0
golang.org/x/tools v0.42.0
)

Expand All @@ -13,4 +13,4 @@ require (
golang.org/x/sync v0.19.0 // indirect
)

replace github.com/goplus/plan9asm => ../..
replace github.com/xgo-dev/plan9asm => ../..
4 changes: 2 additions & 2 deletions cmd/plan9asmll/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/goplus/llvm v0.8.7 h1:FUpjuZ4Y+F9wNw2ztN5dCGnZnAQgH1YHaYEiX2QpfkQ=
github.com/goplus/llvm v0.8.7/go.mod h1:PeVK8GgzxwAYCiMiUAJb5wJR6xbhj989tu9oulKLLT4=
github.com/xgo-dev/llvm v0.9.0 h1:WHagpgXmo0dx7sLvl93o3BwzhHeYEHQ0xiIj870qS54=
github.com/xgo-dev/llvm v0.9.0/go.mod h1:42vav2/cI5BAIcL543DZSMO9do8/aCK2z7JERH+AE+M=
golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8=
golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w=
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
Expand Down
4 changes: 2 additions & 2 deletions cmd/plan9asmll/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"strings"
"time"

"github.com/goplus/llvm"
"github.com/goplus/plan9asm"
"github.com/xgo-dev/llvm"
"github.com/xgo-dev/plan9asm"
"golang.org/x/tools/go/packages"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/plan9asmll/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"reflect"
"testing"

"github.com/goplus/plan9asm"
"github.com/xgo-dev/plan9asm"
)

func TestLLVMArgsAndFrameSlotsForTupleSliceParam(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/plan9asmscan/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"sort"
"strings"

"github.com/goplus/plan9asm"
"github.com/xgo-dev/plan9asm"
)

type pkgJSON struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/plan9asmscan/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"testing"

"github.com/goplus/plan9asm"
"github.com/xgo-dev/plan9asm"
)

func TestToPlan9Arch(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion doc/llvm-module-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Current `plan9asm.Translate` emits textual `.ll` by string concatenation.
Target architecture:

1. Build an in-memory `llvm.Module` (via `github.com/goplus/llvm`).
1. Build an in-memory `llvm.Module` (via `github.com/xgo-dev/llvm`).
2. Caller can choose:
- get module handle directly
- serialize module to string/bitcode as needed
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/goplus/plan9asm
module github.com/xgo-dev/plan9asm

go 1.21

require github.com/goplus/llvm v0.8.7
require github.com/xgo-dev/llvm v0.9.0
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/goplus/llvm v0.8.7 h1:FUpjuZ4Y+F9wNw2ztN5dCGnZnAQgH1YHaYEiX2QpfkQ=
github.com/goplus/llvm v0.8.7/go.mod h1:PeVK8GgzxwAYCiMiUAJb5wJR6xbhj989tu9oulKLLT4=
github.com/xgo-dev/llvm v0.9.0 h1:WHagpgXmo0dx7sLvl93o3BwzhHeYEHQ0xiIj870qS54=
github.com/xgo-dev/llvm v0.9.0/go.mod h1:42vav2/cI5BAIcL543DZSMO9do8/aCK2z7JERH+AE+M=
2 changes: 1 addition & 1 deletion go_translate.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strconv"
"strings"

"github.com/goplus/llvm"
"github.com/xgo-dev/llvm"
)

// GoPackage provides the Go declarations and syntax needed to bind a Plan 9
Expand Down
2 changes: 1 addition & 1 deletion translate_deep_coverage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"testing"

"github.com/goplus/llvm"
"github.com/xgo-dev/llvm"
)

func TestPreprocessCoverageEdges(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion translate_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/goplus/llvm"
"github.com/xgo-dev/llvm"
)

// TranslateModule converts a parsed Plan 9 asm File into an llvm.Module.
Expand Down
2 changes: 1 addition & 1 deletion translate_module_direct.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/goplus/llvm"
"github.com/xgo-dev/llvm"
)

var errDirectModuleUnsupported = errors.New("direct module lowering unsupported")
Expand Down
Loading