diff options
| author | Guoqi Chen <chenguoqi@loongson.cn> | 2022-06-10 19:08:14 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-06-15 20:49:30 +0000 |
| commit | 97bfc77f3897d6268cf4f9bb6756b97ff5e7cc03 (patch) | |
| tree | 6ccaf67926bb9c992e874cd4f7688f3e0c1285f3 /src/syscall | |
| parent | 937fa5000a7bb07ed62d35a1aea9ea0819659084 (diff) | |
| download | go-97bfc77f3897d6268cf4f9bb6756b97ff5e7cc03.tar.xz | |
syscall, runtime/internal/syscall: always zero the higher bits of return value on linux/loong64
All loong64 syscalls return values only via R4/A0, and R5/A1 may contain unrelated
content. Always zero the second return value.
Change-Id: I62af59369bece5bd8028b937c74f4694150f7a55
Reviewed-on: https://go-review.googlesource.com/c/go/+/411615
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/syscall')
| -rw-r--r-- | src/syscall/asm_linux_loong64.s | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/syscall/asm_linux_loong64.s b/src/syscall/asm_linux_loong64.s index 2e7d0c7a3e..7dc69c6612 100644 --- a/src/syscall/asm_linux_loong64.s +++ b/src/syscall/asm_linux_loong64.s @@ -40,5 +40,5 @@ TEXT ·rawSyscallNoError(SB),NOSPLIT,$0-48 MOVV trap+0(FP), R11 // syscall entry SYSCALL MOVV R4, r1+32(FP) - MOVV R5, r2+40(FP) + MOVV R0, r2+40(FP) // r2 is not used. Always set to 0. RET |
