Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: port to RISC-V #27532

Open
tklauser opened this issue Sep 6, 2018 · 141 comments

Comments

@tklauser
Copy link
Member

commented Sep 6, 2018

This issue serves to track the port to the RISC-V architecture. There is an out-of-tree port at https://github.com/riscv/riscv-go based on Go 1.8 which - according to riscv/riscv-go#19 - is no longer maintained and would need quite some work to be updated to the current Go tip.

Also see https://golang.org/cl/106256#message-2d9a5c5b89ad55b8b7999f794983f993649232c8 and https://groups.google.com/forum/#!searchin/golang-dev/RISC%7Csort:date/golang-dev/VpsyGdi-sQQ/FMu6IB_2CwAJ where @josharian summarized the current state of the existing port.

The GOARCH values riscv and riscv64 were reserved in https://golang.org/cl/106256. These values are already used by gccgo. Additional changes were made to debug/elf (https://golang.org/cl/107339), cmd/cgo (https://golang.org/cl/110066), cmd/dist and cmd/types (https://golang.org/cl/118618) in order be able to generate type definition files in the x/sys/unix package (https://golang.org/cl/133735).

/cc @bradfitz @ianlancetaylor @josharian

@gopherbot

This comment has been minimized.

Copy link

commented Sep 6, 2018

Change https://golang.org/cl/133735 mentions this issue: unix: add support for linux/riscv64

gopherbot pushed a commit to golang/sys that referenced this issue Sep 6, 2018
unix: add support for linux/riscv64
Add syscall wrappers, error constants and types for linux/riscv64

Switch docker image to Ubuntu 18.10 in order to get qemu supporting
riscv64. Also set the uname release string for qemu to 4.15 (the first
Linux kernel version with riscv64 support), because otherwise running
the generating C program in mkerrors.sh on a host with an older kernel
would fail with a "FATAL: kernel too old".

Note that linux/riscv64 is currently only usable using gccgo.

Updates golang/go#27532

Change-Id: Ic420f842342418443474cac72d38adff14d1b938
Reviewed-on: https://go-review.googlesource.com/133735
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>

@bradfitz bradfitz added this to the Unplanned milestone Sep 6, 2018

@bradfitz bradfitz added the help wanted label Sep 6, 2018

@davidlt

This comment has been minimized.

Copy link

commented Sep 16, 2018

/cc myself as Fedora/RISC-V maintainer.

I would be happy to incl. this into the distribution (once it compiles) and do some testing.

@ghost

This comment has been minimized.

Copy link

commented Oct 3, 2018

Thanks for raising this.

Does anyone know where I can get hardware to test on ?

@ghost

This comment has been minimized.

Copy link

commented Oct 3, 2018

New house, CPU and fgpa efforts are going on using risc-v.
Quite a turning point and opportunity for golang programmers.

Here is the main news feed on all of it:
https://riscv.org/news/

@junland

This comment has been minimized.

Copy link

commented Oct 3, 2018

@gedw99 At the moment SiFive is the only company that has produced a RISC-V dev board (HiFive Unleashed). One caveat to this board is the price, which is around $1,000 USD.

@hugelgupf

This comment has been minimized.

Copy link
Contributor

commented Oct 16, 2018

cc @GanShun and @rjoleary the three of us were also about to start looking at a port. We got a couple of SiFive boards to try it out on.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Oct 16, 2018

@hugelgupf, when you're far enough along to want a builder set up, file a bug and copy me and I'd be more than happy to help.

@jasonmoo

This comment has been minimized.

Copy link

commented Oct 17, 2018

I recently starting using qemu to run a riscv fedora build. Here are the links in case it's useful for devving without a board.

https://github.com/riscv/riscv-qemu
https://fedoraproject.org/wiki/Architectures/RISC-V/Installing#Download_the_latest_disk_image
https://fedoraproject.org/wiki/Architectures/RISC-V/Installing#Boot_under_qemu

Using dnf install gccgo I've been able to build and run go apps in emulation.

@davidlt

This comment has been minimized.

Copy link

commented Oct 17, 2018

Just reminder that RISC-V is supported in released versions of QEMU and libvirt, which makes it easy to setup multiple VMs with management. See: https://fedoraproject.org/wiki/Architectures/RISC-V/Installing#Boot_with_libvirt

Note, that our libffi does not support Go closures thus some functionality does not work. The patch exist already, but I need to backport it to our libffi version. Should I bump priority on this?

