/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
go1.24.13
test/codegen/unsafe.go
16 строк
396 B
Keith Randall
cmd/compile: pull multiple adds out of an unsafe.Pointer<->uintptr conversion
22 ноя 2024, 01:57
22 ноя 2024, 01:57
f0b0109
Код
Авторство
О чём код?
// asmcheck // Copyright 2024 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. package codegen import "unsafe" func f(p unsafe.Pointer, x, y uintptr) int64 { p = unsafe.Pointer(uintptr(p) + x + y) // amd64:`MOVQ\s\(.*\)\(.*\*1\), ` // arm64:`MOVD\s\(R[0-9]+\)\(R[0-9]+\), ` return *(*int64)(p) }