1// Copyright 2015 The Go Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5//go:build linux && (mips64 || mips64le) 6 7package runtime 8 9import "internal/cpu" 10 11func archauxv(tag, val uintptr) { 12 switch tag { 13 case _AT_HWCAP: 14 cpu.HWCap = uint(val) 15 } 16} 17 18func osArchInit() {} 19 20//go:nosplit 21func cputicks() int64 { 22 // nanotime() is a poor approximation of CPU ticks that is enough for the profiler. 23 return nanotime() 24} 25 26const ( 27 _SS_DISABLE = 2 28 _NSIG = 129 29 _SIG_BLOCK = 1 30 _SIG_UNBLOCK = 2 31 _SIG_SETMASK = 3 32) 33 34type sigset [2]uint64 35 36var sigset_all = sigset{^uint64(0), ^uint64(0)} 37 38//go:nosplit 39//go:nowritebarrierrec 40func sigaddset(mask *sigset, i int) { 41 (*mask)[(i-1)/64] |= 1 << ((uint32(i) - 1) & 63) 42} 43 44func sigdelset(mask *sigset, i int) { 45 (*mask)[(i-1)/64] &^= 1 << ((uint32(i) - 1) & 63) 46} 47 48//go:nosplit 49func sigfillset(mask *[2]uint64) { 50 (*mask)[0], (*mask)[1] = ^uint64(0), ^uint64(0) 51} 52