summaryrefslogtreecommitdiff
path: root/src/cmd/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
diff options
context:
space:
mode:
authorHana (Hyang-Ah) Kim <hyangah@gmail.com>2018-05-10 00:01:15 +0800
committerHyang-Ah Hana Kim <hyangah@gmail.com>2018-05-23 19:01:58 +0000
commit3f89214940d1f922bc4fde923de658a2ec1e4ac3 (patch)
treefb89ac6e1aeb8f479d60fa912a337f3456bab4f7 /src/cmd/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
parent392ff18b8fdcb1f116f81887ddedfd43b19fdb9c (diff)
downloadgo-git-3f89214940d1f922bc4fde923de658a2ec1e4ac3.tar.gz
cmd/pprof: add readline support similar to upstream
The upstream pprof implements the readline feature using the github.com/chzyer/readline package in its pprof.go main. It would be ideal to use the same readline support package as the upstream for better user experience and code maintenance. However, bringing in third-party packages requires more work than I envisioned (e.g. clean up the vendored code to meet the expected standard - iow don't break builders). As a result, this change implements the similar feature for the pprof command included in the go distribution (cmd/pprof/pprof.go) using golang.org/x/crypto/ssh/terminal for now. Auto-completion is not yet supported (same in the upstream). The feature is enabled only in linux, windows, darwin, and only when terminal support is available. This change brings in new vendored packages, golang.org/x/crypto/ssh/terminal and golang.org/x/sys/{unix,windows}. For #14041 Change-Id: If4a790796acf2ab20f7e81268b9d9354c5a5cd2b Reviewed-on: https://go-review.googlesource.com/112436 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s')
-rw-r--r--src/cmd/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s b/src/cmd/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
new file mode 100644
index 0000000000..ab9d63831a
--- /dev/null
+++ b/src/cmd/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
@@ -0,0 +1,56 @@
+// Copyright 2015 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.
+
+// +build linux
+// +build mips64 mips64le
+// +build !gccgo
+
+#include "textflag.h"
+
+//
+// System calls for mips64, Linux
+//
+
+// Just jump to package syscall's implementation for all these functions.
+// The runtime may know about them.
+
+TEXT ·Syscall(SB),NOSPLIT,$0-56
+ JMP syscall·Syscall(SB)
+
+TEXT ·Syscall6(SB),NOSPLIT,$0-80
+ JMP syscall·Syscall6(SB)
+
+TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
+ JAL runtime·entersyscall(SB)
+ MOVV a1+8(FP), R4
+ MOVV a2+16(FP), R5
+ MOVV a3+24(FP), R6
+ MOVV R0, R7
+ MOVV R0, R8
+ MOVV R0, R9
+ MOVV trap+0(FP), R2 // syscall entry
+ SYSCALL
+ MOVV R2, r1+32(FP)
+ MOVV R3, r2+40(FP)
+ JAL runtime·exitsyscall(SB)
+ RET
+
+TEXT ·RawSyscall(SB),NOSPLIT,$0-56
+ JMP syscall·RawSyscall(SB)
+
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
+ JMP syscall·RawSyscall6(SB)
+
+TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
+ MOVV a1+8(FP), R4
+ MOVV a2+16(FP), R5
+ MOVV a3+24(FP), R6
+ MOVV R0, R7
+ MOVV R0, R8
+ MOVV R0, R9
+ MOVV trap+0(FP), R2 // syscall entry
+ SYSCALL
+ MOVV R2, r1+32(FP)
+ MOVV R3, r2+40(FP)
+ RET