...
Run Format

Text file src/runtime/sys_darwin_386.s

Documentation: runtime

     1	// Copyright 2009 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	// System calls and other sys.stuff for 386, Darwin
     6	// System calls are implemented in libSystem, this file contains
     7	// trampolines that convert from Go to C calling convention.
     8	
     9	#include "go_asm.h"
    10	#include "go_tls.h"
    11	#include "textflag.h"
    12	
    13	// Exit the entire program (like C exit)
    14	TEXT runtime·exit_trampoline(SB),NOSPLIT,$0
    15		PUSHL	BP
    16		MOVL	SP, BP
    17		SUBL	$8, SP   	// allocate space for callee args (must be 8 mod 16)
    18		MOVL	16(SP), CX	// arg ptr
    19		MOVL	0(CX), AX	// arg 1 exit status
    20		MOVL	AX, 0(SP)
    21		CALL	libc_exit(SB)
    22		MOVL	$0xf1, 0xf1  // crash
    23		MOVL	BP, SP
    24		POPL	BP
    25		RET
    26	
    27	TEXT runtime·open_trampoline(SB),NOSPLIT,$0
    28		PUSHL	BP
    29		MOVL	SP, BP
    30		SUBL	$24, SP
    31		MOVL	32(SP), CX
    32		MOVL	0(CX), AX		// arg 1 name
    33		MOVL	AX, 0(SP)
    34		MOVL	4(CX), AX		// arg 2 mode
    35		MOVL	AX, 4(SP)
    36		MOVL	8(CX), AX		// arg 3 perm
    37		MOVL	AX, 8(SP)
    38		CALL	libc_open(SB)
    39		MOVL	BP, SP
    40		POPL	BP
    41		RET
    42	
    43	TEXT runtime·close_trampoline(SB),NOSPLIT,$0
    44		PUSHL	BP
    45		MOVL	SP, BP
    46		SUBL	$8, SP
    47		MOVL	16(SP), CX
    48		MOVL	0(CX), AX		// arg 1 fd
    49		MOVL	AX, 0(SP)
    50		CALL	libc_close(SB)
    51		MOVL	BP, SP
    52		POPL	BP
    53		RET
    54	
    55	TEXT runtime·read_trampoline(SB),NOSPLIT,$0
    56		PUSHL	BP
    57		MOVL	SP, BP
    58		SUBL	$24, SP
    59		MOVL	32(SP), CX
    60		MOVL	0(CX), AX		// arg 1 fd
    61		MOVL	AX, 0(SP)
    62		MOVL	4(CX), AX		// arg 2 buf
    63		MOVL	AX, 4(SP)
    64		MOVL	8(CX), AX		// arg 3 count
    65		MOVL	AX, 8(SP)
    66		CALL	libc_read(SB)
    67		MOVL	BP, SP
    68		POPL	BP
    69		RET
    70	
    71	TEXT runtime·write_trampoline(SB),NOSPLIT,$0
    72		PUSHL	BP
    73		MOVL	SP, BP
    74		SUBL	$24, SP
    75		MOVL	32(SP), CX
    76		MOVL	0(CX), AX		// arg 1 fd
    77		MOVL	AX, 0(SP)
    78		MOVL	4(CX), AX		// arg 2 buf
    79		MOVL	AX, 4(SP)
    80		MOVL	8(CX), AX		// arg 3 count
    81		MOVL	AX, 8(SP)
    82		CALL	libc_write(SB)
    83		MOVL	BP, SP
    84		POPL	BP
    85		RET
    86	
    87	TEXT runtime·mmap_trampoline(SB),NOSPLIT,$0
    88		PUSHL	BP
    89		MOVL	SP, BP
    90		SUBL	$24, SP
    91		MOVL	32(SP), CX
    92		MOVL	0(CX), AX		// arg 1 addr
    93		MOVL	AX, 0(SP)
    94		MOVL	4(CX), AX		// arg 2 len
    95		MOVL	AX, 4(SP)
    96		MOVL	8(CX), AX		// arg 3 prot
    97		MOVL	AX, 8(SP)
    98		MOVL	12(CX), AX		// arg 4 flags
    99		MOVL	AX, 12(SP)
   100		MOVL	16(CX), AX		// arg 5 fid
   101		MOVL	AX, 16(SP)
   102		MOVL	20(CX), AX		// arg 6 offset
   103		MOVL	AX, 20(SP)
   104		CALL	libc_mmap(SB)
   105		XORL	DX, DX
   106		CMPL	AX, $-1
   107		JNE	ok
   108		CALL	libc_error(SB)
   109		MOVL	(AX), DX		// errno
   110		XORL	AX, AX
   111	ok:
   112		MOVL	32(SP), CX
   113		MOVL	AX, 24(CX)		// result pointer
   114		MOVL	DX, 28(CX)		// errno
   115		MOVL	BP, SP
   116		POPL	BP
   117		RET
   118	
   119	TEXT runtime·madvise_trampoline(SB),NOSPLIT,$0
   120		PUSHL	BP
   121		MOVL	SP, BP
   122		SUBL	$24, SP
   123		MOVL	32(SP), CX
   124		MOVL	0(CX), AX		// arg 1 addr
   125		MOVL	AX, 0(SP)
   126		MOVL	4(CX), AX		// arg 2 len
   127		MOVL	AX, 4(SP)
   128		MOVL	8(CX), AX		// arg 3 advice
   129		MOVL	AX, 8(SP)
   130		CALL	libc_madvise(SB)
   131		// ignore failure - maybe pages are locked
   132		MOVL	BP, SP
   133		POPL	BP
   134		RET
   135	
   136	TEXT runtime·munmap_trampoline(SB),NOSPLIT,$0
   137		PUSHL	BP
   138		MOVL	SP, BP
   139		SUBL	$8, SP
   140		MOVL	16(SP), CX
   141		MOVL	0(CX), AX		// arg 1 addr
   142		MOVL	AX, 0(SP)
   143		MOVL	4(CX), AX		// arg 2 len
   144		MOVL	AX, 4(SP)
   145		CALL	libc_munmap(SB)
   146		TESTL	AX, AX
   147		JEQ	2(PC)
   148		MOVL	$0xf1, 0xf1  // crash
   149		MOVL	BP, SP
   150		POPL	BP
   151		RET
   152	
   153	TEXT runtime·setitimer_trampoline(SB),NOSPLIT,$0
   154		PUSHL	BP
   155		MOVL	SP, BP
   156		SUBL	$24, SP
   157		MOVL	32(SP), CX
   158		MOVL	0(CX), AX		// arg 1 mode
   159		MOVL	AX, 0(SP)
   160		MOVL	4(CX), AX		// arg 2 new
   161		MOVL	AX, 4(SP)
   162		MOVL	8(CX), AX		// arg 3 old
   163		MOVL	AX, 8(SP)
   164		CALL	libc_setitimer(SB)
   165		MOVL	BP, SP
   166		POPL	BP
   167		RET
   168	
   169	TEXT runtime·walltime_trampoline(SB),NOSPLIT,$0
   170		PUSHL	BP
   171		MOVL	SP, BP
   172		SUBL	$8, SP
   173		MOVL	16(SP), AX
   174		MOVL	AX, 0(SP)	// *timeval
   175		MOVL	$0, 4(SP)	// no timezone needed
   176		CALL	libc_gettimeofday(SB)
   177		MOVL	BP, SP
   178		POPL	BP
   179		RET
   180	
   181	GLOBL timebase<>(SB),NOPTR,$(machTimebaseInfo__size)
   182	
   183	TEXT runtime·nanotime_trampoline(SB),NOSPLIT,$0
   184		PUSHL	BP
   185		MOVL	SP, BP
   186		SUBL	$8+(machTimebaseInfo__size+15)/16*16, SP
   187		CALL	libc_mach_absolute_time(SB)
   188		MOVL	16+(machTimebaseInfo__size+15)/16*16(SP), CX
   189		MOVL	AX, 0(CX)
   190		MOVL	DX, 4(CX)
   191		MOVL	timebase<>+machTimebaseInfo_denom(SB), DI // atomic read
   192		MOVL	timebase<>+machTimebaseInfo_numer(SB), SI
   193		TESTL	DI, DI
   194		JNE	initialized
   195	
   196		LEAL	4(SP), AX
   197		MOVL	AX, 0(SP)
   198		CALL	libc_mach_timebase_info(SB)
   199		MOVL	4+machTimebaseInfo_numer(SP), SI
   200		MOVL	4+machTimebaseInfo_denom(SP), DI
   201	
   202		MOVL	SI, timebase<>+machTimebaseInfo_numer(SB)
   203		MOVL	DI, AX
   204		XCHGL	AX, timebase<>+machTimebaseInfo_denom(SB) // atomic write
   205		MOVL	16+(machTimebaseInfo__size+15)/16*16(SP), CX
   206	
   207	initialized:
   208		MOVL	SI, 8(CX)
   209		MOVL	DI, 12(CX)
   210		MOVL	BP, SP
   211		POPL	BP
   212		RET
   213	
   214	TEXT runtime·sigaction_trampoline(SB),NOSPLIT,$0
   215		PUSHL	BP
   216		MOVL	SP, BP
   217		SUBL	$24, SP
   218		MOVL	32(SP), CX
   219		MOVL	0(CX), AX		// arg 1 sig
   220		MOVL	AX, 0(SP)
   221		MOVL	4(CX), AX		// arg 2 new
   222		MOVL	AX, 4(SP)
   223		MOVL	8(CX), AX		// arg 3 old
   224		MOVL	AX, 8(SP)
   225		CALL	libc_sigaction(SB)
   226		TESTL	AX, AX
   227		JEQ	2(PC)
   228		MOVL	$0xf1, 0xf1  // crash
   229		MOVL	BP, SP
   230		POPL	BP
   231		RET
   232	
   233	TEXT runtime·sigprocmask_trampoline(SB),NOSPLIT,$0
   234		PUSHL	BP
   235		MOVL	SP, BP
   236		SUBL	$24, SP
   237		MOVL	32(SP), CX
   238		MOVL	0(CX), AX		// arg 1 how
   239		MOVL	AX, 0(SP)
   240		MOVL	4(CX), AX		// arg 2 new
   241		MOVL	AX, 4(SP)
   242		MOVL	8(CX), AX		// arg 3 old
   243		MOVL	AX, 8(SP)
   244		CALL	libc_pthread_sigmask(SB)
   245		TESTL	AX, AX
   246		JEQ	2(PC)
   247		MOVL	$0xf1, 0xf1  // crash
   248		MOVL	BP, SP
   249		POPL	BP
   250		RET
   251	
   252	TEXT runtime·sigaltstack_trampoline(SB),NOSPLIT,$0
   253		PUSHL	BP
   254		MOVL	SP, BP
   255		SUBL	$8, SP
   256		MOVL	16(SP), CX
   257		MOVL	0(CX), AX		// arg 1 new
   258		MOVL	AX, 0(SP)
   259		MOVL	4(CX), AX		// arg 2 old
   260		MOVL	AX, 4(SP)
   261		CALL	libc_sigaltstack(SB)
   262		TESTL	AX, AX
   263		JEQ	2(PC)
   264		MOVL	$0xf1, 0xf1  // crash
   265		MOVL	BP, SP
   266		POPL	BP
   267		RET
   268	
   269	TEXT runtime·raiseproc_trampoline(SB),NOSPLIT,$0
   270		PUSHL	BP
   271		MOVL	SP, BP
   272		SUBL	$8, SP
   273		CALL	libc_getpid(SB)
   274		MOVL	AX, 0(SP)	// arg 1 pid
   275		MOVL	16(SP), CX
   276		MOVL	0(CX), AX
   277		MOVL	AX, 4(SP)	// arg 2 signal
   278		CALL	libc_kill(SB)
   279		MOVL	BP, SP
   280		POPL	BP
   281		RET
   282	
   283	TEXT runtime·sigfwd(SB),NOSPLIT,$0-16
   284		MOVL	fn+0(FP), AX
   285		MOVL	sig+4(FP), BX
   286		MOVL	info+8(FP), CX
   287		MOVL	ctx+12(FP), DX
   288		MOVL	SP, SI
   289		SUBL	$32, SP
   290		ANDL	$~15, SP	// align stack: handler might be a C function
   291		MOVL	BX, 0(SP)
   292		MOVL	CX, 4(SP)
   293		MOVL	DX, 8(SP)
   294		MOVL	SI, 12(SP)	// save SI: handler might be a Go function
   295		CALL	AX
   296		MOVL	12(SP), AX
   297		MOVL	AX, SP
   298		RET
   299	
   300	// Sigtramp's job is to call the actual signal handler.
   301	// It is called with the C calling convention, and calls out
   302	// to sigtrampgo with the Go calling convention.
   303	TEXT runtime·sigtramp(SB),NOSPLIT,$0
   304		SUBL	$28, SP
   305	
   306		// Save callee-save registers.
   307		MOVL	BP, 12(SP)
   308		MOVL	BX, 16(SP)
   309		MOVL	SI, 20(SP)
   310		MOVL	DI, 24(SP)
   311	
   312		MOVL	32(SP), AX
   313		MOVL	AX, 0(SP)	// arg 1 signal number
   314		MOVL	36(SP), AX
   315		MOVL	AX, 4(SP)	// arg 2 siginfo
   316		MOVL	40(SP), AX
   317		MOVL	AX, 8(SP)	// arg 3 ctxt
   318		CALL	runtime·sigtrampgo(SB)
   319	
   320		// Restore callee-save registers.
   321		MOVL	12(SP), BP
   322		MOVL	16(SP), BX
   323		MOVL	20(SP), SI
   324		MOVL	24(SP), DI
   325	
   326		ADDL	$28, SP
   327		RET
   328	
   329	TEXT runtime·cgoSigtramp(SB),NOSPLIT,$0
   330		JMP	runtime·sigtramp(SB)
   331	
   332	TEXT runtime·usleep_trampoline(SB),NOSPLIT,$0
   333		PUSHL	BP
   334		MOVL	SP, BP
   335		SUBL	$8, SP
   336		MOVL	16(SP), CX
   337		MOVL	0(CX), AX	// arg 1 usec
   338		MOVL	AX, 0(SP)
   339		CALL	libc_usleep(SB)
   340		MOVL	BP, SP
   341		POPL	BP
   342		RET
   343	
   344	// func setldt(entry int, address int, limit int)
   345	TEXT runtime·setldt(SB),NOSPLIT,$32
   346		// Nothing to do on Darwin, pthread already set thread-local storage up.
   347		RET
   348	
   349	TEXT runtime·sysctl_trampoline(SB),NOSPLIT,$0
   350		PUSHL	BP
   351		MOVL	SP, BP
   352		SUBL	$24, SP
   353		MOVL	32(SP), CX
   354		MOVL	0(CX), AX		// arg 1 mib
   355		MOVL	AX, 0(SP)
   356		MOVL	4(CX), AX		// arg 2 miblen
   357		MOVL	AX, 4(SP)
   358		MOVL	8(CX), AX		// arg 3 out
   359		MOVL	AX, 8(SP)
   360		MOVL	12(CX), AX		// arg 4 size
   361		MOVL	AX, 12(SP)
   362		MOVL	16(CX), AX		// arg 5 dst
   363		MOVL	AX, 16(SP)
   364		MOVL	20(CX), AX		// arg 6 ndst
   365		MOVL	AX, 20(SP)
   366		CALL	libc_sysctl(SB)
   367		MOVL	BP, SP
   368		POPL	BP
   369		RET
   370	
   371	TEXT runtime·kqueue_trampoline(SB),NOSPLIT,$0
   372		PUSHL	BP
   373		MOVL	SP, BP
   374		SUBL	$8, SP
   375		CALL	libc_kqueue(SB)
   376		MOVL	BP, SP
   377		POPL	BP
   378		RET
   379	
   380	TEXT runtime·kevent_trampoline(SB),NOSPLIT,$0
   381		PUSHL	BP
   382		MOVL	SP, BP
   383		SUBL	$24, SP
   384		MOVL	32(SP), CX
   385		MOVL	0(CX), AX		// arg 1 kq
   386		MOVL	AX, 0(SP)
   387		MOVL	4(CX), AX		// arg 2 ch
   388		MOVL	AX, 4(SP)
   389		MOVL	8(CX), AX		// arg 3 nch
   390		MOVL	AX, 8(SP)
   391		MOVL	12(CX), AX		// arg 4 ev
   392		MOVL	AX, 12(SP)
   393		MOVL	16(CX), AX		// arg 5 nev
   394		MOVL	AX, 16(SP)
   395		MOVL	20(CX), AX		// arg 6 ts
   396		MOVL	AX, 20(SP)
   397		CALL	libc_kevent(SB)
   398		CMPL	AX, $-1
   399		JNE	ok
   400		CALL	libc_error(SB)
   401		MOVL	(AX), AX		// errno
   402		NEGL	AX			// caller wants it as a negative error code
   403	ok:
   404		MOVL	BP, SP
   405		POPL	BP
   406		RET
   407	
   408	TEXT runtime·fcntl_trampoline(SB),NOSPLIT,$0
   409		PUSHL	BP
   410		MOVL	SP, BP
   411		SUBL	$24, SP
   412		MOVL	32(SP), CX
   413		MOVL	0(CX), AX		// arg 1 fd
   414		MOVL	AX, 0(SP)
   415		MOVL	4(CX), AX		// arg 2 cmd
   416		MOVL	AX, 4(SP)
   417		MOVL	8(CX), AX		// arg 3 arg
   418		MOVL	AX, 8(SP)
   419		CALL	libc_fcntl(SB)
   420		MOVL	BP, SP
   421		POPL	BP
   422		RET
   423	
   424	// mstart_stub is the first function executed on a new thread started by pthread_create.
   425	// It just does some low-level setup and then calls mstart.
   426	// Note: called with the C calling convention.
   427	TEXT runtime·mstart_stub(SB),NOSPLIT,$0
   428		// The value at SP+4 points to the m.
   429		// We are already on m's g0 stack.
   430	
   431		// Save callee-save registers.
   432		SUBL	$16, SP
   433		MOVL	BP, 0(SP)
   434		MOVL	BX, 4(SP)
   435		MOVL	SI, 8(SP)
   436		MOVL	DI, 12(SP)
   437	
   438		MOVL	SP, AX       // hide argument read from vet (vet thinks this function is using the Go calling convention)
   439		MOVL	20(AX), DI   // m
   440		MOVL	m_g0(DI), DX // g
   441	
   442		// Initialize TLS entry.
   443		// See cmd/link/internal/ld/sym.go:computeTLSOffset.
   444		MOVL	DX, 0x18(GS)
   445	
   446		// Someday the convention will be D is always cleared.
   447		CLD
   448	
   449		CALL	runtime·mstart(SB)
   450	
   451		// Restore callee-save registers.
   452		MOVL	0(SP), BP
   453		MOVL	4(SP), BX
   454		MOVL	8(SP), SI
   455		MOVL	12(SP), DI
   456	
   457		// Go is all done with this OS thread.
   458		// Tell pthread everything is ok (we never join with this thread, so
   459		// the value here doesn't really matter).
   460		XORL	AX, AX
   461	
   462		ADDL	$16, SP
   463		RET
   464	
   465	TEXT runtime·pthread_attr_init_trampoline(SB),NOSPLIT,$0
   466		PUSHL	BP
   467		MOVL	SP, BP
   468		SUBL	$8, SP
   469		MOVL	16(SP), CX
   470		MOVL	0(CX), AX	// arg 1 attr
   471		MOVL	AX, 0(SP)
   472		CALL	libc_pthread_attr_init(SB)
   473		MOVL	BP, SP
   474		POPL	BP
   475		RET
   476	
   477	TEXT runtime·pthread_attr_setstacksize_trampoline(SB),NOSPLIT,$0
   478		PUSHL	BP
   479		MOVL	SP, BP
   480		SUBL	$8, SP
   481		MOVL	16(SP), CX
   482		MOVL	0(CX), AX	// arg 1 attr
   483		MOVL	AX, 0(SP)
   484		MOVL	4(CX), AX	// arg 2 size
   485		MOVL	AX, 4(SP)
   486		CALL	libc_pthread_attr_setstacksize(SB)
   487		MOVL	BP, SP
   488		POPL	BP
   489		RET
   490	
   491	TEXT runtime·pthread_attr_setdetachstate_trampoline(SB),NOSPLIT,$0
   492		PUSHL	BP
   493		MOVL	SP, BP
   494		SUBL	$8, SP
   495		MOVL	16(SP), CX
   496		MOVL	0(CX), AX	// arg 1 attr
   497		MOVL	AX, 0(SP)
   498		MOVL	4(CX), AX	// arg 2 state
   499		MOVL	AX, 4(SP)
   500		CALL	libc_pthread_attr_setdetachstate(SB)
   501		MOVL	BP, SP
   502		POPL	BP
   503		RET
   504	
   505	TEXT runtime·pthread_create_trampoline(SB),NOSPLIT,$0
   506		PUSHL	BP
   507		MOVL	SP, BP
   508		SUBL	$24, SP
   509		MOVL	32(SP), CX
   510		LEAL	16(SP), AX	// arg "0" &threadid (which we throw away)
   511		MOVL	AX, 0(SP)
   512		MOVL	0(CX), AX	// arg 1 attr
   513		MOVL	AX, 4(SP)
   514		MOVL	4(CX), AX	// arg 2 start
   515		MOVL	AX, 8(SP)
   516		MOVL	8(CX), AX	// arg 3 arg
   517		MOVL	AX, 12(SP)
   518		CALL	libc_pthread_create(SB)
   519		MOVL	BP, SP
   520		POPL	BP
   521		RET
   522	
   523	TEXT runtime·raise_trampoline(SB),NOSPLIT,$0
   524		PUSHL   BP
   525		MOVL    SP, BP
   526		SUBL	$8, SP
   527		MOVL	16(SP), CX
   528		MOVL    0(CX), AX	// arg 1 sig
   529		MOVL	AX, 0(SP)
   530		CALL    libc_raise(SB)
   531		MOVL    BP, SP
   532		POPL    BP
   533		RET
   534	
   535	TEXT runtime·pthread_mutex_init_trampoline(SB),NOSPLIT,$0
   536		PUSHL	BP
   537		MOVL	SP, BP
   538		SUBL	$8, SP
   539		MOVL	16(SP), CX
   540		MOVL	0(CX), AX	// arg 1 mutex
   541		MOVL	AX, 0(SP)
   542		MOVL	4(CX), AX	// arg 2 attr
   543		MOVL	AX, 4(SP)
   544		CALL	libc_pthread_mutex_init(SB)
   545		MOVL	BP, SP
   546		POPL	BP
   547		RET
   548	
   549	TEXT runtime·pthread_mutex_lock_trampoline(SB),NOSPLIT,$0
   550		PUSHL	BP
   551		MOVL	SP, BP
   552		SUBL	$8, SP
   553		MOVL	16(SP), CX
   554		MOVL	0(CX), AX	// arg 1 mutex
   555		MOVL	AX, 0(SP)
   556		CALL	libc_pthread_mutex_lock(SB)
   557		MOVL	BP, SP
   558		POPL	BP
   559		RET
   560	
   561	TEXT runtime·pthread_mutex_unlock_trampoline(SB),NOSPLIT,$0
   562		PUSHL	BP
   563		MOVL	SP, BP
   564		SUBL	$8, SP
   565		MOVL	16(SP), CX
   566		MOVL	0(CX), AX	// arg 1 mutex
   567		MOVL	AX, 0(SP)
   568		CALL	libc_pthread_mutex_unlock(SB)
   569		MOVL	BP, SP
   570		POPL	BP
   571		RET
   572	
   573	TEXT runtime·pthread_cond_init_trampoline(SB),NOSPLIT,$0
   574		PUSHL	BP
   575		MOVL	SP, BP
   576		SUBL	$8, SP
   577		MOVL	16(SP), CX
   578		MOVL	0(CX), AX	// arg 1 cond
   579		MOVL	AX, 0(SP)
   580		MOVL	4(CX), AX	// arg 2 attr
   581		MOVL	AX, 4(SP)
   582		CALL	libc_pthread_cond_init(SB)
   583		MOVL	BP, SP
   584		POPL	BP
   585		RET
   586	
   587	TEXT runtime·pthread_cond_wait_trampoline(SB),NOSPLIT,$0
   588		PUSHL	BP
   589		MOVL	SP, BP
   590		SUBL	$8, SP
   591		MOVL	16(SP), CX
   592		MOVL	0(CX), AX	// arg 1 cond
   593		MOVL	AX, 0(SP)
   594		MOVL	4(CX), AX	// arg 2 mutex
   595		MOVL	AX, 4(SP)
   596		CALL	libc_pthread_cond_wait(SB)
   597		MOVL	BP, SP
   598		POPL	BP
   599		RET
   600	
   601	TEXT runtime·pthread_cond_timedwait_relative_np_trampoline(SB),NOSPLIT,$0
   602		PUSHL	BP
   603		MOVL	SP, BP
   604		SUBL	$24, SP
   605		MOVL	32(SP), CX
   606		MOVL	0(CX), AX	// arg 1 cond
   607		MOVL	AX, 0(SP)
   608		MOVL	4(CX), AX	// arg 2 mutex
   609		MOVL	AX, 4(SP)
   610		MOVL	8(CX), AX	// arg 3 timeout
   611		MOVL	AX, 8(SP)
   612		CALL	libc_pthread_cond_timedwait_relative_np(SB)
   613		MOVL	BP, SP
   614		POPL	BP
   615		RET
   616	
   617	TEXT runtime·pthread_cond_signal_trampoline(SB),NOSPLIT,$0
   618		PUSHL	BP
   619		MOVL	SP, BP
   620		SUBL	$8, SP
   621		MOVL	16(SP), CX
   622		MOVL	0(CX), AX	// arg 1 cond
   623		MOVL	AX, 0(SP)
   624		CALL	libc_pthread_cond_signal(SB)
   625		MOVL	BP, SP
   626		POPL	BP
   627		RET

View as plain text