Source file test/internal/runtime/sys/callerpc.go

     1  // asmcheck -gcflags=-+ -gcflags=-p=internal/runtime/sys
     2  
     3  // Copyright 2026 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  package sys
     8  
     9  // Calls to this function are replaced by the compiler intrinsic.
    10  //
    11  //go:noinline
    12  func GetCallerPC() uintptr { return 0 }
    13  
    14  func callerPC() uintptr {
    15  	// The continuation slot is 8 bytes on both ports, but wasm32 stores
    16  	// the logical PC in its low word and the function handle in its high word.
    17  	// wasm:`I64Load\s` -`I64Load32U`
    18  	return GetCallerPC()
    19  }
    20  

View as plain text