unix: don't zero out extra registers on riscv64 syscalls
Follow the implementation in package syscall, see CL 204659.
Change-Id: Ib97f86958cbdb0135b7980faf23729543c68d42a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/213397
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Joel Sing <joel@sing.id.au>
diff --git a/unix/asm_linux_riscv64.s b/unix/asm_linux_riscv64.s
index 6db717d..3cfefed 100644
--- a/unix/asm_linux_riscv64.s
+++ b/unix/asm_linux_riscv64.s
@@ -23,10 +23,6 @@
MOV a1+8(FP), A0
MOV a2+16(FP), A1
MOV a3+24(FP), A2
- MOV $0, A3
- MOV $0, A4
- MOV $0, A5
- MOV $0, A6
MOV trap+0(FP), A7 // syscall entry
ECALL
MOV A0, r1+32(FP) // r1
@@ -44,9 +40,6 @@
MOV a1+8(FP), A0
MOV a2+16(FP), A1
MOV a3+24(FP), A2
- MOV ZERO, A3
- MOV ZERO, A4
- MOV ZERO, A5
MOV trap+0(FP), A7 // syscall entry
ECALL
MOV A0, r1+32(FP)