Text file src/runtime/valgrind_arm64.s

     1  // Copyright 2025 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 valgrind && linux
     6  
     7  #include "textflag.h"
     8  
     9  // See valgrind_amd64.s for notes about this assembly.
    10  
    11  // func valgrindClientRequest(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) (ret uintptr)
    12  TEXT runtime·valgrindClientRequest(SB), NOSPLIT, $0-56
    13  	// Load the address of the first of the (contiguous) arguments into x4.
    14  	MOVD $args+0(FP), R4
    15  
    16  	// Zero x3, since some requests may not populate it.
    17  	MOVD ZR, R3
    18  
    19  	// Emit the special preamble.
    20  	ROR $3, R12; ROR $13, R12
    21  	ROR $51, R12; ROR $61, R12
    22  
    23  	// "Execute" the client request.
    24  	ORR R10, R10
    25  
    26  	// Copy the result out of x3.
    27  	MOVD R3, ret+48(FP)
    28  
    29  	RET
    30  

View as plain text