github.com/bytedance/sonic@v1.11.7-0.20240517092252-d2edb31b167b/internal/rt/asm_amd64.s (about)

     1  // +build !noasm,amd64 !appengine,amd64
     2  
     3  #include "go_asm.h"
     4  #include "funcdata.h"
     5  #include "textflag.h"
     6  
     7  TEXT ·MoreStack(SB), NOSPLIT, $0 - 8
     8      NO_LOCAL_POINTERS
     9  _entry:
    10      MOVQ (TLS), R14
    11      MOVQ size+0(FP), R12
    12      NOTQ R12
    13      LEAQ (SP)(R12*1), R12
    14      CMPQ R12, 16(R14)
    15      JBE  _stack_grow
    16      RET
    17  _stack_grow:
    18      CALL runtime·morestack_noctxt<>(SB)
    19      JMP  _entry
    20  
    21  
    22  TEXT ·StopProf(SB), NOSPLIT, $0-0
    23      NO_LOCAL_POINTERS
    24      CMPB github·com∕bytedance∕sonic∕internal∕rt·StopProfiling(SB), $0
    25      JEQ  _ret_1
    26      MOVL $1, AX
    27      LEAQ github·com∕bytedance∕sonic∕internal∕rt·yieldCount(SB), CX
    28      LOCK
    29      XADDL AX, (CX)
    30      MOVL runtime·prof+4(SB), AX
    31      TESTL AX, AX
    32      JEQ _ret_1
    33      MOVL AX, github·com∕bytedance∕sonic∕internal∕rt·oldHz(SB)
    34      MOVL $0, runtime·prof+4(SB)
    35  _ret_1:
    36      RET
    37  
    38  
    39  TEXT ·StartProf(SB), NOSPLIT, $0-0
    40      NO_LOCAL_POINTERS
    41      CMPB github·com∕bytedance∕sonic∕internal∕rt·StopProfiling(SB), $0
    42      JEQ  _ret_2
    43      MOVL $-1, AX
    44      LEAQ github·com∕bytedance∕sonic∕internal∕rt·yieldCount(SB), CX
    45      LOCK
    46      XADDL AX, (CX)
    47      CMPL github·com∕bytedance∕sonic∕internal∕rt·yieldCount(SB), $0
    48      JNE _ret_2
    49      CMPL runtime·prof+4(SB), $0
    50      JNE _ret_2
    51      CMPL github·com∕bytedance∕sonic∕internal∕rt·oldHz(SB), $0
    52      JNE _branch_1
    53      MOVL $100, github·com∕bytedance∕sonic∕internal∕rt·oldHz(SB)
    54  _branch_1:
    55      MOVL github·com∕bytedance∕sonic∕internal∕rt·oldHz(SB), AX
    56      MOVL AX, runtime·prof+4(SB)
    57  _ret_2:
    58      RET
    59