1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
| TEXT runtime·rt0_go(SB),NOSPLIT|TOPFRAME,$0 MOVQ DI, AX MOVQ SI, BX SUBQ $(4*8+7), SP ANDQ $~15, SP MOVQ AX, 16(SP) MOVQ BX, 24(SP)
MOVQ $runtime·g0(SB), DI LEAQ (-64*1024+104)(SP), BX MOVQ BX, g_stackguard0(DI) MOVQ BX, g_stackguard1(DI) MOVQ BX, (g_stack+stack_lo)(DI) MOVQ SP, (g_stack+stack_hi)(DI)
MOVL $0, AX CPUID MOVL AX, SI CMPL AX, $0 JE nocpuinfo
CMPL BX, $0x756E6547 JNE notintel CMPL DX, $0x49656E69 JNE notintel CMPL CX, $0x6C65746E JNE notintel MOVB $1, runtime·isIntel(SB) MOVB $1, runtime·lfenceBeforeRdtsc(SB) notintel:
MOVL $1, AX CPUID MOVL AX, runtime·processorVersionInfo(SB)
nocpuinfo: MOVQ _cgo_init(SB), AX TESTQ AX, AX JZ needtls MOVQ $setg_gcc<>(SB), SI #ifdef GOOS_android MOVQ $runtime·tls_g(SB), DX MOVQ -16(TLS), CX #else MOVQ $0, DX MOVQ $0, CX #endif #ifdef GOOS_windows MOVQ CX, R9 MOVQ DX, R8 MOVQ SI, DX MOVQ DI, CX #endif CALL AX
MOVQ $runtime·g0(SB), CX MOVQ (g_stack+stack_lo)(CX), AX ADDQ $const__StackGuard, AX MOVQ AX, g_stackguard0(CX) MOVQ AX, g_stackguard1(CX)
#ifndef GOOS_windows JMP ok #endif needtls: #ifdef GOOS_plan9 JMP ok #endif #ifdef GOOS_solaris JMP ok #endif #ifdef GOOS_illumos JMP ok #endif #ifdef GOOS_darwin JMP ok #endif #ifdef GOOS_openbsd JMP ok #endif
LEAQ runtime·m0+m_tls(SB), DI CALL runtime·settls(SB)
get_tls(BX) MOVQ $0x123, g(BX) MOVQ runtime·m0+m_tls(SB), AX CMPQ AX, $0x123 JEQ 2(PC) CALL runtime·abort(SB) ok: get_tls(BX) LEAQ runtime·g0(SB), CX MOVQ CX, g(BX) LEAQ runtime·m0(SB), AX
MOVQ CX, m_g0(AX) MOVQ AX, g_m(CX)
CLD CALL runtime·check(SB)
MOVL 16(SP), AX MOVL AX, 0(SP) MOVQ 24(SP), AX MOVQ AX, 8(SP) CALL runtime·args(SB) CALL runtime·osinit(SB) CALL runtime·schedinit(SB)
MOVQ $runtime·mainPC(SB), AX PUSHQ AX PUSHQ $0 CALL runtime·newproc(SB) POPQ AX POPQ AX
CALL runtime·mstart(SB)
CALL runtime·abort(SB) RET
MOVQ $runtime·debugCallV2<ABIInternal>(SB), AX RET
|