@tklauser

This comment has been minimized.

Copy link
Member Author

commented Nov 22, 2018

FWIW, I started rebasing the Go 1.18-based https://github.com/riscv/go-riscv to current Go tip at https://github.com/tklauser/go-riscv. It currently builds on linux/amd64 but cannot generate valid riscv64 binaries yet.

I currently lack the time and resources to really push it forward but maybe someone else working on it might find it useful.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Dec 13, 2018

Just saw that you can apparently run RISC-V in the cloud via an FPGA AWS instance:

https://www.cnx-software.com/2017/02/22/amazon-ec2-f1-instances-put-xilinx-virtex-ultrascale-fpga-boards-in-the-cloud/

That might be a possible temporary builder strategy.

@jasonmoo

This comment has been minimized.

Copy link

commented Dec 14, 2018

@bradfitz https://fires.im/ is a risc-v deployment on aws fpgas but the underlying risc-v implementation only runs up to something like 100mhz. Working with a team that's doing some research in that area and it seems to be the norm. So far emulation has been the most performant by far.

@davidlt

This comment has been minimized.

Copy link

commented Dec 14, 2018

QEMU supports up to 8 cores (MTTCG - multi-threaded TCG), which is great if you can compile in parallel.

Alternatively contact Palmer Dabbelt from SiFive and ask for a free SiFive HiFive Unleashed board (multiple projects have received one for porting efforts).

@gopherbot

This comment has been minimized.

Copy link

commented Jan 16, 2019

Change https://golang.org/cl/157899 mentions this issue: unix: use Renameat2 to implement Renameat on linux/riscv64

@gopherbot

This comment has been minimized.

Copy link

commented Jan 16, 2019

Change https://golang.org/cl/157900 mentions this issue: unix: use int8 for RawSockaddrUnix.Path on linux/riscv64

@gopherbot

This comment has been minimized.

Copy link

commented Jan 16, 2019

Change https://golang.org/cl/157901 mentions this issue: unix: add assembly for riscv64 syscalls

gopherbot pushed a commit to golang/sys that referenced this issue Jan 16, 2019
unix: use Renameat2 to implement Renameat on linux/riscv64
On linux/riscv64, the renameat syscall no longer exists and has been
superseded by renameat2. Use Renameat2 to implement Renameat on
linux/riscv64.

Based on a patch by Ryan O'Leary.

Updates golang/go#27532

Change-Id: I7c60c7f824750408265f67397b8ac1fa7226f425
Reviewed-on: https://go-review.googlesource.com/c/157899
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
gopherbot pushed a commit to golang/sys that referenced this issue Jan 16, 2019
unix: use int8 for RawSockaddrUnix.Path on linux/riscv64
On linux/riscv64, char defaults to unsigned, so explicitly make
RawSockaddrUnix.Path signed.

Patch by Ryan O'Leary.

Updates golang/go#27532

Change-Id: If99a3953462ad98f61d8fafcda3ebb71b44e6018
Reviewed-on: https://go-review.googlesource.com/c/157900
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>

@bradfitz bradfitz added the arch-riscv label Feb 16, 2019

@tklauser

This comment has been minimized.

Copy link
Member Author

commented Feb 19, 2019

Issue for setting up a qemu-based RISC-V builder: #30262

halstead pushed a commit to openembedded/openembedded-core that referenced this issue Mar 20, 2019
goarch: Add riscv64
Although RISC-V 64-bit doesn't have official golang support there are
forks that now exist with at least some support and work is ongoing in
the upstream tree. In order to be able to use the goarch class add
support for RISC-V.

For more details see here:
golang/go#27532

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gc-plp pushed a commit to gc-plp/poky that referenced this issue Mar 21, 2019
goarch: Add riscv64
Although RISC-V 64-bit doesn't have official golang support there are
forks that now exist with at least some support and work is ongoing in
the upstream tree. In order to be able to use the goarch class add
support for RISC-V.

For more details see here:
golang/go#27532

(From OE-Core rev: fc6cfb5da704aa79b8632889e478d7c3ba79c7fb)

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gc-plp pushed a commit to gc-plp/poky that referenced this issue Mar 21, 2019
goarch: Add riscv64
Although RISC-V 64-bit doesn't have official golang support there are
forks that now exist with at least some support and work is ongoing in
the upstream tree. In order to be able to use the goarch class add
support for RISC-V.

