mirror of
https://github.com/golang/go
synced 2024-11-26 17:07:09 -07:00
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>
This commit is contained in:
parent
937fa5000a
commit
97bfc77f38
@ -24,6 +24,6 @@ TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
RET
|
||||
ok:
|
||||
MOVV R4, r1+56(FP)
|
||||
MOVV R5, r2+64(FP)
|
||||
MOVV R0, r2+64(FP) // r2 is not used. Always set to 0.
|
||||
MOVV R0, errno+72(FP)
|
||||
RET
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user