Needs riscv64 support
clausecker opened this issue · comments
Greetings! I'm trying to fix the gomacro port for riscv64 freebsd and noticed that gls support code for this platform is missing. Could you add it?
Thanks for the report!
I'll try, although I know very little about riscv64 assembly.
FYI, this repository cosmos72/gls is a standalone copy of cosmos72/gomacro/gls - the two are supposed to contain the same code but are otherwise independent.
I added a first version of riscv64 assembly in commit cbe3a94,
which passes the test suite at least under qemu-riscv64
.
Now I'm copying it to cosmos72/gomacro/gls
Done, gomacro commit 6835e0d6634641d4420bbf6b2012746dfa2cd545
contains the updated gomacro/gls package including riscv64 support.
Although as I said above I am able to run riscv64 binaries and test suites only under qemu-riscv64
Thanks, I'll go ahead and test your code.
While testing, I noticed that your gomacro module does not build its test suite:
FAIL
$ go test ./...
# github.com/cosmos72/gomacro/base/untyped
base/untyped/lit.go:131:11: conversion from int64 to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
? github.com/cosmos72/gomacro/ast2 [no test files]
? github.com/cosmos72/gomacro/atomic [no test files]
? github.com/cosmos72/gomacro/base [no test files]
ok github.com/cosmos72/gomacro 11.145s
ok github.com/cosmos72/gomacro/ast2/test 0.378s
? github.com/cosmos72/gomacro/base/inspect [no test files]
? github.com/cosmos72/gomacro/base/genimport [no test files]
? github.com/cosmos72/gomacro/base/output [no test files]
? github.com/cosmos72/gomacro/base/paths [no test files]
? github.com/cosmos72/gomacro/base/reflect [no test files]
? github.com/cosmos72/gomacro/base/strings [no test files]
? github.com/cosmos72/gomacro/classic [no test files]
? github.com/cosmos72/gomacro/cmd [no test files]
ok github.com/cosmos72/gomacro/base/dep 0.124s
? github.com/cosmos72/gomacro/cmd_classic [no test files]
? github.com/cosmos72/gomacro/fast/debug [no test files]
? github.com/cosmos72/gomacro/fast [no test files]
? github.com/cosmos72/gomacro/go/etoken [no test files]
? github.com/cosmos72/gomacro/go/parser [no test files]
ok github.com/cosmos72/gomacro/gls 0.028s
# github.com/cosmos72/gomacro/go/types [github.com/cosmos72/gomacro/go/types.test]
go/types/converter_test.go:61:12: c.Type undefined (type Converter has no field or method Type)
? github.com/cosmos72/gomacro/imports [no test files]
? github.com/cosmos72/gomacro/imports/syscall [no test files]
? github.com/cosmos72/gomacro/imports/thirdparty [no test files]
? github.com/cosmos72/gomacro/imports/util [no test files]
--- FAIL: TestFiles (0.00s)
--- FAIL: TestFiles/slow.input (0.08s)
printer_test.go:147:
length changed: len(testdata/slow.input) = 2070, len(testdata/slow.golden) = 2071
testdata/slow.input:12:16: func TestTwoNilValues(t *testing.T) {
testdata/slow.golden:12:16: func TestTwoNilRValues(t *testing.T) {
FAIL
FAIL github.com/cosmos72/gomacro/go/printer 1.426s
ok github.com/cosmos72/gomacro/go/scanner 0.163s
FAIL github.com/cosmos72/gomacro/go/types [build failed]
ok github.com/cosmos72/gomacro/go/typeutil 0.116s
ok github.com/cosmos72/gomacro/xreflect 2.350s
FAIL
The gls package tests fine on the other hand.
This is expected.
Packages inside github.com/cosmos72/gomacro/go/
are patched versions of the same packages inside Go standard library, and their test suites should be patched too - I never managed to do that.