For more details see here:
golang/go#27532

(From OE-Core rev: fc6cfb5da704aa79b8632889e478d7c3ba79c7fb)

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this issue Mar 21, 2019
goarch: Add riscv64
Although RISC-V 64-bit doesn't have official golang support there are
forks that now exist with at least some support and work is ongoing in
the upstream tree. In order to be able to use the goarch class add
support for RISC-V.

For more details see here:
golang/go#27532

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
@carlosedp

This comment has been minimized.

Copy link

commented Aug 9, 2019

I just tested latest merge @4a6f656c did on his branch up to yesterday commits and it worked 100%:

❯ go version                                                                                                                                                                               
go version devel +0c72bd386b Fri Aug 9 17:52:39 2019 +1000 linux/riscv64

❯ GO_TEST_TIMEOUT_SCALE=10 ./run.bash                                                                                                                                                      

##### Building packages and commands.

##### Testing packages.
ok      archive/tar     0.548s
ok      archive/zip     0.918s
ok      bufio   0.797s
ok      bytes   5.040s
ok      compress/bzip2  0.767s
ok      compress/flate  7.161s
ok      compress/gzip   0.198s
ok      compress/lzw    0.169s
ok      crypto  0.065s
ok      crypto/aes      0.188s
ok      crypto/cipher   0.041s
ok      crypto/des      0.090s
ok      crypto/dsa      0.098s
ok      crypto/ecdsa    3.370s
ok      crypto/ed25519  0.820s
ok      crypto/elliptic 0.443s
ok      crypto/hmac     0.064s
ok      crypto/internal/subtle  0.025s
ok      crypto/md5      0.044s
ok      crypto/rand     0.188s
ok      crypto/rc4      0.485s
ok      crypto/rsa      2.156s
ok      crypto/sha1     0.045s
ok      crypto/sha256   0.051s
ok      crypto/sha512   0.086s
ok      crypto/subtle   0.048s
ok      crypto/tls      24.367s
ok      crypto/x509     17.952s
ok      database/sql    1.446s
ok      database/sql/driver     0.062s
ok      debug/dwarf     0.277s
ok      debug/elf       0.373s
ok      debug/gosym     0.105s
ok      debug/macho     0.079s
ok      debug/pe        0.085s
ok      debug/plan9obj  0.059s
ok      encoding/ascii85        0.080s
ok      encoding/asn1   0.037s
ok      encoding/base32 0.241s
ok      encoding/base64 0.053s
ok      encoding/binary 0.089s
ok      encoding/csv    0.165s
ok      encoding/gob    0.223s
ok      encoding/hex    0.047s
ok      encoding/json   0.816s
ok      encoding/pem    0.178s
ok      encoding/xml    0.173s
ok      errors  0.054s
ok      expvar  0.052s
ok      flag    0.030s
ok      fmt     1.272s
ok      go/ast  0.047s
ok      go/build        17.641s
ok      go/constant     0.039s
ok      go/doc  1.939s
ok      go/format       0.089s
ok      go/importer     7.778s
ok      go/internal/gccgoimporter       18.491s
ok      go/internal/gcimporter  3.115s
ok      go/internal/srcimporter 29.464s
ok      go/parser       0.344s
ok      go/printer      2.818s
ok      go/scanner      0.051s
ok      go/token        0.292s
ok      go/types        17.042s
ok      hash    0.083s
ok      hash/adler32    0.148s
ok      hash/crc32      0.061s
ok      hash/crc64      0.039s
ok      hash/fnv        0.029s
ok      html    0.047s
ok      html/template   0.369s
ok      image   1.424s
ok      image/color     0.310s
ok      image/draw      0.651s
ok      image/gif       5.401s
ok      image/jpeg      3.378s
ok      image/png       0.851s
ok      index/suffixarray       39.603s
ok      internal/cpu    0.083s
ok      internal/fmtsort        0.054s
ok      internal/poll   0.510s
ok      internal/reflectlite    0.042s
ok      internal/singleflight   0.061s
ok      internal/trace  0.735s
ok      internal/xcoff  0.114s
ok      io      0.129s
ok      io/ioutil       0.053s
ok      log     0.094s
ok      log/syslog      1.398s
ok      math    0.047s
ok      math/big        11.466s
ok      math/bits       0.172s
ok      math/cmplx      0.048s
ok      math/rand       1.565s
ok      mime    0.108s
ok      mime/multipart  2.476s
ok      mime/quotedprintable    0.197s
ok      net     147.782s
ok      net/http        33.446s
ok      net/http/cgi    2.555s
ok      net/http/cookiejar      0.145s
ok      net/http/fcgi   0.094s
ok      net/http/httptest       0.485s
ok      net/http/httptrace      0.070s
ok      net/http/httputil       0.728s
ok      net/http/internal       0.059s
ok      net/http/pprof  2.069s
ok      net/internal/socktest   0.075s
ok      net/mail        0.041s
ok      net/rpc 0.133s
ok      net/rpc/jsonrpc 0.138s
ok      net/smtp        0.252s
ok      net/textproto   0.067s
ok      net/url 0.095s
ok      os      1.848s
ok      os/exec 1.560s
ok      os/signal       5.346s
ok      os/user 0.038s
ok      path    0.043s
ok      path/filepath   1.079s
ok      plugin  0.023s
ok      reflect 2.695s
ok      regexp  0.832s
ok      regexp/syntax   12.113s
ok      runtime 98.538s
ok      runtime/debug   0.733s
ok      runtime/internal/atomic 0.083s
ok      runtime/internal/math   0.025s
ok      runtime/internal/sys    0.048s
ok      runtime/pprof   16.862s
ok      runtime/pprof/internal/profile  0.055s
ok      runtime/trace   8.830s
ok      sort    0.675s
ok      strconv 7.085s
ok      strings 2.570s
ok      sync    1.797s
ok      sync/atomic     0.357s
ok      syscall 0.110s
ok      testing 0.689s
ok      testing/quick   0.611s
ok      text/scanner    0.111s
ok      text/tabwriter  0.065s
ok      text/template   0.672s
ok      text/template/parse     0.114s
ok      time    5.167s
ok      unicode 0.033s
ok      unicode/utf16   0.063s
ok      unicode/utf8    0.049s
ok      cmd/addr2line   57.598s
ok      cmd/api 2.350s
ok      cmd/asm/internal/asm    11.222s
ok      cmd/asm/internal/lex    0.044s
ok      cmd/compile     0.101s
ok      cmd/compile/internal/gc 252.914s
ok      cmd/compile/internal/ssa        11.291s
ok      cmd/compile/internal/syntax     0.282s
ok      cmd/compile/internal/test       0.074s [no tests to run]
ok      cmd/compile/internal/types      0.052s
ok      cmd/cover       124.197s
ok      cmd/doc 4.386s
ok      cmd/fix 0.444s
ok      cmd/go  1743.219s
ok      cmd/go/internal/auth    0.082s
ok      cmd/go/internal/cache   0.621s
ok      cmd/go/internal/dirhash 0.079s
ok      cmd/go/internal/generate        0.313s
ok      cmd/go/internal/get     0.126s
ok      cmd/go/internal/imports 0.324s
ok      cmd/go/internal/load    0.092s
ok      cmd/go/internal/lockedfile      0.092s
ok      cmd/go/internal/lockedfile/internal/filelock    0.138s
ok      cmd/go/internal/modconv 0.237s
ok      cmd/go/internal/modfetch        0.115s
ok      cmd/go/internal/modfetch/codehost       0.049s
ok      cmd/go/internal/modfile 0.307s
ok      cmd/go/internal/modload 0.142s
ok      cmd/go/internal/module  0.044s
ok      cmd/go/internal/mvs     0.052s
ok      cmd/go/internal/note    0.303s
ok      cmd/go/internal/renameio        0.278s
ok      cmd/go/internal/search  0.125s
ok      cmd/go/internal/semver  0.040s
ok      cmd/go/internal/sumweb  0.219s
ok      cmd/go/internal/tlog    52.099s
ok      cmd/go/internal/txtar   0.071s
ok      cmd/go/internal/web     0.071s
ok      cmd/go/internal/work    0.113s
ok      cmd/gofmt       1.353s
ok      cmd/internal/buildid    6.914s
ok      cmd/internal/dwarf      0.028s
ok      cmd/internal/edit       0.022s
ok      cmd/internal/goobj      0.590s
ok      cmd/internal/obj        0.050s
ok      cmd/internal/obj/arm64  0.079s
ok      cmd/internal/obj/x86    30.316s
ok      cmd/internal/objabi     0.023s
ok      cmd/internal/src        0.025s
ok      cmd/internal/test2json  1.876s
ok      cmd/link        47.310s
ok      cmd/link/internal/ld    99.458s
ok      cmd/link/internal/sym   0.052s
ok      cmd/nm  96.471s
ok      cmd/objdump     50.622s
ok      cmd/pack        31.972s
ok      cmd/trace       0.144s
ok      cmd/vet 212.223s

