Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for FuncPCTest (0.1 sec)

  1. src/internal/abi/export_test.go

    // license that can be found in the LICENSE file.
    
    package abi
    
    func FuncPCTestFn()
    
    var FuncPCTestFnAddr uintptr // address of FuncPCTestFn, directly retrieved from assembly
    
    //go:noinline
    func FuncPCTest() uintptr {
    	return FuncPCABI0(FuncPCTestFn)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 23 21:05:39 UTC 2021
    - 362 bytes
    - Viewed (0)
  2. src/internal/abi/abi_test.go

    	"strings"
    	"testing"
    )
    
    func TestFuncPC(t *testing.T) {
    	// Test that FuncPC* can get correct function PC.
    	pcFromAsm := abi.FuncPCTestFnAddr
    
    	// Test FuncPC for locally defined function
    	pcFromGo := abi.FuncPCTest()
    	if pcFromGo != pcFromAsm {
    		t.Errorf("FuncPC returns wrong PC, want %x, got %x", pcFromAsm, pcFromGo)
    	}
    
    	// Test FuncPC for imported function
    	pcFromGo = abi.FuncPCABI0(abi.FuncPCTestFn)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 29 18:31:05 UTC 2023
    - 2.4K bytes
    - Viewed (0)
Back to top