Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for NoCgo (0.03 sec)

  1. src/cmd/cgo/internal/testnocgo/nocgo.go

    // Test that -static works when not using cgo.  This test is in
    // misc/cgo to take advantage of the testing framework support for
    // when -static is expected to work.
    
    package nocgo
    
    func NoCgo() int {
    	c := make(chan int)
    
    	// The test is run with external linking, which means that
    	// goroutines will be created via the runtime/cgo package.
    	// Make sure that works.
    	go func() {
    		c <- 42
    	}()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 574 bytes
    - Viewed (0)
  2. src/runtime/tls_riscv64.s

    // If !iscgo, this is a no-op.
    //
    // NOTE: mcall() assumes this clobbers only X31 (REG_TMP).
    TEXT runtime·save_g(SB),NOSPLIT|NOFRAME,$0-0
    #ifndef GOOS_openbsd
    	MOVB	runtime·iscgo(SB), X31
    	BEQZ	X31, nocgo
    #endif
    	MOV	g, runtime·tls_g(SB)
    nocgo:
    	RET
    
    TEXT runtime·load_g(SB),NOSPLIT|NOFRAME,$0-0
    	MOV	runtime·tls_g(SB), g
    	RET
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 04 02:55:17 UTC 2023
    - 615 bytes
    - Viewed (0)
  3. src/runtime/tls_arm64.s

    #ifndef GOOS_darwin
    #ifndef GOOS_openbsd
    #ifndef GOOS_windows
    	MOVB	runtime·iscgo(SB), R0
    	CBZ	R0, nocgo
    #endif
    #endif
    #endif
    
    	MRS_TPIDR_R0
    #ifdef TLS_darwin
    	// Darwin sometimes returns unaligned pointers
    	AND	$0xfffffffffffffff8, R0
    #endif
    	MOVD	runtime·tls_g(SB), R27
    	MOVD	(R0)(R27), g
    
    nocgo:
    	RET
    
    TEXT runtime·save_g(SB),NOSPLIT,$0
    #ifndef GOOS_darwin
    #ifndef GOOS_openbsd
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 19 00:41:03 UTC 2021
    - 1.2K bytes
    - Viewed (0)
  4. src/runtime/rt0_linux_arm64.s

    	BL	(R4)
    
    	// Create a new thread to do the runtime initialization and return.
    	MOVD	_cgo_sys_thread_create(SB), R4
    	CBZ	R4, nocgo
    	MOVD	$_rt0_arm64_linux_lib_go(SB), R0
    	MOVD	$0, R1
    	SUB	$16, RSP		// reserve 16 bytes for sp-8 where fp may be saved.
    	BL	(R4)
    	ADD	$16, RSP
    	B	restore
    
    nocgo:
    	MOVD	$0x800000, R0                     // stacksize = 8192KB
    	MOVD	$_rt0_arm64_linux_lib_go(SB), R1
    	MOVD	R0, 8(RSP)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 30 01:28:43 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  5. src/runtime/rt0_freebsd_arm64.s

    	BL	(R4)
    
    	// Create a new thread to do the runtime initialization and return.
    	MOVD	_cgo_sys_thread_create(SB), R4
    	CBZ	R4, nocgo
    	MOVD	$_rt0_arm64_freebsd_lib_go(SB), R0
    	MOVD	$0, R1
    	SUB	$16, RSP	// reserve 16 bytes for sp-8 where fp may be saved.
    	BL	(R4)
    	ADD	$16, RSP
    	B	restore
    
    nocgo:
    	MOVD	$0x800000, R0                     // stacksize = 8192KB
    	MOVD	$_rt0_arm64_freebsd_lib_go(SB), R1
    	MOVD	R0, 8(RSP)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 30 01:28:43 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  6. src/runtime/tls_loong64.s

    #include "textflag.h"
    
    // If !iscgo, this is a no-op.
    //
    // NOTE: mcall() assumes this clobbers only R30 (REGTMP).
    TEXT runtime·save_g(SB),NOSPLIT|NOFRAME,$0-0
    	MOVB	runtime·iscgo(SB), R30
    	BEQ	R30, nocgo
    
    	MOVV	g, runtime·tls_g(SB)
    
    nocgo:
    	RET
    
    TEXT runtime·load_g(SB),NOSPLIT|NOFRAME,$0-0
    	MOVV	runtime·tls_g(SB), g
    	RET
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 17 20:18:25 UTC 2022
    - 589 bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/testnocgo/nocgo_test.go

    // Copyright 2014 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 nocgo
    
    import "testing"
    
    func TestNop(t *testing.T) {
    	i := NoCgo()
    	if i != 42 {
    		t.Errorf("got %d, want %d", i, 42)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 292 bytes
    - Viewed (0)
  8. src/runtime/tls_mips64x.s

    //
    // NOTE: mcall() assumes this clobbers only R23 (REGTMP).
    TEXT runtime·save_g(SB),NOSPLIT|NOFRAME,$0-0
    	MOVB	runtime·iscgo(SB), R23
    	BEQ	R23, nocgo
    
    	MOVV	R3, R23	// save R3
    	MOVV	g, runtime·tls_g(SB) // TLS relocation clobbers R3
    	MOVV	R23, R3	// restore R3
    
    nocgo:
    	RET
    
    TEXT runtime·load_g(SB),NOSPLIT|NOFRAME,$0-0
    	MOVV	runtime·tls_g(SB), g // TLS relocation clobbers R3
    	RET
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Nov 06 10:24:44 UTC 2021
    - 733 bytes
    - Viewed (0)
  9. src/runtime/tls_mipsx.s

    // NOTE: gogo assumes load_g only clobers g (R30) and REGTMP (R23)
    TEXT runtime·save_g(SB),NOSPLIT|NOFRAME,$0-0
    	MOVB	runtime·iscgo(SB), R23
    	BEQ	R23, nocgo
    
    	MOVW	R3, R23
    	MOVW	g, runtime·tls_g(SB) // TLS relocation clobbers R3
    	MOVW	R23, R3
    
    nocgo:
    	RET
    
    TEXT runtime·load_g(SB),NOSPLIT|NOFRAME,$0-0
    	MOVW	runtime·tls_g(SB), g // TLS relocation clobbers R3
    	RET
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 08 14:52:12 UTC 2023
    - 710 bytes
    - Viewed (0)
  10. src/runtime/rt0_linux_ppc64.s

    	XOR	R0, R0 // Note, newer kernels may not always set R0 to 0.
    	MOVD	$runtime·rt0_go(SB), R12
    	MOVD	R12, CTR
    	MOVBZ	runtime·iscgo(SB), R5
    	CMP	R5, $0
    	BEQ	nocgo
    	BR	(CTR)
    nocgo:
    	MOVD	0(R1), R3 // argc
    	ADD	$8, R1, R4 // argv
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 18 22:20:51 UTC 2023
    - 847 bytes
    - Viewed (0)
Back to top