##### os/user with tag osusergo
ok      os/user 0.021s

##### GOMAXPROCS=2 runtime -cpu=1,2,4 -quick
ok      runtime 29.701s

##### cmd/go terminal test
PASS
ok      cmd/go/testdata/testterminal18153       0.013s

##### Testing without libgcc.
ok      crypto/x509     13.485s
ok      net     0.060s
ok      os/user 0.022s

##### sync -cpu=10
ok      sync    1.735s

##### ../test/bench/go1

##### ../test


##### API check

ALL TESTS PASSED

Joel, do you need help on building and submitting the patches targeting Go 1.14?

@necrose99

This comment has been minimized.

@carlosedp

This comment has been minimized.

Copy link

commented Aug 25, 2019

@necrose99 unfortunately the K210 does not have a working mmu implementation and with only 8MB it’s not possible to run Linux on it. There are projects to expand RAM and I saw a video as a poc but not feasible now.

@marcopeereboom

This comment has been minimized.

Copy link

commented Aug 26, 2019

I have dropped the ball on this. Is Joel's riscv branch being merged into golang?

@carlosedp

This comment has been minimized.

Copy link

commented Aug 26, 2019

I believe the 1.14 freeze starts in November so we are in time. Do you guys think it's too much work start submitting the CLs so be reviewed? Do they need to be split somehow? Thoughts @4a6f656c ?

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Aug 26, 2019

