]> Cypherpunks repositories - gostls13.git/commit
syscall: fix riscv64 syscall assembly
authorJoel Sing <joel@sing.id.au>
Sun, 5 Jan 2020 13:18:56 +0000 (00:18 +1100)
committerTobias Klauser <tobias.klauser@gmail.com>
Mon, 6 Jan 2020 09:24:06 +0000 (09:24 +0000)
commitfc5eee3c1d37131ca5887ed1d020f6cf83d20a92
treeeedb39f4e23f88b72188578cb219939a59c12307
parentc6e84263865fa418b4d4a60f077d02c10a0fff23
syscall: fix riscv64 syscall assembly

RISCV has no instruction to store an immediate value to memory, or to
subtract an immediate value. An immediate needs to be moved to a register
first, or in the case of $0, the zero value register (ZERO or R0) can be
used instead. Restore the original riscv-go code so that it compiles.

Updates #27532

Change-Id: I3c60e6f385c59679252a710dbba153357a367516
Reviewed-on: https://go-review.googlesource.com/c/go/+/212761
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
src/syscall/asm_linux_riscv64.s