Use mcdsl/terminal for all password prompts
Replace direct golang.org/x/term calls with mcdsl/terminal.ReadPassword across mciasctl (6 sites), mciasgrpcctl (1 site), and mciasdb (1 site). Aligns with the new CLI security standard in engineering-standards.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1
vendor/modernc.org/libc/AUTHORS
generated
vendored
1
vendor/modernc.org/libc/AUTHORS
generated
vendored
@@ -17,6 +17,7 @@ Jason DeBettencourt <jasond17@gmail.com>
|
||||
Jasper Siepkes <jasper@siepkes.nl>
|
||||
Koichi Shiraishi <zchee.io@gmail.com>
|
||||
Marius Orcsik <marius@federated.id>
|
||||
Olivier Mengué <dolmen@cpan.org>
|
||||
Patricio Whittingslow <graded.sp@gmail.com>
|
||||
Scot C Bontrager <scot@indievisible.org>
|
||||
Steffen Butzer <steffen(dot)butzer@outlook.com>
|
||||
|
||||
31
vendor/modernc.org/libc/CONTRIBUTING.md
generated
vendored
Normal file
31
vendor/modernc.org/libc/CONTRIBUTING.md
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# Contributing to this repository
|
||||
|
||||
Thank you for your interest in contributing! To help keep the project stable across its many targets, please follow these guidelines when submitting a pull request or merge request.
|
||||
|
||||
### Verification
|
||||
|
||||
Before submitting your changes, please ensure that they do not break the build for different architectures or build tags.
|
||||
|
||||
Run the following script in your local environment:
|
||||
|
||||
```bash
|
||||
$ ./build_all_targets.sh
|
||||
```
|
||||
|
||||
Please verify that all targets you can test pass before opening your request.
|
||||
|
||||
### Authors and Contributors
|
||||
|
||||
If you would like yourself and/or your company to be officially recognized in the project:
|
||||
|
||||
* Optionally, please include a change to the AUTHORS and/or CONTRIBUTORS files within your merge request.
|
||||
|
||||
### The Process
|
||||
|
||||
* Fork the repository (or host a public branch if you do not have a gitlab.com account).
|
||||
* Implement your changes, keeping them as focused as possible.
|
||||
* Submit your request with a clear description of the problem solved, the dependency improved, etc.
|
||||
|
||||
----
|
||||
|
||||
We appreciate your help in making the Go ecosystem more robust!
|
||||
1
vendor/modernc.org/libc/CONTRIBUTORS
generated
vendored
1
vendor/modernc.org/libc/CONTRIBUTORS
generated
vendored
@@ -18,6 +18,7 @@ Jasper Siepkes <jasper@siepkes.nl>
|
||||
Koichi Shiraishi <zchee.io@gmail.com>
|
||||
Leonardo Taccari <leot@NetBSD.org>
|
||||
Marius Orcsik <marius@federated.id>
|
||||
Olivier Mengué <dolmen@cpan.org>
|
||||
Patricio Whittingslow <graded.sp@gmail.com>
|
||||
Roman Khafizianov <roman@any.org>
|
||||
Scot C Bontrager <scot@indievisible.org>
|
||||
|
||||
5
vendor/modernc.org/libc/abi0_linux_amd64.go
generated
vendored
5
vendor/modernc.org/libc/abi0_linux_amd64.go
generated
vendored
@@ -468,6 +468,9 @@ func Y__builtin_popcount(t *TLS, x uint32) (_2 int32)
|
||||
//go:noescape
|
||||
func Y__builtin_popcountl(t *TLS, x ulong) (_2 int32)
|
||||
|
||||
//go:noescape
|
||||
func Y__builtin_popcountll(t *TLS, x uint64) (_2 int32)
|
||||
|
||||
//go:noescape
|
||||
func Y__builtin_prefetch(t *TLS, addr, args uintptr)
|
||||
|
||||
@@ -5028,7 +5031,7 @@ func Ystrlcat(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t)
|
||||
func Ystrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t)
|
||||
|
||||
//go:noescape
|
||||
func Ystrlen(tls *TLS, s uintptr) (r Tsize_t)
|
||||
func Ystrlen(t *TLS, s uintptr) (r Tsize_t)
|
||||
|
||||
//go:noescape
|
||||
func Ystrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32)
|
||||
|
||||
17
vendor/modernc.org/libc/abi0_linux_amd64.s
generated
vendored
17
vendor/modernc.org/libc/abi0_linux_amd64.s
generated
vendored
@@ -2427,6 +2427,19 @@ TEXT ·Y__builtin_popcountl(SB),$24-20
|
||||
MOVL AX, _2+16(FP)
|
||||
RET
|
||||
|
||||
// func Y__builtin_popcountll(t *TLS, x uint64) (_2 int32)
|
||||
TEXT ·Y__builtin_popcountll(SB),$24-20
|
||||
GO_ARGS
|
||||
NO_LOCAL_POINTERS
|
||||
MOVQ t+0(FP), AX
|
||||
MOVQ AX, 0(SP)
|
||||
MOVQ x+8(FP), AX
|
||||
MOVQ AX, 8(SP)
|
||||
CALL ·X__builtin_popcountll(SB)
|
||||
MOVL 16(SP), AX
|
||||
MOVL AX, _2+16(FP)
|
||||
RET
|
||||
|
||||
// func Y__builtin_prefetch(t *TLS, addr, args uintptr)
|
||||
TEXT ·Y__builtin_prefetch(SB),$24-24
|
||||
GO_ARGS
|
||||
@@ -25118,11 +25131,11 @@ TEXT ·Ystrlcpy(SB),$40-40
|
||||
MOVQ AX, r+32(FP)
|
||||
RET
|
||||
|
||||
// func Ystrlen(tls *TLS, s uintptr) (r Tsize_t)
|
||||
// func Ystrlen(t *TLS, s uintptr) (r Tsize_t)
|
||||
TEXT ·Ystrlen(SB),$24-24
|
||||
GO_ARGS
|
||||
NO_LOCAL_POINTERS
|
||||
MOVQ tls+0(FP), AX
|
||||
MOVQ t+0(FP), AX
|
||||
MOVQ AX, 0(SP)
|
||||
MOVQ s+8(FP), AX
|
||||
MOVQ AX, 8(SP)
|
||||
|
||||
5
vendor/modernc.org/libc/builtin32.go
generated
vendored
5
vendor/modernc.org/libc/builtin32.go
generated
vendored
@@ -22,3 +22,8 @@ func X__builtin_clzl(t *TLS, n ulong) int32 {
|
||||
func X__builtin_popcountl(t *TLS, x ulong) int32 {
|
||||
return int32(mbits.OnesCount32(x))
|
||||
}
|
||||
|
||||
// int __builtin_popcountll (unsigned long long)
|
||||
func X__builtin_popcountll(t *TLS, x uint64) int32 {
|
||||
return int32(mbits.OnesCount64(x))
|
||||
}
|
||||
|
||||
5
vendor/modernc.org/libc/builtin64.go
generated
vendored
5
vendor/modernc.org/libc/builtin64.go
generated
vendored
@@ -22,3 +22,8 @@ func X__builtin_clzl(t *TLS, n ulong) int32 {
|
||||
func X__builtin_popcountl(t *TLS, x ulong) int32 {
|
||||
return int32(mbits.OnesCount64(x))
|
||||
}
|
||||
|
||||
// int __builtin_popcountll (unsigned long long)
|
||||
func X__builtin_popcountll(t *TLS, x uint64) int32 {
|
||||
return int32(mbits.OnesCount64(x))
|
||||
}
|
||||
|
||||
13
vendor/modernc.org/libc/builtin_all.go
generated
vendored
Normal file
13
vendor/modernc.org/libc/builtin_all.go
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
// Copyright 2026 The Libc Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
import (
|
||||
mbits "math/bits"
|
||||
)
|
||||
|
||||
func X__builtin_ctzll(tls *TLS, x uint64) int32 {
|
||||
return int32(mbits.TrailingZeros64(x))
|
||||
}
|
||||
8
vendor/modernc.org/libc/libc.go
generated
vendored
8
vendor/modernc.org/libc/libc.go
generated
vendored
@@ -531,6 +531,14 @@ func X__builtin_popcountl(t *TLS, x ulong) int32 {
|
||||
return int32(mbits.OnesCount64(uint64(x)))
|
||||
}
|
||||
|
||||
// int __builtin_popcountll (unsigned long long)
|
||||
func X__builtin_popcountll(t *TLS, x uint64) int32 {
|
||||
if __ccgo_strace {
|
||||
trc("t=%v x=%v, (%v:)", t, x, origin(2))
|
||||
}
|
||||
return int32(mbits.OnesCount64(uint64(x)))
|
||||
}
|
||||
|
||||
// char * __builtin___strcpy_chk (char *dest, const char *src, size_t os);
|
||||
func X__builtin___strcpy_chk(t *TLS, dest, src uintptr, os types.Size_t) uintptr {
|
||||
if __ccgo_strace {
|
||||
|
||||
25
vendor/modernc.org/libc/libc_all.go
generated
vendored
25
vendor/modernc.org/libc/libc_all.go
generated
vendored
@@ -9,11 +9,13 @@ import (
|
||||
"math"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/exp/constraints"
|
||||
)
|
||||
|
||||
func X__sync_add_and_fetch[T constraints.Integer](t *TLS, p uintptr, v T) T {
|
||||
type integer interface {
|
||||
~int | ~int32 | ~int64 | ~uint | ~uint32 | ~uint64 | ~uintptr
|
||||
}
|
||||
|
||||
func X__sync_add_and_fetch[T integer](t *TLS, p uintptr, v T) T {
|
||||
switch unsafe.Sizeof(v) {
|
||||
case 4:
|
||||
return T(atomic.AddInt32((*int32)(unsafe.Pointer(p)), int32(v)))
|
||||
@@ -24,7 +26,7 @@ func X__sync_add_and_fetch[T constraints.Integer](t *TLS, p uintptr, v T) T {
|
||||
}
|
||||
}
|
||||
|
||||
func X__sync_sub_and_fetch[T constraints.Integer](t *TLS, p uintptr, v T) T {
|
||||
func X__sync_sub_and_fetch[T integer](t *TLS, p uintptr, v T) T {
|
||||
switch unsafe.Sizeof(v) {
|
||||
case 4:
|
||||
return T(atomic.AddInt32((*int32)(unsafe.Pointer(p)), -int32(v)))
|
||||
@@ -103,3 +105,18 @@ func Xstrlen(t *TLS, s uintptr) (r Tsize_t) {
|
||||
func _strlen(t *TLS, s uintptr) (r Tsize_t) {
|
||||
return strlen(s)
|
||||
}
|
||||
|
||||
func X__builtin_ilogb(tls *TLS, x float64) int32 {
|
||||
return int32(math.Ilogb(x))
|
||||
}
|
||||
|
||||
func X__builtin_ilogbl(tls *TLS, x float64) int32 {
|
||||
return int32(math.Ilogb(x))
|
||||
}
|
||||
|
||||
func X__builtin_ilogbf(tls *TLS, x float32) int32 {
|
||||
// Casting to float64 is safe and mathematically correct here.
|
||||
// Subnormal float32 values become normal float64 values,
|
||||
// which allows math.Ilogb to correctly return their negative exponent.
|
||||
return int32(math.Ilogb(float64(x)))
|
||||
}
|
||||
|
||||
21
vendor/modernc.org/libc/libc_freebsd.go
generated
vendored
21
vendor/modernc.org/libc/libc_freebsd.go
generated
vendored
@@ -2480,3 +2480,24 @@ func Xdup(tls *TLS, fd int32) (r int32) {
|
||||
|
||||
return int32(nfd)
|
||||
}
|
||||
|
||||
func X__inline_isnand(t *TLS, x float64) int32 {
|
||||
if __ccgo_strace {
|
||||
trc("t=%v x=%v, (%v:)", t, x, origin(2))
|
||||
}
|
||||
return Xisnan(t, x)
|
||||
}
|
||||
|
||||
func X__inline_isnanf(t *TLS, x float32) int32 {
|
||||
if __ccgo_strace {
|
||||
trc("t=%v x=%v, (%v:)", t, x, origin(2))
|
||||
}
|
||||
return Xisnanf(t, x)
|
||||
}
|
||||
|
||||
func X__inline_isnanl(t *TLS, x float64) int32 {
|
||||
if __ccgo_strace {
|
||||
trc("t=%v x=%v, (%v:)", t, x, origin(2))
|
||||
}
|
||||
return Xisnan(t, x)
|
||||
}
|
||||
|
||||
36
vendor/modernc.org/libc/libc_windows.go
generated
vendored
36
vendor/modernc.org/libc/libc_windows.go
generated
vendored
@@ -7,7 +7,6 @@ package libc // import "modernc.org/libc"
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"golang.org/x/sys/windows"
|
||||
"math"
|
||||
mbits "math/bits"
|
||||
"os"
|
||||
@@ -24,6 +23,7 @@ import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/ncruces/go-strftime"
|
||||
"golang.org/x/sys/windows"
|
||||
"modernc.org/libc/errno"
|
||||
"modernc.org/libc/fcntl"
|
||||
"modernc.org/libc/limits"
|
||||
@@ -7702,17 +7702,6 @@ func X__mingw_strtod(t *TLS, s uintptr, p uintptr) float64 {
|
||||
return Xstrtod(t, s, p)
|
||||
}
|
||||
|
||||
func Xstrtod(t *TLS, s uintptr, p uintptr) float64 {
|
||||
if __ccgo_strace {
|
||||
trc("tls=%v s=%v p=%v, (%v:)", t, s, p, origin(2))
|
||||
}
|
||||
r0, _, err := procStrtod.Call(uintptr(s), uintptr(p))
|
||||
if err != windows.NOERROR {
|
||||
t.setErrno(err)
|
||||
}
|
||||
return math.Float64frombits(uint64(r0))
|
||||
}
|
||||
|
||||
// int vsnprintf(char *str, size_t size, const char *format, va_list ap);
|
||||
func X_vsnprintf(t *TLS, str uintptr, size types.Size_t, format, ap uintptr) int32 {
|
||||
if __ccgo_strace {
|
||||
@@ -7862,3 +7851,26 @@ func X_wstat32(tls *TLS, path, buffer uintptr) (r int32) {
|
||||
}
|
||||
return int32(r0)
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel Tsize_t, width Tsize_t, cmp uintptr) uintptr {
|
||||
if __ccgo_strace {
|
||||
trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
|
||||
}
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > 0 {
|
||||
try = base + uintptr(width*(nel/2))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel /= 2
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel -= nel/2 + 1
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
12
vendor/modernc.org/libc/libc_windows_386.go
generated
vendored
12
vendor/modernc.org/libc/libc_windows_386.go
generated
vendored
@@ -727,3 +727,15 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
|
||||
}
|
||||
return size_t((int32(s) - int32(a)) / 1)
|
||||
}
|
||||
|
||||
// Defined in libc_windows_386.s
|
||||
func callStrtod(fn uintptr, s uintptr, p uintptr) float64
|
||||
|
||||
func Xstrtod(t *TLS, s uintptr, p uintptr) float64 {
|
||||
if __ccgo_strace {
|
||||
trc("tls=%v s=%v p=%v, (%v:)", t, s, p, origin(2))
|
||||
}
|
||||
// We use the assembly bridge to call the function pointer directly.
|
||||
// This ensures we capture the float return value from ST(0).
|
||||
return callStrtod(procStrtod.Addr(), s, p)
|
||||
}
|
||||
|
||||
29
vendor/modernc.org/libc/libc_windows_386.s
generated
vendored
Normal file
29
vendor/modernc.org/libc/libc_windows_386.s
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "textflag.h"
|
||||
|
||||
// func callStrtod(fn uintptr, s uintptr, p uintptr) float64
|
||||
TEXT ·callStrtod(SB), NOSPLIT, $0
|
||||
// 1. Initialize FPU
|
||||
// This ensures the x87 stack is empty (Tag Word = FFFF).
|
||||
// Without this, garbage on the stack causes the result push to overflow -> NaN.
|
||||
FINIT
|
||||
|
||||
// 2. Load arguments from Go stack
|
||||
MOVL fn+0(FP), AX // Function pointer
|
||||
MOVL s+4(FP), CX // String pointer
|
||||
MOVL p+8(FP), DX // Endptr pointer
|
||||
|
||||
// 3. Setup C stack for __cdecl
|
||||
SUBL $8, SP
|
||||
MOVL DX, 4(SP) // Push endptr
|
||||
MOVL CX, 0(SP) // Push str
|
||||
|
||||
// 4. Call the C function
|
||||
CALL AX
|
||||
|
||||
// 5. Clean up stack
|
||||
ADDL $8, SP
|
||||
|
||||
// 6. Store FPU result (ST0) into Go return slot
|
||||
FMOVD F0, ret+12(FP)
|
||||
|
||||
RET
|
||||
17
vendor/modernc.org/libc/libc_windows_amd64.go
generated
vendored
17
vendor/modernc.org/libc/libc_windows_amd64.go
generated
vendored
@@ -6,11 +6,13 @@ package libc // import "modernc.org/libc"
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"modernc.org/libc/errno"
|
||||
"modernc.org/libc/sys/types"
|
||||
"math"
|
||||
"os"
|
||||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"modernc.org/libc/errno"
|
||||
"modernc.org/libc/sys/types"
|
||||
)
|
||||
|
||||
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
|
||||
@@ -627,3 +629,14 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
|
||||
}
|
||||
return size_t((int64(s) - int64(a)) / 1)
|
||||
}
|
||||
|
||||
func Xstrtod(t *TLS, s uintptr, p uintptr) float64 {
|
||||
if __ccgo_strace {
|
||||
trc("tls=%v s=%v p=%v, (%v:)", t, s, p, origin(2))
|
||||
}
|
||||
_, r2, err := procStrtod.Call(uintptr(s), uintptr(p))
|
||||
if err != windows.NOERROR {
|
||||
t.setErrno(err)
|
||||
}
|
||||
return math.Float64frombits(uint64(r2))
|
||||
}
|
||||
|
||||
10
vendor/modernc.org/libc/libc_windows_arm64.go
generated
vendored
10
vendor/modernc.org/libc/libc_windows_arm64.go
generated
vendored
@@ -627,3 +627,13 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
|
||||
}
|
||||
return size_t((int64(s) - int64(a)) / 1)
|
||||
}
|
||||
|
||||
// Defined in libc_windows_arm64.s
|
||||
func callStrtod(fn uintptr, s uintptr, p uintptr) float64
|
||||
|
||||
func Xstrtod(t *TLS, s uintptr, p uintptr) float64 {
|
||||
if __ccgo_strace {
|
||||
trc("tls=%v s=%v p=%v, (%v:)", t, s, p, origin(2))
|
||||
}
|
||||
return callStrtod(procStrtod.Addr(), s, p)
|
||||
}
|
||||
|
||||
20
vendor/modernc.org/libc/libc_windows_arm64.s
generated
vendored
Normal file
20
vendor/modernc.org/libc/libc_windows_arm64.s
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "textflag.h"
|
||||
|
||||
// func callStrtod(fn uintptr, s uintptr, p uintptr) float64
|
||||
TEXT ·callStrtod(SB), NOSPLIT, $0
|
||||
// 1. Load arguments from Go stack
|
||||
// Go passes args on stack for ABI0 (assembly functions).
|
||||
MOVD fn+0(FP), R2 // Function address (use R2 as temp)
|
||||
MOVD s+8(FP), R0 // Arg 1: str -> x0 (R0 in Go ASM)
|
||||
MOVD p+16(FP), R1 // Arg 2: endptr -> x1 (R1 in Go ASM)
|
||||
|
||||
// 2. Call the C function
|
||||
// BL (Branch with Link) to the address in R2
|
||||
CALL R2
|
||||
|
||||
// 3. Handle Return Value
|
||||
// C returns double in d0 (F0 in Go ASM).
|
||||
// Go expects return value at ret+24(FP).
|
||||
FMOVD F0, ret+24(FP)
|
||||
|
||||
RET
|
||||
23
vendor/modernc.org/libc/musl_windows_amd64.go
generated
vendored
23
vendor/modernc.org/libc/musl_windows_amd64.go
generated
vendored
@@ -1121,29 +1121,6 @@ func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c
|
||||
return Xwcsrtombs(tls, s, bp, n, uintptr(0))
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
|
||||
if __ccgo_strace {
|
||||
trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
|
||||
}
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > uint64(0) {
|
||||
try = base + uintptr(width*(nel/uint64(2)))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel = nel / uint64(2)
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel = nel - (nel/uint64(2) + uint64(1))
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return uintptr(0)
|
||||
}
|
||||
|
||||
// Support signed or unsigned plain-char
|
||||
|
||||
// Implementation choices...
|
||||
|
||||
23
vendor/modernc.org/libc/musl_windows_arm64.go
generated
vendored
23
vendor/modernc.org/libc/musl_windows_arm64.go
generated
vendored
@@ -1199,29 +1199,6 @@ func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c
|
||||
return Xwcsrtombs(tls, s, bp, n, uintptr(0))
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
|
||||
if __ccgo_strace {
|
||||
trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
|
||||
}
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > uint64(0) {
|
||||
try = base + uintptr(width*(nel/uint64(2)))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel = nel / uint64(2)
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel = nel - (nel/uint64(2) + uint64(1))
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return uintptr(0)
|
||||
}
|
||||
|
||||
// Support signed or unsigned plain-char
|
||||
|
||||
// Implementation choices...
|
||||
|
||||
1
vendor/modernc.org/libc/surface.new
generated
vendored
1
vendor/modernc.org/libc/surface.new
generated
vendored
@@ -7660,6 +7660,7 @@ X__builtin_nanl
|
||||
X__builtin_object_size
|
||||
X__builtin_popcount
|
||||
X__builtin_popcountl
|
||||
X__builtin_popcountll
|
||||
X__builtin_prefetch
|
||||
X__builtin_printf
|
||||
X__builtin_rintf
|
||||
|
||||
1
vendor/modernc.org/libc/surface.old
generated
vendored
1
vendor/modernc.org/libc/surface.old
generated
vendored
@@ -7654,6 +7654,7 @@ X__builtin_nanl
|
||||
X__builtin_object_size
|
||||
X__builtin_popcount
|
||||
X__builtin_popcountl
|
||||
X__builtin_popcountll
|
||||
X__builtin_prefetch
|
||||
X__builtin_printf
|
||||
X__builtin_rintf
|
||||
|
||||
Reference in New Issue
Block a user