The first step is a builder. Is there a builder running?

@carlosedp

This comment has been minimized.

Copy link

commented Aug 26, 2019

Hi @ianlancetaylor , I've submitted a CL based on @bradfitz work here: https://golang.org/cl/188501

@marcopeereboom

This comment has been minimized.

Copy link

commented Aug 26, 2019

@ianlancetaylor assuming the builder is working what else do you need us to do?

IIRC the riscv branch has been updated to work with 1.13 and I am going to verify that.

@4a6f656c are there any outstanding issues that you know of?

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Aug 26, 2019

Once the builder is working is fine to start sending in patches as mentioned above (#27532 (comment)). Thanks.

@carlosedp

This comment has been minimized.

Copy link

commented Aug 26, 2019

The latest commits on @4a6f656c tree works and tests 100% as I posted some days ago. @ianlancetaylor any chance of getting a review of the builder CL I've submitted?

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Aug 26, 2019

I pinged the builder CL. I haven't worked on the builders myself.

@gopherbot

This comment has been minimized.

Copy link

commented Aug 28, 2019

Change https://golang.org/cl/192077 mentions this issue: syscall: move Renameat to syscall_linux_$GOARCH.go

gopherbot pushed a commit that referenced this issue Aug 28, 2019
syscall: move Renameat to syscall_linux_$GOARCH.go
On linux/riscv64, the renameat syscall no longer exists and has been
superseded by renameat2. Thus we'll have to use Renameat2 to implement
Renameat on linux/riscv64 for #27532. Prepare for this by moving the
Renameat definition to the GOARCH specific files.

Follow CL 157899 which did the same for golang.org/x/sys/unix

Change-Id: I9670213cc3987df48fee962ddee36915a7785560
Reviewed-on: https://go-review.googlesource.com/c/go/+/192077
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
tomocy added a commit to tomocy/go that referenced this issue Sep 1, 2019
syscall: move Renameat to syscall_linux_$GOARCH.go
On linux/riscv64, the renameat syscall no longer exists and has been
superseded by renameat2. Thus we'll have to use Renameat2 to implement
Renameat on linux/riscv64 for golang#27532. Prepare for this by moving the
Renameat definition to the GOARCH specific files.

Follow CL 157899 which did the same for golang.org/x/sys/unix

Change-Id: I9670213cc3987df48fee962ddee36915a7785560
Reviewed-on: https://go-review.googlesource.com/c/go/+/192077
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
t4n6a1ka added a commit to t4n6a1ka/go that referenced this issue Sep 5, 2019
syscall: move Renameat to syscall_linux_$GOARCH.go
On linux/riscv64, the renameat syscall no longer exists and has been
superseded by renameat2. Thus we'll have to use Renameat2 to implement
Renameat on linux/riscv64 for golang#27532. Prepare for this by moving the
Renameat definition to the GOARCH specific files.

Follow CL 157899 which did the same for golang.org/x/sys/unix

Change-Id: I9670213cc3987df48fee962ddee36915a7785560
Reviewed-on: https://go-review.googlesource.com/c/go/+/192077
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@gopherbot

This comment has been minimized.

Copy link

commented Sep 5, 2019

Change https://golang.org/cl/193677 mentions this issue: cmd/internal/obj: instructions and registers for RISC-V

@gopherbot

This comment has been minimized.

Copy link

commented Sep 5, 2019

Change https://golang.org/cl/193678 mentions this issue: cmd/internal/sys: provide archtecture definition for riscv64

gopherbot pushed a commit that referenced this issue Sep 6, 2019
cmd/internal/sys: provide architecture definition for riscv64
Updates #27532

Change-Id: I7ecf5239d6bc49408a2f155d0f5398ee716fd443
Reviewed-on: https://go-review.googlesource.com/c/go/+/193678
Reviewed-by: Cherry Zhang <cherryyz@google.com>
gopherbot pushed a commit that referenced this issue Sep 7, 2019
cmd/internal/obj: instructions and registers for RISC-V
Start implementing an assembler for RISC-V - this provides register
definitions and instruction mnemonics as defined in the RISC-V
Instruction Set Manual, along with instruction encoding.

The instruction encoding is generated by the parse_opcodes script with
the "opcodes" and "opcodes-pseudo" files from (`make inst.go`):

  https://github.com/riscv/riscv-opcodes

This is based on the riscv-go port:

  https://github.com/riscv/riscv-go

Contributors to the riscv-go port are:

  Amol Bhave <ammubhave@gmail.com>
  Benjamin Barenblat <bbaren@google.com>
  Josh Bleecher Snyder <josharian@gmail.com>
  Michael Pratt <michael@pratt.im>
  Michael Yenik <myenik@google.com>
  Ronald G. Minnich <rminnich@gmail.com>
  Stefan O'Rear <sorear2@gmail.com>

This port has been updated to Go 1.13:

  https://github.com/4a6f656c/riscv-go

Updates #27532

Change-Id: I257b6de87e9864df61a2b0ce9be15968c1227b49
Reviewed-on: https://go-review.googlesource.com/c/go/+/193677
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
@gopherbot

This comment has been minimized.

Copy link

commented Sep 7, 2019

Change https://golang.org/cl/194117 mentions this issue: cmd/asm,cmd/internal/obj: initial support for riscv64 assembler

gopherbot pushed a commit that referenced this issue Sep 12, 2019
cmd/asm,cmd/internal/obj: initial support for riscv64 assembler
Provide the initial framework for the riscv64 assembler. For now this
only supports raw WORD instructions, but at least allows for basic
testing. Additional functionality will be added in separate changes.

Based on the riscv-go port.

Updates #27532

Change-Id: I181ffb2d37a34764a3e91eded177d13a89c69f9a
Reviewed-on: https://go-review.googlesource.com/c/go/+/194117
Reviewed-by: Cherry Zhang <cherryyz@google.com>
@gopherbot

This comment has been minimized.

Copy link

commented Sep 12, 2019

Change https://golang.org/cl/195079 mentions this issue: cmd/asm,cmd/internal/obj/riscv: implement integer computational instructions

gopherbot pushed a commit that referenced this issue Sep 17, 2019
cmd/asm,cmd/internal/obj/riscv: implement integer computational instr…
…uctions

Add support for assembling integer computational instructions.

Based on the riscv-go port.

Updates #27532

Change-Id: Ibf02649eebd65ce96002a9ca0624266d96def2cd
Reviewed-on: https://go-review.googlesource.com/c/go/+/195079
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
@gopherbot

This comment has been minimized.

Copy link

commented Sep 17, 2019

Change https://golang.org/cl/195917 mentions this issue: Load, store and multiplication instructions.

@gopherbot

This comment has been minimized.

Copy link

commented Sep 17, 2019

Change https://golang.org/cl/195918 mentions this issue: cmd/internal/obj/riscv: environment call/breakpoint and base counter/timer instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.