]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/riscv: simplify machine code output
authorJoel Sing <joel@sing.id.au>
Mon, 23 Aug 2021 11:32:30 +0000 (21:32 +1000)
committerJoel Sing <joel@sing.id.au>
Wed, 8 Sep 2021 06:56:06 +0000 (06:56 +0000)
commitf030043e37c4038e8a169feaf814ccbe3ae55cda
tree8c33171a1f90a908f5ccd127dab811c2297298d9
parentda790cccc5da9486e5f45360a3b1b76a1a0aeaea
cmd/internal/obj/riscv: simplify machine code output

Use cursym.WriteInt rather than building up a slice of bytes and then writing them
out via PutUint32. This also allows for variable instruction sizes, which will be
needed when support for compressed (2 byte length) instructions is added.

Change-Id: I17c9ffa52d27c91a24e161317e3db28e224804ae
Reviewed-on: https://go-review.googlesource.com/c/go/+/344460
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/internal/obj/riscv/obj.go