From 5f8ca72cd6325689efbbfd415c3e82ec8be1f5a4 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 5 Jan 2020 23:22:07 +0100 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Joel Sing --- unix/asm_linux_riscv64.s | 7 ------- 1 file changed, 7 deletions(-) diff --git a/unix/asm_linux_riscv64.s b/unix/asm_linux_riscv64.s index 6db717de..3cfefed2 100644 --- a/unix/asm_linux_riscv64.s +++ b/unix/asm_linux_riscv64.s @@ -23,10 +23,6 @@ TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 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 @@ TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 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)