diff options
| author | Xiaodong Liu <liuxiaodong@loongson.cn> | 2022-05-19 20:01:10 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-05-19 19:28:24 +0000 |
| commit | c8de7628cbbf5c3d35158cf92ae4314898930c47 (patch) | |
| tree | d82455f57296ea9dbfee4983efdc059795b338b5 /src/runtime/internal/syscall | |
| parent | 96a10b9c8469110a0aa30ea2185ca55f4aefef99 (diff) | |
| download | go-c8de7628cbbf5c3d35158cf92ae4314898930c47.tar.xz | |
runtime: implement syscalls for runtime bootstrap on linux/loong64
Contributors to the loong64 port are:
Weining Lu <luweining@loongson.cn>
Lei Wang <wanglei@loongson.cn>
Lingqin Gong <gonglingqin@loongson.cn>
Xiaolin Zhao <zhaoxiaolin@loongson.cn>
Meidan Li <limeidan@loongson.cn>
Xiaojuan Zhai <zhaixiaojuan@loongson.cn>
Qiyuan Pu <puqiyuan@loongson.cn>
Guoqi Chen <chenguoqi@loongson.cn>
This port has been updated to Go 1.15.6:
https://github.com/loongson/go
Updates #46229
Change-Id: I848608267932717895d5cff9e33040029c3f3c4b
Reviewed-on: https://go-review.googlesource.com/c/go/+/368080
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/internal/syscall')
| -rw-r--r-- | src/runtime/internal/syscall/asm_linux_loong64.s | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/runtime/internal/syscall/asm_linux_loong64.s b/src/runtime/internal/syscall/asm_linux_loong64.s new file mode 100644 index 0000000000..377a6b88c6 --- /dev/null +++ b/src/runtime/internal/syscall/asm_linux_loong64.s @@ -0,0 +1,29 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +// func Syscall6(num, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, errno uintptr) +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + MOVV num+0(FP), R11 // syscall entry + MOVV a1+8(FP), R4 + MOVV a2+16(FP), R5 + MOVV a3+24(FP), R6 + MOVV a4+32(FP), R7 + MOVV a5+40(FP), R8 + MOVV a6+48(FP), R9 + SYSCALL + MOVW $-4096, R12 + BGEU R12, R4, ok + MOVV $-1, R12 + MOVV R12, r1+56(FP) // r1 + MOVV R0, r2+64(FP) // r2 + SUBVU R4, R0, R4 + MOVV R4, err+72(FP) // errno + RET +ok: + MOVV R4, r1+56(FP) // r1 + MOVV R5, r2+64(FP) // r2 + MOVV R0, err+72(FP) // errno + RET |
