| // Copyright 2009 The Go Authors. All rights reserved. | | // Copyright 2009 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style | | // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. | | // license that can be found in the LICENSE file. |
| | | |
| #include "zasm_GOOS_GOARCH.h" | | #include "zasm_GOOS_GOARCH.h" |
| #include "funcdata.h" | | #include "funcdata.h" |
| #include "textflag.h" | | #include "textflag.h" |
| | | |
| 9 | TEXT runtime·rt0_go(SB),NOSPLIT,$0 | | 9 | TEXT runtime·rt0_go(SB), NOSPLIT, $0 |
| // copy arguments forward on an even stack | | // copy arguments forward on an even stack |
| 11 | MOVQ DI, AX // argc | | 11 | MOVQ DI, AX // argc |
| 12 | MOVQ SI, BX // argv | | 12 | MOVQ SI, BX // argv |
| 13 | SUBQ $(4*8+7), SP // 2args 2auto | | 13 | SUBQ $(4*8+7), SP // 2args 2auto |
| 14 | ANDQ $~15, SP | | 14 | ANDQ $~15, SP |
| 15 | MOVQ AX, 16(SP) | | 15 | MOVQ AX, 16(SP) |
| 16 | MOVQ BX, 24(SP) | | 16 | MOVQ BX, 24(SP) |
| 17 |
| | 17 |
|
| // create istack out of the given (operating system) stack. | | // create istack out of the given (operating system) stack. |
| // _cgo_init may update stackguard. | | // _cgo_init may update stackguard. |
| 20 | MOVQ $runtime·g0(SB), DI | | 20 | MOVQ $runtime·g0(SB), DI |
| 21 | LEAQ (-64*1024+104)(SP), BX | | 21 | LEAQ (-64*1024+104)(SP), BX |
| 22 | MOVQ BX, g_stackguard0(DI) | | 22 | MOVQ BX, g_stackguard0(DI) |
| 23 | MOVQ BX, g_stackguard1(DI) | | 23 | MOVQ BX, g_stackguard1(DI) |
| 24 | MOVQ BX, (g_stack+stack_lo)(DI) | | 24 | MOVQ BX, (g_stack+stack_lo)(DI) |
| 25 | MOVQ SP, (g_stack+stack_hi)(DI) | | 25 | MOVQ SP, (g_stack+stack_hi)(DI) |
| | | |
| // find out information about the processor we're on | | // find out information about the processor we're on |
| 28 | MOVQ $0, AX | | 28 | MOVQ $0, AX |
| CPUID | | CPUID |
| 30 | CMPQ AX, $0 | | 30 | CMPQ AX, $0 |
| 31 | JE nocpuinfo | | 31 | JE nocpuinfo |
| 32 | MOVQ $1, AX | | 32 | MOVQ $1, AX |
| CPUID | | CPUID |
| 34 | MOVL CX, runtime·cpuid_ecx(SB) | | 34 | MOVL CX, runtime·cpuid_ecx(SB) |
| 35 | MOVL DX, runtime·cpuid_edx(SB) | | 35 | MOVL DX, runtime·cpuid_edx(SB) |
| | | | 36 |
|
| 36 | nocpuinfo: | | 37 | nocpuinfo: |
| 37 |
| | 38 |
|
| // if there is an _cgo_init, call it. | | // if there is an _cgo_init, call it. |
| 39 | MOVQ _cgo_init(SB), AX | | 40 | MOVQ _cgo_init(SB), AX |
| 40 | TESTQ AX, AX | | 41 | TESTQ AX, AX |
| 41 | JZ needtls | | 42 | JZ needtls |
| | | | 43 |
|
| // g0 already in DI | | // g0 already in DI |
| 43 | MOVQ DI, CX // Win64 uses CX for first parameter | | 45 | MOVQ DI, CX // Win64 uses CX for first parameter |
| 44 | MOVQ $setg_gcc<>(SB), SI | | 46 | MOVQ $setg_gcc<>(SB), SI |
| 45 | CALL AX | | 47 | CALL AX |
| | | |
| // update stackguard after _cgo_init | | // update stackguard after _cgo_init |
| 48 | MOVQ $runtime·g0(SB), CX | | 50 | MOVQ $runtime·g0(SB), CX |
| 49 | MOVQ (g_stack+stack_lo)(CX), AX | | 51 | MOVQ (g_stack+stack_lo)(CX), AX |
| 50 | ADDQ $const_StackGuard, AX | | 52 | ADDQ $const_StackGuard, AX |
| 51 | MOVQ AX, g_stackguard0(CX) | | 53 | MOVQ AX, g_stackguard0(CX) |
| 52 | MOVQ AX, g_stackguard1(CX) | | 54 | MOVQ AX, g_stackguard1(CX) |
| | | |
| 54 | CMPL runtime·iswindows(SB), $0 | | 56 | CMPL runtime·iswindows(SB), $0 |
| 55 | JEQ ok | | 57 | JEQ ok |
| | | | 58 |
|
| needtls: | | needtls: |
| // skip TLS setup on Plan 9 | | // skip TLS setup on Plan 9 |
| 58 | CMPL runtime·isplan9(SB), $1 | | 61 | CMPL runtime·isplan9(SB), $1 |
| 59 | JEQ ok | | 62 | JEQ ok |
| | | | 63 |
|
| // skip TLS setup on Solaris | | // skip TLS setup on Solaris |
| 61 | CMPL runtime·issolaris(SB), $1 | | 65 | CMPL runtime·issolaris(SB), $1 |
| 62 | JEQ ok | | 66 | JEQ ok |
| | | |
| 64 | LEAQ runtime·tls0(SB), DI | | 68 | LEAQ runtime·tls0(SB), DI |
| 65 | CALL runtime·settls(SB) | | 69 | CALL runtime·settls(SB) |
| | | |
| // store through it, to make sure it works | | // store through it, to make sure it works |
| get_tls(BX) | | get_tls(BX) |
| 69 | MOVQ $0x123, g(BX) | | 73 | MOVQ $0x123, g(BX) |
| 70 | MOVQ runtime·tls0(SB), AX | | 74 | MOVQ runtime·tls0(SB), AX |
| 71 | CMPQ AX, $0x123 | | 75 | CMPQ AX, $0x123 |
| 72 | JEQ 2(PC) | | 76 | JEQ 2(PC) |
| 73 | MOVL AX, 0 // abort | | 77 | MOVL AX, 0 // abort |
| | | | 78 |
|
| ok: | | ok: |
| // set the per-goroutine and per-mach "registers" | | // set the per-goroutine and per-mach "registers" |
| get_tls(BX) | | get_tls(BX) |
| 77 | LEAQ runtime·g0(SB), CX | | 82 | LEAQ runtime·g0(SB), CX |
| 78 | MOVQ CX, g(BX) | | 83 | MOVQ CX, g(BX) |
| 79 | LEAQ runtime·m0(SB), AX | | 84 | LEAQ runtime·m0(SB), AX |
| | | |
| // save m->g0 = g0 | | // save m->g0 = g0 |
| 82 | MOVQ CX, m_g0(AX) | | 87 | MOVQ CX, m_g0(AX) |
| | | | 88 |
|
| // save m0 to g0->m | | // save m0 to g0->m |
| 84 | MOVQ AX, g_m(CX) | | 90 | MOVQ AX, g_m(CX) |
| | | |
| 86 | CLD // convention is D is always left cleared | | 92 | CLD // convention is D is always left cleared |
| 87 | CALL runtime·check(SB) | | 93 | CALL runtime·check(SB) |
| | | |
| 89 | MOVL 16(SP), AX // copy argc | | 95 | MOVL 16(SP), AX // copy argc |
| 90 | MOVL AX, 0(SP) | | 96 | MOVL AX, 0(SP) |
| 91 | MOVQ 24(SP), AX // copy argv | | 97 | MOVQ 24(SP), AX // copy argv |
| 92 | MOVQ AX, 8(SP) | | 98 | MOVQ AX, 8(SP) |
| 93 | CALL runtime·args(SB) | | 99 | CALL runtime·args(SB) |
| 94 | CALL runtime·osinit(SB) | | 100 | CALL runtime·osinit(SB) |
| 95 | CALL runtime·schedinit(SB) | | 101 | CALL runtime·schedinit(SB) |
| | | |
| // create a new goroutine to start program | | // create a new goroutine to start program |
| 98 | MOVQ $runtime·main·f(SB), BP // entry | | 104 | MOVQ $runtime·main·f(SB), BP // entry |
| 99 | PUSHQ BP | | 105 | PUSHQ BP |
| 100 | PUSHQ $0 // arg size | | 106 | PUSHQ $0 // arg size |
| 101 | CALL runtime·newproc(SB) | | 107 | CALL runtime·newproc(SB) |
| 102 | POPQ AX | | 108 | POPQ AX |
| 103 | POPQ AX | | 109 | POPQ AX |
| | | |
| // start this M | | // start this M |
| 106 | CALL runtime·mstart(SB) | | 112 | CALL runtime·mstart(SB) |
| | | |
| 108 | MOVL $0xf1, 0xf1 // crash | | 114 | MOVL $0xf1, 0xf1 // crash |
| RET | | RET |
| | | |
| 111 | DATA runtime·main·f+0(SB)/8,$runtime·main(SB) | | 117 | DATA runtime·main·f+0(SB)/8, $runtime·main(SB) |
| 112 | GLOBL runtime·main·f(SB),RODATA,$8 | | 118 | GLOBL runtime·main·f(SB), RODATA, $8 |
| | | |
| 114 | TEXT runtime·breakpoint(SB),NOSPLIT,$0-0 | | 120 | TEXT runtime·breakpoint(SB), NOSPLIT, $0-0 |
| 115 | BYTE $0xcc | | 121 | BYTE $0xcc |
| RET | | RET |
| | | |
| 118 | TEXT runtime·asminit(SB),NOSPLIT,$0-0 | | 124 | TEXT runtime·asminit(SB), NOSPLIT, $0-0 |
| // No per-thread init. | | // No per-thread init. |
| RET | | RET |
| | | |
| /* | | /* |
| * go-routine | | * go-routine |
| */ | | */ |
| 125 |
| | | |
| // void gosave(Gobuf*) | | // void gosave(Gobuf*) |
| // save state in Gobuf; setjmp | | // save state in Gobuf; setjmp |
| TEXT runtime·gosave(SB), NOSPLIT, $0-8 | | TEXT runtime·gosave(SB), NOSPLIT, $0-8 |
| 129 | MOVQ buf+0(FP), AX // gobuf | | 134 | MOVQ buf+0(FP), AX // gobuf |
| 130 | LEAQ buf+0(FP), BX // caller's SP | | 135 | LEAQ buf+0(FP), BX // caller's SP |
| 131 | MOVQ BX, gobuf_sp(AX) | | 136 | MOVQ BX, gobuf_sp(AX) |
| 132 | MOVQ 0(SP), BX // caller's PC | | 137 | MOVQ 0(SP), BX // caller's PC |
| 133 | MOVQ BX, gobuf_pc(AX) | | 138 | MOVQ BX, gobuf_pc(AX) |
| 134 | MOVQ $0, gobuf_ret(AX) | | 139 | MOVQ $0, gobuf_ret(AX) |
| 135 | MOVQ $0, gobuf_ctxt(AX) | | 140 | MOVQ $0, gobuf_ctxt(AX) |
| get_tls(CX) | | get_tls(CX) |
| 137 | MOVQ g(CX), BX | | 142 | MOVQ g(CX), BX |
| 138 | MOVQ BX, gobuf_g(AX) | | 143 | MOVQ BX, gobuf_g(AX) |
| RET | | RET |
| | | |
| // void gogo(Gobuf*) | | // void gogo(Gobuf*) |
| // restore state from Gobuf; longjmp | | // restore state from Gobuf; longjmp |
| TEXT runtime·gogo(SB), NOSPLIT, $0-8 | | TEXT runtime·gogo(SB), NOSPLIT, $0-8 |
| 144 | MOVQ buf+0(FP), BX // gobuf | | 149 | MOVQ buf+0(FP), BX // gobuf |
| 145 | MOVQ gobuf_g(BX), DX | | 150 | MOVQ gobuf_g(BX), DX |
| 146 | MOVQ 0(DX), CX // make sure g != nil | | 151 | MOVQ 0(DX), CX // make sure g != nil |
| get_tls(CX) | | get_tls(CX) |
| 148 | MOVQ DX, g(CX) | | 153 | MOVQ DX, g(CX) |
| 149 | MOVQ gobuf_sp(BX), SP // restore SP | | 154 | MOVQ gobuf_sp(BX), SP // restore SP |
| 150 | MOVQ gobuf_ret(BX), AX | | 155 | MOVQ gobuf_ret(BX), AX |
| 151 | MOVQ gobuf_ctxt(BX), DX | | 156 | MOVQ gobuf_ctxt(BX), DX |
| 152 | MOVQ $0, gobuf_sp(BX) // clear to help garbage collector | | 157 | MOVQ $0, gobuf_sp(BX) // clear to help garbage collector |
| 153 | MOVQ $0, gobuf_ret(BX) | | 158 | MOVQ $0, gobuf_ret(BX) |
| 154 | MOVQ $0, gobuf_ctxt(BX) | | 159 | MOVQ $0, gobuf_ctxt(BX) |
| 155 | MOVQ gobuf_pc(BX), BX | | 160 | MOVQ gobuf_pc(BX), BX |
| 156 | JMP BX | | 161 | JMP BX |
| | | |
| // func mcall(fn func(*g)) | | // func mcall(fn func(*g)) |
| // Switch to m->g0's stack, call fn(g). | | // Switch to m->g0's stack, call fn(g). |
| // Fn must never return. It should gogo(&g->sched) | | // Fn must never return. It should gogo(&g->sched) |
| // to keep running g. | | // to keep running g. |
| TEXT runtime·mcall(SB), NOSPLIT, $0-8 | | TEXT runtime·mcall(SB), NOSPLIT, $0-8 |
| 163 | MOVQ fn+0(FP), DI | | 168 | MOVQ fn+0(FP), DI |
| 164 |
| | 169 |
|
| get_tls(CX) | | get_tls(CX) |
| 166 | MOVQ g(CX), AX // save state in g->sched | | 171 | MOVQ g(CX), AX // save state in g->sched |
| 167 | MOVQ 0(SP), BX // caller's PC | | 172 | MOVQ 0(SP), BX // caller's PC |
| 168 | MOVQ BX, (g_sched+gobuf_pc)(AX) | | 173 | MOVQ BX, (g_sched+gobuf_pc)(AX) |
| 169 | LEAQ fn+0(FP), BX // caller's SP | | 174 | LEAQ fn+0(FP), BX // caller's SP |
| 170 | MOVQ BX, (g_sched+gobuf_sp)(AX) | | 175 | MOVQ BX, (g_sched+gobuf_sp)(AX) |
| 171 | MOVQ AX, (g_sched+gobuf_g)(AX) | | 176 | MOVQ AX, (g_sched+gobuf_g)(AX) |
| | | |
| // switch to m->g0 & its stack, call fn | | // switch to m->g0 & its stack, call fn |
| 174 | MOVQ g(CX), BX | | 179 | MOVQ g(CX), BX |
| 175 | MOVQ g_m(BX), BX | | 180 | MOVQ g_m(BX), BX |
| 176 | MOVQ m_g0(BX), SI | | 181 | MOVQ m_g0(BX), SI |
| 177 | CMPQ SI, AX // if g == m->g0 call badmcall | | 182 | CMPQ SI, AX // if g == m->g0 call badmcall |
| 178 | JNE 3(PC) | | 183 | JNE 3(PC) |
| 179 | MOVQ $runtime·badmcall(SB), AX | | 184 | MOVQ $runtime·badmcall(SB), AX |
| 180 | JMP AX | | 185 | JMP AX |
| 181 | MOVQ SI, g(CX) // g = m->g0 | | 186 | MOVQ SI, g(CX) // g = m->g0 |
| 182 | MOVQ (g_sched+gobuf_sp)(SI), SP // sp = m->g0->sched.sp | | 187 | MOVQ (g_sched+gobuf_sp)(SI), SP // sp = m->g0->sched.sp |
| 183 | PUSHQ AX | | 188 | PUSHQ AX |
| 184 | MOVQ DI, DX | | 189 | MOVQ DI, DX |
| 185 | MOVQ 0(DI), DI | | 190 | MOVQ 0(DI), DI |
| 186 | CALL DI | | 191 | CALL DI |
| 187 | POPQ AX | | 192 | POPQ AX |
| 188 | MOVQ $runtime·badmcall2(SB), AX | | 193 | MOVQ $runtime·badmcall2(SB), AX |
| 189 | JMP AX | | 194 | JMP AX |
| RET | | RET |
| | | |
| // switchtoM is a dummy routine that onM leaves at the bottom | | // switchtoM is a dummy routine that onM leaves at the bottom |
| // of the G stack. We need to distinguish the routine that | | // of the G stack. We need to distinguish the routine that |
| // lives at the bottom of the G stack from the one that lives | | // lives at the bottom of the G stack from the one that lives |
| // at the top of the M stack because the one at the top of | | // at the top of the M stack because the one at the top of |
| // the M stack terminates the stack walk (see topofstack()). | | // the M stack terminates the stack walk (see topofstack()). |
| TEXT runtime·switchtoM(SB), NOSPLIT, $0-0 | | TEXT runtime·switchtoM(SB), NOSPLIT, $0-0 |
| RET | | RET |
| | | |
| // func onM_signalok(fn func()) | | // func onM_signalok(fn func()) |
| TEXT runtime·onM_signalok(SB), NOSPLIT, $0-8 | | TEXT runtime·onM_signalok(SB), NOSPLIT, $0-8 |
| get_tls(CX) | | get_tls(CX) |
| 203 | MOVQ g(CX), AX // AX = g | | 208 | MOVQ g(CX), AX // AX = g |
| 204 | MOVQ g_m(AX), BX // BX = m | | 209 | MOVQ g_m(AX), BX // BX = m |
| 205 | MOVQ m_gsignal(BX), DX // DX = gsignal | | 210 | MOVQ m_gsignal(BX), DX // DX = gsignal |
| 206 | CMPQ AX, DX | | 211 | CMPQ AX, DX |
| 207 | JEQ ongsignal | | 212 | JEQ ongsignal |
| 208 | JMP runtime·onM(SB) | | 213 | JMP runtime·onM(SB) |
| | | |
| ongsignal: | | ongsignal: |
| 211 | MOVQ fn+0(FP), DI // DI = fn | | 216 | MOVQ fn+0(FP), DI // DI = fn |
| 212 | MOVQ DI, DX | | 217 | MOVQ DI, DX |
| 213 | MOVQ 0(DI), DI | | 218 | MOVQ 0(DI), DI |
| 214 | CALL DI | | 219 | CALL DI |
| RET | | RET |
| | | |
| // func onM(fn func()) | | // func onM(fn func()) |
| TEXT runtime·onM(SB), NOSPLIT, $0-8 | | TEXT runtime·onM(SB), NOSPLIT, $0-8 |
| 219 | MOVQ fn+0(FP), DI // DI = fn | | 224 | MOVQ fn+0(FP), DI // DI = fn |
| get_tls(CX) | | get_tls(CX) |
| 221 | MOVQ g(CX), AX // AX = g | | 226 | MOVQ g(CX), AX // AX = g |
| 222 | MOVQ g_m(AX), BX // BX = m | | 227 | MOVQ g_m(AX), BX // BX = m |
| | | |
| 224 | MOVQ m_g0(BX), DX // DX = g0 | | 229 | MOVQ m_g0(BX), DX // DX = g0 |
| 225 | CMPQ AX, DX | | 230 | CMPQ AX, DX |
| 226 | JEQ onm | | 231 | JEQ onm |
| | | |
| 228 | MOVQ m_curg(BX), BP | | 233 | MOVQ m_curg(BX), BP |
| 229 | CMPQ AX, BP | | 234 | CMPQ AX, BP |
| 230 | JEQ oncurg | | 235 | JEQ oncurg |
| 231 |
| | 236 |
|
| // Not g0, not curg. Must be gsignal, but that's not allowed. | | // Not g0, not curg. Must be gsignal, but that's not allowed. |
| // Hide call from linker nosplit analysis. | | // Hide call from linker nosplit analysis. |
| 234 | MOVQ $runtime·badonm(SB), AX | | 239 | MOVQ $runtime·badonm(SB), AX |
| 235 | CALL AX | | 240 | CALL AX |
| | | |
| oncurg: | | oncurg: |
| // save our state in g->sched. Pretend to | | // save our state in g->sched. Pretend to |
| // be switchtoM if the G stack is scanned. | | // be switchtoM if the G stack is scanned. |
| 240 | MOVQ $runtime·switchtoM(SB), BP | | 245 | MOVQ $runtime·switchtoM(SB), BP |
| 241 | MOVQ BP, (g_sched+gobuf_pc)(AX) | | 246 | MOVQ BP, (g_sched+gobuf_pc)(AX) |
| 242 | MOVQ SP, (g_sched+gobuf_sp)(AX) | | 247 | MOVQ SP, (g_sched+gobuf_sp)(AX) |
| 243 | MOVQ AX, (g_sched+gobuf_g)(AX) | | 248 | MOVQ AX, (g_sched+gobuf_g)(AX) |
| | | |
| // switch to g0 | | // switch to g0 |
| 246 | MOVQ DX, g(CX) | | 251 | MOVQ DX, g(CX) |
| 247 | MOVQ (g_sched+gobuf_sp)(DX), BX | | 252 | MOVQ (g_sched+gobuf_sp)(DX), BX |
| | | | 253 |
|
| // make it look like mstart called onM on g0, to stop traceback | | // make it look like mstart called onM on g0, to stop traceback |
| 249 | SUBQ $8, BX | | 255 | SUBQ $8, BX |
| 250 | MOVQ $runtime·mstart(SB), DX | | 256 | MOVQ $runtime·mstart(SB), DX |
| 251 | MOVQ DX, 0(BX) | | 257 | MOVQ DX, 0(BX) |
| 252 | MOVQ BX, SP | | 258 | MOVQ BX, SP |
| | | |
| // call target function | | // call target function |
| 255 | MOVQ DI, DX | | 261 | MOVQ DI, DX |
| 256 | MOVQ 0(DI), DI | | 262 | MOVQ 0(DI), DI |
| 257 | CALL DI | | 263 | CALL DI |
| | | |
| // switch back to g | | // switch back to g |
| get_tls(CX) | | get_tls(CX) |
| 261 | MOVQ g(CX), AX | | 267 | MOVQ g(CX), AX |
| 262 | MOVQ g_m(AX), BX | | 268 | MOVQ g_m(AX), BX |
| 263 | MOVQ m_curg(BX), AX | | 269 | MOVQ m_curg(BX), AX |
| 264 | MOVQ AX, g(CX) | | 270 | MOVQ AX, g(CX) |
| 265 | MOVQ (g_sched+gobuf_sp)(AX), SP | | 271 | MOVQ (g_sched+gobuf_sp)(AX), SP |
| 266 | MOVQ $0, (g_sched+gobuf_sp)(AX) | | 272 | MOVQ $0, (g_sched+gobuf_sp)(AX) |
| RET | | RET |
| | | |
| onm: | | onm: |
| // already on m stack, just call directly | | // already on m stack, just call directly |
| 271 | MOVQ DI, DX | | 277 | MOVQ DI, DX |
| 272 | MOVQ 0(DI), DI | | 278 | MOVQ 0(DI), DI |
| 273 | CALL DI | | 279 | CALL DI |
| RET | | RET |
| | | |
| /* | | /* |
| * support for morestack | | * support for morestack |
| */ | | */ |
| 279 |
| | | |
| // Called during function prolog when more stack is needed. | | // Called during function prolog when more stack is needed. |
| // | | // |
| // The traceback routines see morestack on a g0 as being | | // The traceback routines see morestack on a g0 as being |
| // the top of a stack (for example, morestack calling newstack | | // the top of a stack (for example, morestack calling newstack |
| // calling the scheduler calling newm calling gc), so we must | | // calling the scheduler calling newm calling gc), so we must |
| // record an argument size. For that purpose, it has no arguments. | | // record an argument size. For that purpose, it has no arguments. |
| 286 | TEXT runtime·morestack(SB),NOSPLIT,$0-0 | | 291 | TEXT runtime·morestack(SB), NOSPLIT, $0-0 |
| // Cannot grow scheduler stack (m->g0). | | // Cannot grow scheduler stack (m->g0). |
| get_tls(CX) | | get_tls(CX) |
| 289 | MOVQ g(CX), BX | | 294 | MOVQ g(CX), BX |
| 290 | MOVQ g_m(BX), BX | | 295 | MOVQ g_m(BX), BX |
| 291 | MOVQ m_g0(BX), SI | | 296 | MOVQ m_g0(BX), SI |
| 292 | CMPQ g(CX), SI | | 297 | CMPQ g(CX), SI |
| 293 | JNE 2(PC) | | 298 | JNE 2(PC) |
| 294 | INT $3 | | 299 | INT $3 |
| | | |
| // Cannot grow signal stack (m->gsignal). | | // Cannot grow signal stack (m->gsignal). |
| 297 | MOVQ m_gsignal(BX), SI | | 302 | MOVQ m_gsignal(BX), SI |
| 298 | CMPQ g(CX), SI | | 303 | CMPQ g(CX), SI |
| 299 | JNE 2(PC) | | 304 | JNE 2(PC) |
| 300 | INT $3 | | 305 | INT $3 |
| | | |
| // Called from f. | | // Called from f. |
| // Set m->morebuf to f's caller. | | // Set m->morebuf to f's caller. |
| 304 | MOVQ 8(SP), AX // f's caller's PC | | 309 | MOVQ 8(SP), AX // f's caller's PC |
| 305 | MOVQ AX, (m_morebuf+gobuf_pc)(BX) | | 310 | MOVQ AX, (m_morebuf+gobuf_pc)(BX) |
| 306 | LEAQ 16(SP), AX // f's caller's SP | | 311 | LEAQ 16(SP), AX // f's caller's SP |
| 307 | MOVQ AX, (m_morebuf+gobuf_sp)(BX) | | 312 | MOVQ AX, (m_morebuf+gobuf_sp)(BX) |
| get_tls(CX) | | get_tls(CX) |
| 309 | MOVQ g(CX), SI | | 314 | MOVQ g(CX), SI |
| 310 | MOVQ SI, (m_morebuf+gobuf_g)(BX) | | 315 | MOVQ SI, (m_morebuf+gobuf_g)(BX) |
| | | |
| // Set g->sched to context in f. | | // Set g->sched to context in f. |
| 313 | MOVQ 0(SP), AX // f's PC | | 318 | MOVQ 0(SP), AX // f's PC |
| 314 | MOVQ AX, (g_sched+gobuf_pc)(SI) | | 319 | MOVQ AX, (g_sched+gobuf_pc)(SI) |
| 315 | MOVQ SI, (g_sched+gobuf_g)(SI) | | 320 | MOVQ SI, (g_sched+gobuf_g)(SI) |
| 316 | LEAQ 8(SP), AX // f's SP | | 321 | LEAQ 8(SP), AX // f's SP |
| 317 | MOVQ AX, (g_sched+gobuf_sp)(SI) | | 322 | MOVQ AX, (g_sched+gobuf_sp)(SI) |
| 318 | MOVQ DX, (g_sched+gobuf_ctxt)(SI) | | 323 | MOVQ DX, (g_sched+gobuf_ctxt)(SI) |
| | | |
| // Call newstack on m->g0's stack. | | // Call newstack on m->g0's stack. |
| 321 | MOVQ m_g0(BX), BP | | 326 | MOVQ m_g0(BX), BP |
| 322 | MOVQ BP, g(CX) | | 327 | MOVQ BP, g(CX) |
| 323 | MOVQ (g_sched+gobuf_sp)(BP), SP | | 328 | MOVQ (g_sched+gobuf_sp)(BP), SP |
| 324 | CALL runtime·newstack(SB) | | 329 | CALL runtime·newstack(SB) |
| 325 | MOVQ $0, 0x1003 // crash if newstack returns | | 330 | MOVQ $0, 0x1003 // crash if newstack returns |
| RET | | RET |
| | | |
| // morestack but not preserving ctxt. | | // morestack but not preserving ctxt. |
| 329 | TEXT runtime·morestack_noctxt(SB),NOSPLIT,$0 | | 334 | TEXT runtime·morestack_noctxt(SB), NOSPLIT, $0 |
| 330 | MOVL $0, DX | | 335 | MOVL $0, DX |
| 331 | JMP runtime·morestack(SB) | | 336 | JMP runtime·morestack(SB) |
| | | |
| // reflectcall: call a function with the given argument list | | // reflectcall: call a function with the given argument list |
| // func call(f *FuncVal, arg *byte, argsize, retoffset uint32). | | // func call(f *FuncVal, arg *byte, argsize, retoffset uint32). |
| // we don't have variable-sized frames, so we use a small number | | // we don't have variable-sized frames, so we use a small number |
| // of constant-sized-frame functions to encode a few bits of size in the pc. | | // of constant-sized-frame functions to encode a few bits of size in the pc. |
| // Caution: ugly multiline assembly macros in your future! | | // Caution: ugly multiline assembly macros in your future! |
| | | |
| 339 | #define DISPATCH(NAME,MAXSIZE) \ | | 344 | #define DISPATCH(NAME, MAXSIZE) \ |
| 340 | CMPQ CX, $MAXSIZE; \ | | 345 | CMPQ CX, $MAXSIZE; \ |
| 341 | JA 3(PC); \ | | 346 | JA 3(PC); \ |
| 342 | MOVQ $NAME(SB), AX; \ | | 347 | MOVQ $NAME(SB), AX; \ |
| 343 | JMP AX | | 348 | JMP AX |
| | | | 349 |
|
| // Note: can't just "JMP NAME(SB)" - bad inlining results. | | // Note: can't just "JMP NAME(SB)" - bad inlining results. |
| | | |
| TEXT ·reflectcall(SB), NOSPLIT, $0-24 | | TEXT ·reflectcall(SB), NOSPLIT, $0-24 |
| MOVLQZX argsize+16(FP), CX | | MOVLQZX argsize+16(FP), CX |
| DISPATCH(runtime·call16, 16) | | DISPATCH(runtime·call16, 16) |
| DISPATCH(runtime·call32, 32) | | DISPATCH(runtime·call32, 32) |
| DISPATCH(runtime·call64, 64) | | DISPATCH(runtime·call64, 64) |
| DISPATCH(runtime·call128, 128) | | DISPATCH(runtime·call128, 128) |
| DISPATCH(runtime·call256, 256) | | DISPATCH(runtime·call256, 256) |
| DISPATCH(runtime·call512, 512) | | DISPATCH(runtime·call512, 512) |
| DISPATCH(runtime·call1024, 1024) | | DISPATCH(runtime·call1024, 1024) |
| DISPATCH(runtime·call2048, 2048) | | DISPATCH(runtime·call2048, 2048) |
| DISPATCH(runtime·call4096, 4096) | | DISPATCH(runtime·call4096, 4096) |
| DISPATCH(runtime·call8192, 8192) | | DISPATCH(runtime·call8192, 8192) |
| DISPATCH(runtime·call16384, 16384) | | DISPATCH(runtime·call16384, 16384) |
| DISPATCH(runtime·call32768, 32768) | | DISPATCH(runtime·call32768, 32768) |
| DISPATCH(runtime·call65536, 65536) | | DISPATCH(runtime·call65536, 65536) |
| DISPATCH(runtime·call131072, 131072) | | DISPATCH(runtime·call131072, 131072) |
| DISPATCH(runtime·call262144, 262144) | | DISPATCH(runtime·call262144, 262144) |
| DISPATCH(runtime·call524288, 524288) | | DISPATCH(runtime·call524288, 524288) |
| DISPATCH(runtime·call1048576, 1048576) | | DISPATCH(runtime·call1048576, 1048576) |
| DISPATCH(runtime·call2097152, 2097152) | | DISPATCH(runtime·call2097152, 2097152) |
| DISPATCH(runtime·call4194304, 4194304) | | DISPATCH(runtime·call4194304, 4194304) |
| DISPATCH(runtime·call8388608, 8388608) | | DISPATCH(runtime·call8388608, 8388608) |
| DISPATCH(runtime·call16777216, 16777216) | | DISPATCH(runtime·call16777216, 16777216) |
| DISPATCH(runtime·call33554432, 33554432) | | DISPATCH(runtime·call33554432, 33554432) |
| DISPATCH(runtime·call67108864, 67108864) | | DISPATCH(runtime·call67108864, 67108864) |
| DISPATCH(runtime·call134217728, 134217728) | | DISPATCH(runtime·call134217728, 134217728) |
| DISPATCH(runtime·call268435456, 268435456) | | DISPATCH(runtime·call268435456, 268435456) |
| DISPATCH(runtime·call536870912, 536870912) | | DISPATCH(runtime·call536870912, 536870912) |
| DISPATCH(runtime·call1073741824, 1073741824) | | DISPATCH(runtime·call1073741824, 1073741824) |
| 375 | MOVQ $runtime·badreflectcall(SB), AX | | 381 | MOVQ $runtime·badreflectcall(SB), AX |
| 376 | JMP AX | | 382 | JMP AX |
| | | |
| 378 | #define CALLFN(NAME,MAXSIZE) \ | | 384 | #define CALLFN(NAME, MAXSIZE) \ |
| 379 | TEXT NAME(SB), WRAPPER, $MAXSIZE-24; \ | | 385 | TEXT NAME(SB), WRAPPER, $MAXSIZE-24; \ |
| 380 | NO_LOCAL_POINTERS; \ | | 386 | NO_LOCAL_POINTERS; \ |
| 381 | /* copy arguments to stack */ \ | | 387 | /* copy arguments to stack */ \ |
| 382 | MOVQ argptr+8(FP), SI; \ | | 388 | MOVQ argptr+8(FP), SI; \ |
| 383 | MOVLQZX argsize+16(FP), CX; \ | | 389 | MOVLQZX argsize+16(FP), CX; \ |
| 384 | MOVQ SP, DI; \ | | 390 | MOVQ SP, DI; \ |
| 385 | REP;MOVSB; \ | | 391 | REP;MOVSB; \ |
| 386 | /* call function */ \ | | 392 | /* call function */ \ |
| 387 | MOVQ f+0(FP), DX; \ | | 393 | MOVQ f+0(FP), DX; \ |
| 388 | PCDATA $PCDATA_StackMapIndex, $0; \ | | 394 | PCDATA $PCDATA_StackMapIndex, $0; \ |
| 389 | CALL (DX); \ | | 395 | CALL (DX); \ |
| 390 | /* copy return values back */ \ | | 396 | /* copy return values back */ \ |
| 391 | MOVQ argptr+8(FP), DI; \ | | 397 | MOVQ argptr+8(FP), DI; \ |
| 392 | MOVLQZX argsize+16(FP), CX; \ | | 398 | MOVLQZX argsize+16(FP), CX; \ |
| 393 | MOVLQZX retoffset+20(FP), BX; \ | | 399 | MOVLQZX retoffset+20(FP), BX; \ |
| 394 | MOVQ SP, SI; \ | | 400 | MOVQ SP, SI; \ |
| 395 | ADDQ BX, DI; \ | | 401 | ADDQ BX, DI; \ |
| 396 | ADDQ BX, SI; \ | | 402 | ADDQ BX, SI; \ |
| 397 | SUBQ BX, CX; \ | | 403 | SUBQ BX, CX; \ |
| 398 | REP;MOVSB; \ | | 404 | REP;MOVSB; \ |
| RET | | RET |
| | | |
| CALLFN(·call16, 16) | | CALLFN(·call16, 16) |
| CALLFN(·call32, 32) | | CALLFN(·call32, 32) |
| CALLFN(·call64, 64) | | CALLFN(·call64, 64) |
| CALLFN(·call128, 128) | | CALLFN(·call128, 128) |
| CALLFN(·call256, 256) | | CALLFN(·call256, 256) |
| CALLFN(·call512, 512) | | CALLFN(·call512, 512) |
| CALLFN(·call1024, 1024) | | CALLFN(·call1024, 1024) |
| CALLFN(·call2048, 2048) | | CALLFN(·call2048, 2048) |
| CALLFN(·call4096, 4096) | | CALLFN(·call4096, 4096) |
| CALLFN(·call8192, 8192) | | CALLFN(·call8192, 8192) |
| CALLFN(·call16384, 16384) | | CALLFN(·call16384, 16384) |
| CALLFN(·call32768, 32768) | | CALLFN(·call32768, 32768) |
| CALLFN(·call65536, 65536) | | CALLFN(·call65536, 65536) |
| CALLFN(·call131072, 131072) | | CALLFN(·call131072, 131072) |
| CALLFN(·call262144, 262144) | | CALLFN(·call262144, 262144) |
| CALLFN(·call524288, 524288) | | CALLFN(·call524288, 524288) |
| CALLFN(·call1048576, 1048576) | | CALLFN(·call1048576, 1048576) |
| CALLFN(·call2097152, 2097152) | | CALLFN(·call2097152, 2097152) |
| CALLFN(·call4194304, 4194304) | | CALLFN(·call4194304, 4194304) |
| CALLFN(·call8388608, 8388608) | | CALLFN(·call8388608, 8388608) |
| CALLFN(·call16777216, 16777216) | | CALLFN(·call16777216, 16777216) |
| CALLFN(·call33554432, 33554432) | | CALLFN(·call33554432, 33554432) |
| CALLFN(·call67108864, 67108864) | | CALLFN(·call67108864, 67108864) |
| CALLFN(·call134217728, 134217728) | | CALLFN(·call134217728, 134217728) |
| CALLFN(·call268435456, 268435456) | | CALLFN(·call268435456, 268435456) |
| CALLFN(·call536870912, 536870912) | | CALLFN(·call536870912, 536870912) |
| CALLFN(·call1073741824, 1073741824) | | CALLFN(·call1073741824, 1073741824) |
| | | |
| // bool cas(int32 *val, int32 old, int32 new) | | // bool cas(int32 *val, int32 old, int32 new) |
| // Atomically: | | // Atomically: |
| // if(*val == old){ | | // if(*val == old){ |
| // *val = new; | | // *val = new; |
| // return 1; | | // return 1; |
| // } else | | // } else |
| // return 0; | | // return 0; |
| TEXT runtime·cas(SB), NOSPLIT, $0-17 | | TEXT runtime·cas(SB), NOSPLIT, $0-17 |
| 437 | MOVQ ptr+0(FP), BX | | 443 | MOVQ ptr+0(FP), BX |
| 438 | MOVL old+8(FP), AX | | 444 | MOVL old+8(FP), AX |
| 439 | MOVL new+12(FP), CX | | 445 | MOVL new+12(FP), CX |
| LOCK | | LOCK |
| 441 | CMPXCHGL CX, 0(BX) | | 447 | CMPXCHGL CX, 0(BX) |
| 442 | JZ 4(PC) | | 448 | JZ 4(PC) |
| 443 | MOVL $0, AX | | 449 | MOVL $0, AX |
| 444 | MOVB AX, ret+16(FP) | | 450 | MOVB AX, ret+16(FP) |
| RET | | RET |
| 446 | MOVL $1, AX | | 452 | MOVL $1, AX |
| 447 | MOVB AX, ret+16(FP) | | 453 | MOVB AX, ret+16(FP) |
| RET | | RET |
| | | |
| // bool runtime·cas64(uint64 *val, uint64 old, uint64 new) | | // bool runtime·cas64(uint64 *val, uint64 old, uint64 new) |
| // Atomically: | | // Atomically: |
| // if(*val == *old){ | | // if(*val == *old){ |
| // *val = new; | | // *val = new; |
| // return 1; | | // return 1; |
| // } else { | | // } else { |
| // return 0; | | // return 0; |
| // } | | // } |
| TEXT runtime·cas64(SB), NOSPLIT, $0-25 | | TEXT runtime·cas64(SB), NOSPLIT, $0-25 |
| 459 | MOVQ ptr+0(FP), BX | | 465 | MOVQ ptr+0(FP), BX |
| 460 | MOVQ old+8(FP), AX | | 466 | MOVQ old+8(FP), AX |
| 461 | MOVQ new+16(FP), CX | | 467 | MOVQ new+16(FP), CX |
| LOCK | | LOCK |
| 463 | CMPXCHGQ CX, 0(BX) | | 469 | CMPXCHGQ CX, 0(BX) |
| 464 | JNZ cas64_fail | | 470 | JNZ cas64_fail |
| 465 | MOVL $1, AX | | 471 | MOVL $1, AX |
| 466 | MOVB AX, ret+24(FP) | | 472 | MOVB AX, ret+24(FP) |
| RET | | RET |
| | | | 474 |
|
| cas64_fail: | | cas64_fail: |
| 469 | MOVL $0, AX | | 476 | MOVL $0, AX |
| 470 | MOVB AX, ret+24(FP) | | 477 | MOVB AX, ret+24(FP) |
| RET | | RET |
| 472 |
| | 479 |
|
| TEXT runtime·casuintptr(SB), NOSPLIT, $0-25 | | TEXT runtime·casuintptr(SB), NOSPLIT, $0-25 |
| 474 | JMP runtime·cas64(SB) | | 481 | JMP runtime·cas64(SB) |
| | | |
| TEXT runtime·atomicloaduintptr(SB), NOSPLIT, $0-16 | | TEXT runtime·atomicloaduintptr(SB), NOSPLIT, $0-16 |
| 477 | JMP runtime·atomicload64(SB) | | 484 | JMP runtime·atomicload64(SB) |
| | | |
| TEXT runtime·atomicloaduint(SB), NOSPLIT, $0-16 | | TEXT runtime·atomicloaduint(SB), NOSPLIT, $0-16 |
| 480 | JMP runtime·atomicload64(SB) | | 487 | JMP runtime·atomicload64(SB) |
| | | |
| TEXT runtime·atomicstoreuintptr(SB), NOSPLIT, $0-16 | | TEXT runtime·atomicstoreuintptr(SB), NOSPLIT, $0-16 |
| 483 | JMP runtime·atomicstore64(SB) | | 490 | JMP runtime·atomicstore64(SB) |
| | | |
| // bool casp(void **val, void *old, void *new) | | // bool casp(void **val, void *old, void *new) |
| // Atomically: | | // Atomically: |
| // if(*val == old){ | | // if(*val == old){ |
| // *val = new; | | // *val = new; |
| // return 1; | | // return 1; |
| // } else | | // } else |
| // return 0; | | // return 0; |
| TEXT runtime·casp(SB), NOSPLIT, $0-25 | | TEXT runtime·casp(SB), NOSPLIT, $0-25 |
| 493 | MOVQ ptr+0(FP), BX | | 500 | MOVQ ptr+0(FP), BX |
| 494 | MOVQ old+8(FP), AX | | 501 | MOVQ old+8(FP), AX |
| 495 | MOVQ new+16(FP), CX | | 502 | MOVQ new+16(FP), CX |
| LOCK | | LOCK |
| 497 | CMPXCHGQ CX, 0(BX) | | 504 | CMPXCHGQ CX, 0(BX) |
| 498 | JZ 4(PC) | | 505 | JZ 4(PC) |
| 499 | MOVL $0, AX | | 506 | MOVL $0, AX |
| 500 | MOVB AX, ret+24(FP) | | 507 | MOVB AX, ret+24(FP) |
| RET | | RET |
| 502 | MOVL $1, AX | | 509 | MOVL $1, AX |
| 503 | MOVB AX, ret+24(FP) | | 510 | MOVB AX, ret+24(FP) |
| RET | | RET |
| | | |
| // uint32 xadd(uint32 volatile *val, int32 delta) | | // uint32 xadd(uint32 volatile *val, int32 delta) |
| // Atomically: | | // Atomically: |
| // *val += delta; | | // *val += delta; |
| // return *val; | | // return *val; |
| TEXT runtime·xadd(SB), NOSPLIT, $0-20 | | TEXT runtime·xadd(SB), NOSPLIT, $0-20 |
| 511 | MOVQ ptr+0(FP), BX | | 518 | MOVQ ptr+0(FP), BX |
| 512 | MOVL delta+8(FP), AX | | 519 | MOVL delta+8(FP), AX |
| 513 | MOVL AX, CX | | 520 | MOVL AX, CX |
| LOCK | | LOCK |
| 515 | XADDL AX, 0(BX) | | 522 | XADDL AX, 0(BX) |
| 516 | ADDL CX, AX | | 523 | ADDL CX, AX |
| 517 | MOVL AX, ret+16(FP) | | 524 | MOVL AX, ret+16(FP) |
| RET | | RET |
| | | |
| TEXT runtime·xadd64(SB), NOSPLIT, $0-24 | | TEXT runtime·xadd64(SB), NOSPLIT, $0-24 |
| 521 | MOVQ ptr+0(FP), BX | | 528 | MOVQ ptr+0(FP), BX |
| 522 | MOVQ delta+8(FP), AX | | 529 | MOVQ delta+8(FP), AX |
| 523 | MOVQ AX, CX | | 530 | MOVQ AX, CX |
| LOCK | | LOCK |
| 525 | XADDQ AX, 0(BX) | | 532 | XADDQ AX, 0(BX) |
| 526 | ADDQ CX, AX | | 533 | ADDQ CX, AX |
| 527 | MOVQ AX, ret+16(FP) | | 534 | MOVQ AX, ret+16(FP) |
| RET | | RET |
| | | |
| TEXT runtime·xchg(SB), NOSPLIT, $0-20 | | TEXT runtime·xchg(SB), NOSPLIT, $0-20 |
| 531 | MOVQ ptr+0(FP), BX | | 538 | MOVQ ptr+0(FP), BX |
| 532 | MOVL new+8(FP), AX | | 539 | MOVL new+8(FP), AX |
| 533 | XCHGL AX, 0(BX) | | 540 | XCHGL AX, 0(BX) |
| 534 | MOVL AX, ret+16(FP) | | 541 | MOVL AX, ret+16(FP) |
| RET | | RET |
| | | |
| TEXT runtime·xchg64(SB), NOSPLIT, $0-24 | | TEXT runtime·xchg64(SB), NOSPLIT, $0-24 |
| 538 | MOVQ ptr+0(FP), BX | | 545 | MOVQ ptr+0(FP), BX |
| 539 | MOVQ new+8(FP), AX | | 546 | MOVQ new+8(FP), AX |
| 540 | XCHGQ AX, 0(BX) | | 547 | XCHGQ AX, 0(BX) |
| 541 | MOVQ AX, ret+16(FP) | | 548 | MOVQ AX, ret+16(FP) |
| RET | | RET |
| | | |
| TEXT runtime·xchgp(SB), NOSPLIT, $0-24 | | TEXT runtime·xchgp(SB), NOSPLIT, $0-24 |
| 545 | MOVQ ptr+0(FP), BX | | 552 | MOVQ ptr+0(FP), BX |
| 546 | MOVQ new+8(FP), AX | | 553 | MOVQ new+8(FP), AX |
| 547 | XCHGQ AX, 0(BX) | | 554 | XCHGQ AX, 0(BX) |
| 548 | MOVQ AX, ret+16(FP) | | 555 | MOVQ AX, ret+16(FP) |
| RET | | RET |
| | | |
| TEXT runtime·xchguintptr(SB), NOSPLIT, $0-24 | | TEXT runtime·xchguintptr(SB), NOSPLIT, $0-24 |
| 552 | JMP runtime·xchg64(SB) | | 559 | JMP runtime·xchg64(SB) |
| | | |
| 554 | TEXT runtime·procyield(SB),NOSPLIT,$0-0 | | 561 | TEXT runtime·procyield(SB), NOSPLIT, $0-0 |
| 555 | MOVL cycles+0(FP), AX | | 562 | MOVL cycles+0(FP), AX |
| | | | 563 |
|
| again: | | again: |
| PAUSE | | PAUSE |
| 558 | SUBL $1, AX | | 566 | SUBL $1, AX |
| 559 | JNZ again | | 567 | JNZ again |
| RET | | RET |
| | | |
| TEXT runtime·atomicstorep(SB), NOSPLIT, $0-16 | | TEXT runtime·atomicstorep(SB), NOSPLIT, $0-16 |
| 563 | MOVQ ptr+0(FP), BX | | 571 | MOVQ ptr+0(FP), BX |
| 564 | MOVQ val+8(FP), AX | | 572 | MOVQ val+8(FP), AX |
| 565 | XCHGQ AX, 0(BX) | | 573 | XCHGQ AX, 0(BX) |
| RET | | RET |
| | | |
| TEXT runtime·atomicstore(SB), NOSPLIT, $0-12 | | TEXT runtime·atomicstore(SB), NOSPLIT, $0-12 |
| 569 | MOVQ ptr+0(FP), BX | | 577 | MOVQ ptr+0(FP), BX |
| 570 | MOVL val+8(FP), AX | | 578 | MOVL val+8(FP), AX |
| 571 | XCHGL AX, 0(BX) | | 579 | XCHGL AX, 0(BX) |
| RET | | RET |
| | | |
| TEXT runtime·atomicstore64(SB), NOSPLIT, $0-16 | | TEXT runtime·atomicstore64(SB), NOSPLIT, $0-16 |
| 575 | MOVQ ptr+0(FP), BX | | 583 | MOVQ ptr+0(FP), BX |
| 576 | MOVQ val+8(FP), AX | | 584 | MOVQ val+8(FP), AX |
| 577 | XCHGQ AX, 0(BX) | | 585 | XCHGQ AX, 0(BX) |
| RET | | RET |
| | | |
| // void runtime·atomicor8(byte volatile*, byte); | | // void runtime·atomicor8(byte volatile*, byte); |
| TEXT runtime·atomicor8(SB), NOSPLIT, $0-9 | | TEXT runtime·atomicor8(SB), NOSPLIT, $0-9 |
| 582 | MOVQ ptr+0(FP), AX | | 590 | MOVQ ptr+0(FP), AX |
| 583 | MOVB val+8(FP), BX | | 591 | MOVB val+8(FP), BX |
| LOCK | | LOCK |
| 585 | ORB BX, (AX) | | 593 | ORB BX, (AX) |
| RET | | RET |
| | | |
| // void jmpdefer(fn, sp); | | // void jmpdefer(fn, sp); |
| // called from deferreturn. | | // called from deferreturn. |
| // 1. pop the caller | | // 1. pop the caller |
| // 2. sub 5 bytes from the callers return | | // 2. sub 5 bytes from the callers return |
| // 3. jmp to the argument | | // 3. jmp to the argument |
| TEXT runtime·jmpdefer(SB), NOSPLIT, $0-16 | | TEXT runtime·jmpdefer(SB), NOSPLIT, $0-16 |
| 594 | MOVQ fv+0(FP), DX // fn | | 602 | MOVQ fv+0(FP), DX // fn |
| 595 | MOVQ argp+8(FP), BX // caller sp | | 603 | MOVQ argp+8(FP), BX // caller sp |
| 596 | LEAQ -8(BX), SP // caller sp after CALL | | 604 | LEAQ -8(BX), SP // caller sp after CALL |
| 597 | SUBQ $5, (SP) // return to CALL again | | 605 | SUBQ $5, (SP) // return to CALL again |
| 598 | MOVQ 0(DX), BX | | 606 | MOVQ 0(DX), BX |
| 599 | JMP BX // but first run the deferred function | | 607 | JMP BX // but first run the deferred function |
| | | |
| // Save state of caller into g->sched. Smashes R8, R9. | | // Save state of caller into g->sched. Smashes R8, R9. |
| 602 | TEXT gosave<>(SB),NOSPLIT,$0 | | 610 | TEXT gosave<>(SB), NOSPLIT, $0 |
| get_tls(R8) | | get_tls(R8) |
| 604 | MOVQ g(R8), R8 | | 612 | MOVQ g(R8), R8 |
| 605 | MOVQ 0(SP), R9 | | 613 | MOVQ 0(SP), R9 |
| 606 | MOVQ R9, (g_sched+gobuf_pc)(R8) | | 614 | MOVQ R9, (g_sched+gobuf_pc)(R8) |
| 607 | LEAQ 8(SP), R9 | | 615 | LEAQ 8(SP), R9 |
| 608 | MOVQ R9, (g_sched+gobuf_sp)(R8) | | 616 | MOVQ R9, (g_sched+gobuf_sp)(R8) |
| 609 | MOVQ $0, (g_sched+gobuf_ret)(R8) | | 617 | MOVQ $0, (g_sched+gobuf_ret)(R8) |
| 610 | MOVQ $0, (g_sched+gobuf_ctxt)(R8) | | 618 | MOVQ $0, (g_sched+gobuf_ctxt)(R8) |
| RET | | RET |
| | | |
| // asmcgocall(void(*fn)(void*), void *arg) | | // asmcgocall(void(*fn)(void*), void *arg) |
| // Call fn(arg) on the scheduler stack, | | // Call fn(arg) on the scheduler stack, |
| // aligned appropriately for the gcc ABI. | | // aligned appropriately for the gcc ABI. |
| // See cgocall.c for more details. | | // See cgocall.c for more details. |
| 617 | TEXT ·asmcgocall(SB),NOSPLIT,$0-16 | | 625 | TEXT ·asmcgocall(SB), NOSPLIT, $0-16 |
| 618 | MOVQ fn+0(FP), AX | | 626 | MOVQ fn+0(FP), AX |
| 619 | MOVQ arg+8(FP), BX | | 627 | MOVQ arg+8(FP), BX |
| 620 | CALL asmcgocall<>(SB) | | 628 | CALL asmcgocall<>(SB) |
| RET | | RET |
| | | |
| 623 | TEXT ·asmcgocall_errno(SB),NOSPLIT,$0-20 | | 631 | TEXT ·asmcgocall_errno(SB), NOSPLIT, $0-20 |
| 624 | MOVQ fn+0(FP), AX | | 632 | MOVQ fn+0(FP), AX |
| 625 | MOVQ arg+8(FP), BX | | 633 | MOVQ arg+8(FP), BX |
| 626 | CALL asmcgocall<>(SB) | | 634 | CALL asmcgocall<>(SB) |
| 627 | MOVL AX, ret+16(FP) | | 635 | MOVL AX, ret+16(FP) |
| RET | | RET |
| | | |
| // asmcgocall common code. fn in AX, arg in BX. returns errno in AX. | | // asmcgocall common code. fn in AX, arg in BX. returns errno in AX. |
| 631 | TEXT asmcgocall<>(SB),NOSPLIT,$0-0 | | 639 | TEXT asmcgocall<>(SB), NOSPLIT, $0-0 |
| 632 | MOVQ SP, DX | | 640 | MOVQ SP, DX |
| | | |
| // Figure out if we need to switch to m->g0 stack. | | // Figure out if we need to switch to m->g0 stack. |
| // We get called to create new OS threads too, and those | | // We get called to create new OS threads too, and those |
| // come in on the m->g0 stack already. | | // come in on the m->g0 stack already. |
| get_tls(CX) | | get_tls(CX) |
| 638 | MOVQ g(CX), BP | | 646 | MOVQ g(CX), BP |
| 639 | MOVQ g_m(BP), BP | | 647 | MOVQ g_m(BP), BP |
| 640 | MOVQ m_g0(BP), SI | | 648 | MOVQ m_g0(BP), SI |
| 641 | MOVQ g(CX), DI | | 649 | MOVQ g(CX), DI |
| 642 | CMPQ SI, DI | | 650 | CMPQ SI, DI |
| 643 | JEQ nosave | | 651 | JEQ nosave |
| 644 | MOVQ m_gsignal(BP), SI | | 652 | MOVQ m_gsignal(BP), SI |
| 645 | CMPQ SI, DI | | 653 | CMPQ SI, DI |
| 646 | JEQ nosave | | 654 | JEQ nosave |
| 647 |
| | 655 |
|
| 648 | MOVQ m_g0(BP), SI | | 656 | MOVQ m_g0(BP), SI |
| 649 | CALL gosave<>(SB) | | 657 | CALL gosave<>(SB) |
| 650 | MOVQ SI, g(CX) | | 658 | MOVQ SI, g(CX) |
| 651 | MOVQ (g_sched+gobuf_sp)(SI), SP | | 659 | MOVQ (g_sched+gobuf_sp)(SI), SP |
| | | | 660 |
|
| nosave: | | nosave: |
| | | |
| // Now on a scheduling stack (a pthread-created stack). | | // Now on a scheduling stack (a pthread-created stack). |
| // Make sure we have enough room for 4 stack-backed fast-call | | // Make sure we have enough room for 4 stack-backed fast-call |
| // registers as per windows amd64 calling convention. | | // registers as per windows amd64 calling convention. |
| 657 | SUBQ $64, SP | | 666 | SUBQ $64, SP |
| 658 | ANDQ $~15, SP // alignment for gcc ABI | | 667 | ANDQ $~15, SP // alignment for gcc ABI |
| 659 | MOVQ DI, 48(SP) // save g | | 668 | MOVQ DI, 48(SP) // save g |
| 660 | MOVQ (g_stack+stack_hi)(DI), DI | | 669 | MOVQ (g_stack+stack_hi)(DI), DI |
| 661 | SUBQ DX, DI | | 670 | SUBQ DX, DI |
| 662 | MOVQ DI, 40(SP) // save depth in stack (can't just save SP, as stack might be copied during a callback) | | 671 | MOVQ DI, 40(SP) // save depth in stack (can't just save SP, as stack might be copied during a callback) |
| 663 | MOVQ BX, DI // DI = first argument in AMD64 ABI | | 672 | MOVQ BX, DI // DI = first argument in AMD64 ABI |
| 664 | MOVQ BX, CX // CX = first argument in Win64 | | 673 | MOVQ BX, CX // CX = first argument in Win64 |
| 665 | CALL AX | | 674 | CALL AX |
| | | |
| // Restore registers, g, stack pointer. | | // Restore registers, g, stack pointer. |
| get_tls(CX) | | get_tls(CX) |
| 669 | MOVQ 48(SP), DI | | 678 | MOVQ 48(SP), DI |
| 670 | MOVQ (g_stack+stack_hi)(DI), SI | | 679 | MOVQ (g_stack+stack_hi)(DI), SI |
| 671 | SUBQ 40(SP), SI | | 680 | SUBQ 40(SP), SI |
| 672 | MOVQ DI, g(CX) | | 681 | MOVQ DI, g(CX) |
| 673 | MOVQ SI, SP | | 682 | MOVQ SI, SP |
| RET | | RET |
| | | |
| // cgocallback(void (*fn)(void*), void *frame, uintptr framesize) | | // cgocallback(void (*fn)(void*), void *frame, uintptr framesize) |
| // Turn the fn into a Go func (by taking its address) and call | | // Turn the fn into a Go func (by taking its address) and call |
| // cgocallback_gofunc. | | // cgocallback_gofunc. |
| 679 | TEXT runtime·cgocallback(SB),NOSPLIT,$24-24 | | 688 | TEXT runtime·cgocallback(SB), NOSPLIT, $24-24 |
| 680 | LEAQ fn+0(FP), AX | | 689 | LEAQ fn+0(FP), AX |
| 681 | MOVQ AX, 0(SP) | | 690 | MOVQ AX, 0(SP) |
| 682 | MOVQ frame+8(FP), AX | | 691 | MOVQ frame+8(FP), AX |
| 683 | MOVQ AX, 8(SP) | | 692 | MOVQ AX, 8(SP) |
| 684 | MOVQ framesize+16(FP), AX | | 693 | MOVQ framesize+16(FP), AX |
| 685 | MOVQ AX, 16(SP) | | 694 | MOVQ AX, 16(SP) |
| 686 | MOVQ $runtime·cgocallback_gofunc(SB), AX | | 695 | MOVQ $runtime·cgocallback_gofunc(SB), AX |
| 687 | CALL AX | | 696 | CALL AX |
| RET | | RET |
| | | |
| // cgocallback_gofunc(FuncVal*, void *frame, uintptr framesize) | | // cgocallback_gofunc(FuncVal*, void *frame, uintptr framesize) |
| // See cgocall.c for more details. | | // See cgocall.c for more details. |
| 692 | TEXT ·cgocallback_gofunc(SB),NOSPLIT,$8-24 | | 701 | TEXT ·cgocallback_gofunc(SB), NOSPLIT, $8-24 |
| NO_LOCAL_POINTERS | | NO_LOCAL_POINTERS |
| | | |
| // If g is nil, Go did not create the current thread. | | // If g is nil, Go did not create the current thread. |
| // Call needm to obtain one m for temporary use. | | // Call needm to obtain one m for temporary use. |
| // In this case, we're running on the thread stack, so there's | | // In this case, we're running on the thread stack, so there's |
| // lots of space, but the linker doesn't know. Hide the call from | | // lots of space, but the linker doesn't know. Hide the call from |
| // the linker analysis by using an indirect call through AX. | | // the linker analysis by using an indirect call through AX. |
| get_tls(CX) | | get_tls(CX) |
| | | | 710 |
|
| #ifdef GOOS_windows | | #ifdef GOOS_windows |
| 702 | MOVL $0, BP | | 712 | MOVL $0, BP |
| 703 | CMPQ CX, $0 | | 713 | CMPQ CX, $0 |
| 704 | JEQ 2(PC) | | 714 | JEQ 2(PC) |
| | | | 715 |
|
| #endif | | #endif |
| 706 | MOVQ g(CX), BP | | 717 | MOVQ g(CX), BP |
| 707 | CMPQ BP, $0 | | 718 | CMPQ BP, $0 |
| 708 | JEQ needm | | 719 | JEQ needm |
| 709 | MOVQ g_m(BP), BP | | 720 | MOVQ g_m(BP), BP |
| 710 | MOVQ BP, R8 // holds oldm until end of function | | 721 | MOVQ BP, R8 // holds oldm until end of function |
| 711 | JMP havem | | 722 | JMP havem |
| | | | 723 |
|
| needm: | | needm: |
| 713 | MOVQ $0, 0(SP) | | 725 | MOVQ $0, 0(SP) |
| 714 | MOVQ $runtime·needm(SB), AX | | 726 | MOVQ $runtime·needm(SB), AX |
| 715 | CALL AX | | 727 | CALL AX |
| 716 | MOVQ 0(SP), R8 | | 728 | MOVQ 0(SP), R8 |
| get_tls(CX) | | get_tls(CX) |
| 718 | MOVQ g(CX), BP | | 730 | MOVQ g(CX), BP |
| 719 | MOVQ g_m(BP), BP | | 731 | MOVQ g_m(BP), BP |
| 720 |
| | 732 |
|
| // Set m->sched.sp = SP, so that if a panic happens | | // Set m->sched.sp = SP, so that if a panic happens |
| // during the function we are about to execute, it will | | // during the function we are about to execute, it will |
| // have a valid SP to run on the g0 stack. | | // have a valid SP to run on the g0 stack. |
| // The next few lines (after the havem label) | | // The next few lines (after the havem label) |
| // will save this SP onto the stack and then write | | // will save this SP onto the stack and then write |
| // the same SP back to m->sched.sp. That seems redundant, | | // the same SP back to m->sched.sp. That seems redundant, |
| // but if an unrecovered panic happens, unwindm will | | // but if an unrecovered panic happens, unwindm will |
| // restore the g->sched.sp from the stack location | | // restore the g->sched.sp from the stack location |
| // and then onM will try to use it. If we don't set it here, | | // and then onM will try to use it. If we don't set it here, |
| // that restored SP will be uninitialized (typically 0) and | | // that restored SP will be uninitialized (typically 0) and |
| // will not be usable. | | // will not be usable. |
| 732 | MOVQ m_g0(BP), SI | | 744 | MOVQ m_g0(BP), SI |
| 733 | MOVQ SP, (g_sched+gobuf_sp)(SI) | | 745 | MOVQ SP, (g_sched+gobuf_sp)(SI) |
| | | |
| havem: | | havem: |
| // Now there's a valid m, and we're running on its m->g0. | | // Now there's a valid m, and we're running on its m->g0. |
| // Save current m->g0->sched.sp on stack and then set it to SP. | | // Save current m->g0->sched.sp on stack and then set it to SP. |
| // Save current sp in m->g0->sched.sp in preparation for | | // Save current sp in m->g0->sched.sp in preparation for |
| // switch back to m->curg stack. | | // switch back to m->curg stack. |
| // NOTE: unwindm knows that the saved g->sched.sp is at 0(SP). | | // NOTE: unwindm knows that the saved g->sched.sp is at 0(SP). |
| 741 | MOVQ m_g0(BP), SI | | 753 | MOVQ m_g0(BP), SI |
| 742 | MOVQ (g_sched+gobuf_sp)(SI), AX | | 754 | MOVQ (g_sched+gobuf_sp)(SI), AX |
| 743 | MOVQ AX, 0(SP) | | 755 | MOVQ AX, 0(SP) |
| 744 | MOVQ SP, (g_sched+gobuf_sp)(SI) | | 756 | MOVQ SP, (g_sched+gobuf_sp)(SI) |
| | | |
| // Switch to m->curg stack and call runtime.cgocallbackg. | | // Switch to m->curg stack and call runtime.cgocallbackg. |
| // Because we are taking over the execution of m->curg | | // Because we are taking over the execution of m->curg |
| // but *not* resuming what had been running, we need to | | // but *not* resuming what had been running, we need to |
| // save that information (m->curg->sched) so we can restore it. | | // save that information (m->curg->sched) so we can restore it. |
| // We can restore m->curg->sched.sp easily, because calling | | // We can restore m->curg->sched.sp easily, because calling |
| // runtime.cgocallbackg leaves SP unchanged upon return. | | // runtime.cgocallbackg leaves SP unchanged upon return. |
| // To save m->curg->sched.pc, we push it onto the stack. | | // To save m->curg->sched.pc, we push it onto the stack. |
| // This has the added benefit that it looks to the traceback | | // This has the added benefit that it looks to the traceback |
| // routine like cgocallbackg is going to return to that | | // routine like cgocallbackg is going to return to that |
| // PC (because the frame we allocate below has the same | | // PC (because the frame we allocate below has the same |
| // size as cgocallback_gofunc's frame declared above) | | // size as cgocallback_gofunc's frame declared above) |
| // so that the traceback will seamlessly trace back into | | // so that the traceback will seamlessly trace back into |
| // the earlier calls. | | // the earlier calls. |
| // | | // |
| // In the new goroutine, 0(SP) holds the saved R8. | | // In the new goroutine, 0(SP) holds the saved R8. |
| 761 | MOVQ m_curg(BP), SI | | 773 | MOVQ m_curg(BP), SI |
| 762 | MOVQ SI, g(CX) | | 774 | MOVQ SI, g(CX) |
| 763 | MOVQ (g_sched+gobuf_sp)(SI), DI // prepare stack as DI | | 775 | MOVQ (g_sched+gobuf_sp)(SI), DI // prepare stack as DI |
| 764 | MOVQ (g_sched+gobuf_pc)(SI), BP | | 776 | MOVQ (g_sched+gobuf_pc)(SI), BP |
| 765 | MOVQ BP, -8(DI) | | 777 | MOVQ BP, -8(DI) |
| 766 | LEAQ -(8+8)(DI), SP | | 778 | LEAQ -(8+8)(DI), SP |
| 767 | MOVQ R8, 0(SP) | | 779 | MOVQ R8, 0(SP) |
| 768 | CALL runtime·cgocallbackg(SB) | | 780 | CALL runtime·cgocallbackg(SB) |
| 769 | MOVQ 0(SP), R8 | | 781 | MOVQ 0(SP), R8 |
| | | |
| // Restore g->sched (== m->curg->sched) from saved values. | | // Restore g->sched (== m->curg->sched) from saved values. |
| get_tls(CX) | | get_tls(CX) |
| 773 | MOVQ g(CX), SI | | 785 | MOVQ g(CX), SI |
| 774 | MOVQ 8(SP), BP | | 786 | MOVQ 8(SP), BP |
| 775 | MOVQ BP, (g_sched+gobuf_pc)(SI) | | 787 | MOVQ BP, (g_sched+gobuf_pc)(SI) |
| 776 | LEAQ (8+8)(SP), DI | | 788 | LEAQ (8+8)(SP), DI |
| 777 | MOVQ DI, (g_sched+gobuf_sp)(SI) | | 789 | MOVQ DI, (g_sched+gobuf_sp)(SI) |
| | | |
| // Switch back to m->g0's stack and restore m->g0->sched.sp. | | // Switch back to m->g0's stack and restore m->g0->sched.sp. |
| // (Unlike m->curg, the g0 goroutine never uses sched.pc, | | // (Unlike m->curg, the g0 goroutine never uses sched.pc, |
| // so we do not have to restore it.) | | // so we do not have to restore it.) |
| 782 | MOVQ g(CX), BP | | 794 | MOVQ g(CX), BP |
| 783 | MOVQ g_m(BP), BP | | 795 | MOVQ g_m(BP), BP |
| 784 | MOVQ m_g0(BP), SI | | 796 | MOVQ m_g0(BP), SI |
| 785 | MOVQ SI, g(CX) | | 797 | MOVQ SI, g(CX) |
| 786 | MOVQ (g_sched+gobuf_sp)(SI), SP | | 798 | MOVQ (g_sched+gobuf_sp)(SI), SP |
| 787 | MOVQ 0(SP), AX | | 799 | MOVQ 0(SP), AX |
| 788 | MOVQ AX, (g_sched+gobuf_sp)(SI) | | 800 | MOVQ AX, (g_sched+gobuf_sp)(SI) |
| 789 |
| | 801 |
|
| // If the m on entry was nil, we called needm above to borrow an m | | // If the m on entry was nil, we called needm above to borrow an m |
| // for the duration of the call. Since the call is over, return it with dropm. | | // for the duration of the call. Since the call is over, return it with dropm. |
| 792 | CMPQ R8, $0 | | 804 | CMPQ R8, $0 |
| 793 | JNE 3(PC) | | 805 | JNE 3(PC) |
| 794 | MOVQ $runtime·dropm(SB), AX | | 806 | MOVQ $runtime·dropm(SB), AX |
| 795 | CALL AX | | 807 | CALL AX |
| | | |
| // Done! | | // Done! |
| RET | | RET |
| | | |
| // void setg(G*); set g. for use by needm. | | // void setg(G*); set g. for use by needm. |
| TEXT runtime·setg(SB), NOSPLIT, $0-8 | | TEXT runtime·setg(SB), NOSPLIT, $0-8 |
| 802 | MOVQ gg+0(FP), BX | | 814 | MOVQ gg+0(FP), BX |
| | | | 815 |
|
| #ifdef GOOS_windows | | #ifdef GOOS_windows |
| 804 | CMPQ BX, $0 | | 817 | CMPQ BX, $0 |
| 805 | JNE settls | | 818 | JNE settls |
| 806 | MOVQ $0, 0x28(GS) | | 819 | MOVQ $0, 0x28(GS) |
| RET | | RET |
| | | | 821 |
|
| settls: | | settls: |
| 809 | MOVQ g_m(BX), AX | | 823 | MOVQ g_m(BX), AX |
| 810 | LEAQ m_tls(AX), AX | | 824 | LEAQ m_tls(AX), AX |
| 811 | MOVQ AX, 0x28(GS) | | 825 | MOVQ AX, 0x28(GS) |
| | | | 826 |
|
| #endif | | #endif |
| get_tls(CX) | | get_tls(CX) |
| 814 | MOVQ BX, g(CX) | | 829 | MOVQ BX, g(CX) |
| RET | | RET |
| | | |
| // void setg_gcc(G*); set g called from gcc. | | // void setg_gcc(G*); set g called from gcc. |
| 818 | TEXT setg_gcc<>(SB),NOSPLIT,$0 | | 833 | TEXT setg_gcc<>(SB), NOSPLIT, $0 |
| get_tls(AX) | | get_tls(AX) |
| 820 | MOVQ DI, g(AX) | | 835 | MOVQ DI, g(AX) |
| RET | | RET |
| | | |
| // check that SP is in range [g->stack.lo, g->stack.hi) | | // check that SP is in range [g->stack.lo, g->stack.hi) |
| TEXT runtime·stackcheck(SB), NOSPLIT, $0-0 | | TEXT runtime·stackcheck(SB), NOSPLIT, $0-0 |
| get_tls(CX) | | get_tls(CX) |
| 826 | MOVQ g(CX), AX | | 841 | MOVQ g(CX), AX |
| 827 | CMPQ (g_stack+stack_hi)(AX), SP | | 842 | CMPQ (g_stack+stack_hi)(AX), SP |
| 828 | JHI 2(PC) | | 843 | JHI 2(PC) |
| 829 | INT $3 | | 844 | INT $3 |
| 830 | CMPQ SP, (g_stack+stack_lo)(AX) | | 845 | CMPQ SP, (g_stack+stack_lo)(AX) |
| 831 | JHI 2(PC) | | 846 | JHI 2(PC) |
| 832 | INT $3 | | 847 | INT $3 |
| RET | | RET |
| | | |
| 835 | TEXT runtime·getcallerpc(SB),NOSPLIT,$0-16 | | 850 | TEXT runtime·getcallerpc(SB), NOSPLIT, $0-16 |
| 836 | MOVQ argp+0(FP),AX // addr of first arg | | 851 | MOVQ argp+0(FP), AX // addr of first arg |
| 837 | MOVQ -8(AX),AX // get calling pc | | 852 | MOVQ -8(AX), AX // get calling pc |
| 838 | MOVQ AX, ret+8(FP) | | 853 | MOVQ AX, ret+8(FP) |
| RET | | RET |
| | | |
| 841 | TEXT runtime·gogetcallerpc(SB),NOSPLIT,$0-16 | | 856 | TEXT runtime·gogetcallerpc(SB), NOSPLIT, $0-16 |
| 842 | MOVQ p+0(FP),AX // addr of first arg | | 857 | MOVQ p+0(FP), AX // addr of first arg |
| 843 | MOVQ -8(AX),AX // get calling pc | | 858 | MOVQ -8(AX), AX // get calling pc |
| 844 | MOVQ AX,ret+8(FP) | | 859 | MOVQ AX, ret+8(FP) |
| RET | | RET |
| | | |
| 847 | TEXT runtime·setcallerpc(SB),NOSPLIT,$0-16 | | 862 | TEXT runtime·setcallerpc(SB), NOSPLIT, $0-16 |
| 848 | MOVQ argp+0(FP),AX // addr of first arg | | 863 | MOVQ argp+0(FP), AX // addr of first arg |
| 849 | MOVQ pc+8(FP), BX | | 864 | MOVQ pc+8(FP), BX |
| 850 | MOVQ BX, -8(AX) // set calling pc | | 865 | MOVQ BX, -8(AX) // set calling pc |
| RET | | RET |
| | | |
| 853 | TEXT runtime·getcallersp(SB),NOSPLIT,$0-16 | | 868 | TEXT runtime·getcallersp(SB), NOSPLIT, $0-16 |
| 854 | MOVQ argp+0(FP), AX | | 869 | MOVQ argp+0(FP), AX |
| 855 | MOVQ AX, ret+8(FP) | | 870 | MOVQ AX, ret+8(FP) |
| RET | | RET |
| | | |
| // func gogetcallersp(p unsafe.Pointer) uintptr | | // func gogetcallersp(p unsafe.Pointer) uintptr |
| 859 | TEXT runtime·gogetcallersp(SB),NOSPLIT,$0-16 | | 874 | TEXT runtime·gogetcallersp(SB), NOSPLIT, $0-16 |
| 860 | MOVQ p+0(FP),AX // addr of first arg | | 875 | MOVQ p+0(FP), AX // addr of first arg |
| 861 | MOVQ AX, ret+8(FP) | | 876 | MOVQ AX, ret+8(FP) |
| RET | | RET |
| | | |
| // int64 runtime·cputicks(void) | | // int64 runtime·cputicks(void) |
| 865 | TEXT runtime·cputicks(SB),NOSPLIT,$0-0 | | 880 | TEXT runtime·cputicks(SB), NOSPLIT, $0-0 |
| RDTSC | | RDTSC |
| 867 | SHLQ $32, DX | | 882 | SHLQ $32, DX |
| 868 | ADDQ DX, AX | | 883 | ADDQ DX, AX |
| 869 | MOVQ AX, ret+0(FP) | | 884 | MOVQ AX, ret+0(FP) |
| RET | | RET |
| | | |
| // hash function using AES hardware instructions | | // hash function using AES hardware instructions |
| 873 | TEXT runtime·aeshash(SB),NOSPLIT,$0-32 | | 888 | TEXT runtime·aeshash(SB), NOSPLIT, $0-32 |
| 874 | MOVQ p+0(FP), AX // ptr to data | | 889 | MOVQ p+0(FP), AX // ptr to data |
| 875 | MOVQ s+8(FP), CX // size | | 890 | MOVQ s+8(FP), CX // size |
| 876 | JMP runtime·aeshashbody(SB) | | 891 | JMP runtime·aeshashbody(SB) |
| | | |
| 878 | TEXT runtime·aeshashstr(SB),NOSPLIT,$0-32 | | 893 | TEXT runtime·aeshashstr(SB), NOSPLIT, $0-32 |
| 879 | MOVQ p+0(FP), AX // ptr to string struct | | 894 | MOVQ p+0(FP), AX // ptr to string struct |
| | | | 895 |
|
| // s+8(FP) is ignored, it is always sizeof(String) | | // s+8(FP) is ignored, it is always sizeof(String) |
| 881 | MOVQ 8(AX), CX // length of string | | 897 | MOVQ 8(AX), CX // length of string |
| 882 | MOVQ (AX), AX // string data | | 898 | MOVQ (AX), AX // string data |
| 883 | JMP runtime·aeshashbody(SB) | | 899 | JMP runtime·aeshashbody(SB) |
| | | |
| // AX: data | | // AX: data |
| // CX: length | | // CX: length |
| 887 | TEXT runtime·aeshashbody(SB),NOSPLIT,$0-32 | | 903 | TEXT runtime·aeshashbody(SB), NOSPLIT, $0-32 |
| 888 | MOVQ h+16(FP), X0 // seed to low 64 bits of xmm0 | | 904 | MOVQ h+16(FP), X0 // seed to low 64 bits of xmm0 |
| 889 | PINSRQ $1, CX, X0 // size to high 64 bits of xmm0 | | 905 | PINSRQ $1, CX, X0 // size to high 64 bits of xmm0 |
| 890 | MOVO runtime·aeskeysched+0(SB), X2 | | 906 | MOVO runtime·aeskeysched+0(SB), X2 |
| 891 | MOVO runtime·aeskeysched+16(SB), X3 | | 907 | MOVO runtime·aeskeysched+16(SB), X3 |
| 892 | CMPQ CX, $16 | | 908 | CMPQ CX, $16 |
| 893 | JB aessmall | | 909 | JB aessmall |
| | | | 910 |
|
| aesloop: | | aesloop: |
| 895 | CMPQ CX, $16 | | 912 | CMPQ CX, $16 |
| 896 | JBE aesloopend | | 913 | JBE aesloopend |
| 897 | MOVOU (AX), X1 | | 914 | MOVOU (AX), X1 |
| 898 | AESENC X2, X0 | | 915 | AESENC X2, X0 |
| 899 | AESENC X1, X0 | | 916 | AESENC X1, X0 |
| 900 | SUBQ $16, CX | | 917 | SUBQ $16, CX |
| 901 | ADDQ $16, AX | | 918 | ADDQ $16, AX |
| 902 | JMP aesloop | | 919 | JMP aesloop |
| | | | 920 |
|
| // 1-16 bytes remaining | | // 1-16 bytes remaining |
| aesloopend: | | aesloopend: |
| // This load may overlap with the previous load above. | | // This load may overlap with the previous load above. |
| // We'll hash some bytes twice, but that's ok. | | // We'll hash some bytes twice, but that's ok. |
| 907 | MOVOU -16(AX)(CX*1), X1 | | 925 | MOVOU -16(AX)(CX*1), X1 |
| 908 | JMP partial | | 926 | JMP partial |
| | | | 927 |
|
| // 0-15 bytes | | // 0-15 bytes |
| aessmall: | | aessmall: |
| 911 | TESTQ CX, CX | | 930 | TESTQ CX, CX |
| 912 | JE finalize // 0 bytes | | 931 | JE finalize // 0 bytes |
| | | |
| 914 | CMPB AX, $0xf0 | | 933 | CMPB AX, $0xf0 |
| 915 | JA highpartial | | 934 | JA highpartial |
| | | |
| // 16 bytes loaded at this address won't cross | | // 16 bytes loaded at this address won't cross |
| // a page boundary, so we can load it directly. | | // a page boundary, so we can load it directly. |
| 919 | MOVOU (AX), X1 | | 938 | MOVOU (AX), X1 |
| 920 | ADDQ CX, CX | | 939 | ADDQ CX, CX |
| 921 | MOVQ $masks<>(SB), BP | | 940 | MOVQ $masks<>(SB), BP |
| 922 | PAND (BP)(CX*8), X1 | | 941 | PAND (BP)(CX*8), X1 |
| 923 | JMP partial | | 942 | JMP partial |
| | | | 943 |
|
| highpartial: | | highpartial: |
| // address ends in 1111xxxx. Might be up against | | // address ends in 1111xxxx. Might be up against |
| // a page boundary, so load ending at last byte. | | // a page boundary, so load ending at last byte. |
| // Then shift bytes down using pshufb. | | // Then shift bytes down using pshufb. |
| 928 | MOVOU -16(AX)(CX*1), X1 | | 948 | MOVOU -16(AX)(CX*1), X1 |
| 929 | ADDQ CX, CX | | 949 | ADDQ CX, CX |
| 930 | MOVQ $shifts<>(SB), BP | | 950 | MOVQ $shifts<>(SB), BP |
| 931 | PSHUFB (BP)(CX*8), X1 | | 951 | PSHUFB (BP)(CX*8), X1 |
| | | | 952 |
|
| partial: | | partial: |
| // incorporate partial block into hash | | // incorporate partial block into hash |
| 934 | AESENC X3, X0 | | 955 | AESENC X3, X0 |
| 935 | AESENC X1, X0 | | 956 | AESENC X1, X0 |
| | | | 957 |
|
| 936 | finalize: | | 958 | finalize: |
| // finalize hash | | // finalize hash |
| 938 | AESENC X2, X0 | | 960 | AESENC X2, X0 |
| 939 | AESENC X3, X0 | | 961 | AESENC X3, X0 |
| 940 | AESENC X2, X0 | | 962 | AESENC X2, X0 |
| 941 | MOVQ X0, res+24(FP) | | 963 | MOVQ X0, res+24(FP) |
| RET | | RET |
| | | |
| 944 | TEXT runtime·aeshash32(SB),NOSPLIT,$0-32 | | 966 | TEXT runtime·aeshash32(SB), NOSPLIT, $0-32 |
| 945 | MOVQ p+0(FP), AX // ptr to data | | 967 | MOVQ p+0(FP), AX // ptr to data |
| | | | 968 |
|
| // s+8(FP) is ignored, it is always sizeof(int32) | | // s+8(FP) is ignored, it is always sizeof(int32) |
| 947 | MOVQ h+16(FP), X0 // seed | | 970 | MOVQ h+16(FP), X0 // seed |
| 948 | PINSRD $2, (AX), X0 // data | | 971 | PINSRD $2, (AX), X0 // data |
| 949 | AESENC runtime·aeskeysched+0(SB), X0 | | 972 | AESENC runtime·aeskeysched+0(SB), X0 |
| 950 | AESENC runtime·aeskeysched+16(SB), X0 | | 973 | AESENC runtime·aeskeysched+16(SB), X0 |
| 951 | AESENC runtime·aeskeysched+0(SB), X0 | | 974 | AESENC runtime·aeskeysched+0(SB), X0 |
| 952 | MOVQ X0, ret+24(FP) | | 975 | MOVQ X0, ret+24(FP) |
| RET | | RET |
| | | |
| 955 | TEXT runtime·aeshash64(SB),NOSPLIT,$0-32 | | 978 | TEXT runtime·aeshash64(SB), NOSPLIT, $0-32 |
| 956 | MOVQ p+0(FP), AX // ptr to data | | 979 | MOVQ p+0(FP), AX // ptr to data |
| | | | 980 |
|
| // s+8(FP) is ignored, it is always sizeof(int64) | | // s+8(FP) is ignored, it is always sizeof(int64) |
| 958 | MOVQ h+16(FP), X0 // seed | | 982 | MOVQ h+16(FP), X0 // seed |
| 959 | PINSRQ $1, (AX), X0 // data | | 983 | PINSRQ $1, (AX), X0 // data |
| 960 | AESENC runtime·aeskeysched+0(SB), X0 | | 984 | AESENC runtime·aeskeysched+0(SB), X0 |
| 961 | AESENC runtime·aeskeysched+16(SB), X0 | | 985 | AESENC runtime·aeskeysched+16(SB), X0 |
| 962 | AESENC runtime·aeskeysched+0(SB), X0 | | 986 | AESENC runtime·aeskeysched+0(SB), X0 |
| 963 | MOVQ X0, ret+24(FP) | | 987 | MOVQ X0, ret+24(FP) |
| RET | | RET |
| | | |
| // simple mask to get rid of data in the high part of the register. | | // simple mask to get rid of data in the high part of the register. |
| DATA masks<>+0x00(SB)/8, $0x0000000000000000 | | DATA masks<>+0x00(SB)/8, $0x0000000000000000 |
| DATA masks<>+0x08(SB)/8, $0x0000000000000000 | | DATA masks<>+0x08(SB)/8, $0x0000000000000000 |
| DATA masks<>+0x10(SB)/8, $0x00000000000000ff | | DATA masks<>+0x10(SB)/8, $0x00000000000000ff |
| DATA masks<>+0x18(SB)/8, $0x0000000000000000 | | DATA masks<>+0x18(SB)/8, $0x0000000000000000 |
| DATA masks<>+0x20(SB)/8, $0x000000000000ffff | | DATA masks<>+0x20(SB)/8, $0x000000000000ffff |
| DATA masks<>+0x28(SB)/8, $0x0000000000000000 | | DATA masks<>+0x28(SB)/8, $0x0000000000000000 |
| DATA masks<>+0x30(SB)/8, $0x0000000000ffffff | | DATA masks<>+0x30(SB)/8, $0x0000000000ffffff |
| DATA masks<>+0x38(SB)/8, $0x0000000000000000 | | DATA masks<>+0x38(SB)/8, $0x0000000000000000 |
| DATA masks<>+0x40(SB)/8, $0x00000000ffffffff | | DATA masks<>+0x40(SB)/8, $0x00000000ffffffff |
| DATA masks<>+0x48(SB)/8, $0x0000000000000000 | | DATA masks<>+0x48(SB)/8, $0x0000000000000000 |
| DATA masks<>+0x50(SB)/8, $0x000000ffffffffff | | DATA masks<>+0x50(SB)/8, $0x000000ffffffffff |
| DATA masks<>+0x58(SB)/8, $0x0000000000000000 | | DATA masks<>+0x58(SB)/8, $0x0000000000000000 |
| DATA masks<>+0x60(SB)/8, $0x0000ffffffffffff | | DATA masks<>+0x60(SB)/8, $0x0000ffffffffffff |
| DATA masks<>+0x68(SB)/8, $0x0000000000000000 | | DATA masks<>+0x68(SB)/8, $0x0000000000000000 |
| DATA masks<>+0x70(SB)/8, $0x00ffffffffffffff | | DATA masks<>+0x70(SB)/8, $0x00ffffffffffffff |
| DATA masks<>+0x78(SB)/8, $0x0000000000000000 | | DATA masks<>+0x78(SB)/8, $0x0000000000000000 |
| DATA masks<>+0x80(SB)/8, $0xffffffffffffffff | | DATA masks<>+0x80(SB)/8, $0xffffffffffffffff |
| DATA masks<>+0x88(SB)/8, $0x0000000000000000 | | DATA masks<>+0x88(SB)/8, $0x0000000000000000 |
| DATA masks<>+0x90(SB)/8, $0xffffffffffffffff | | DATA masks<>+0x90(SB)/8, $0xffffffffffffffff |
| DATA masks<>+0x98(SB)/8, $0x00000000000000ff | | DATA masks<>+0x98(SB)/8, $0x00000000000000ff |
| DATA masks<>+0xa0(SB)/8, $0xffffffffffffffff | | DATA masks<>+0xa0(SB)/8, $0xffffffffffffffff |
| DATA masks<>+0xa8(SB)/8, $0x000000000000ffff | | DATA masks<>+0xa8(SB)/8, $0x000000000000ffff |
| DATA masks<>+0xb0(SB)/8, $0xffffffffffffffff | | DATA masks<>+0xb0(SB)/8, $0xffffffffffffffff |
| DATA masks<>+0xb8(SB)/8, $0x0000000000ffffff | | DATA masks<>+0xb8(SB)/8, $0x0000000000ffffff |
| DATA masks<>+0xc0(SB)/8, $0xffffffffffffffff | | DATA masks<>+0xc0(SB)/8, $0xffffffffffffffff |
| DATA masks<>+0xc8(SB)/8, $0x00000000ffffffff | | DATA masks<>+0xc8(SB)/8, $0x00000000ffffffff |
| DATA masks<>+0xd0(SB)/8, $0xffffffffffffffff | | DATA masks<>+0xd0(SB)/8, $0xffffffffffffffff |
| DATA masks<>+0xd8(SB)/8, $0x000000ffffffffff | | DATA masks<>+0xd8(SB)/8, $0x000000ffffffffff |
| DATA masks<>+0xe0(SB)/8, $0xffffffffffffffff | | DATA masks<>+0xe0(SB)/8, $0xffffffffffffffff |
| DATA masks<>+0xe8(SB)/8, $0x0000ffffffffffff | | DATA masks<>+0xe8(SB)/8, $0x0000ffffffffffff |
| DATA masks<>+0xf0(SB)/8, $0xffffffffffffffff | | DATA masks<>+0xf0(SB)/8, $0xffffffffffffffff |
| DATA masks<>+0xf8(SB)/8, $0x00ffffffffffffff | | DATA masks<>+0xf8(SB)/8, $0x00ffffffffffffff |
| 999 | GLOBL masks<>(SB),RODATA,$256 | | 1023 | GLOBL masks<>(SB), RODATA, $256 |
| | | |
| // these are arguments to pshufb. They move data down from | | // these are arguments to pshufb. They move data down from |
| // the high bytes of the register to the low bytes of the register. | | // the high bytes of the register to the low bytes of the register. |
| // index is how many bytes to move. | | // index is how many bytes to move. |
| DATA shifts<>+0x00(SB)/8, $0x0000000000000000 | | DATA shifts<>+0x00(SB)/8, $0x0000000000000000 |
| DATA shifts<>+0x08(SB)/8, $0x0000000000000000 | | DATA shifts<>+0x08(SB)/8, $0x0000000000000000 |
| DATA shifts<>+0x10(SB)/8, $0xffffffffffffff0f | | DATA shifts<>+0x10(SB)/8, $0xffffffffffffff0f |
| DATA shifts<>+0x18(SB)/8, $0xffffffffffffffff | | DATA shifts<>+0x18(SB)/8, $0xffffffffffffffff |
| DATA shifts<>+0x20(SB)/8, $0xffffffffffff0f0e | | DATA shifts<>+0x20(SB)/8, $0xffffffffffff0f0e |
| DATA shifts<>+0x28(SB)/8, $0xffffffffffffffff | | DATA shifts<>+0x28(SB)/8, $0xffffffffffffffff |
| DATA shifts<>+0x30(SB)/8, $0xffffffffff0f0e0d | | DATA shifts<>+0x30(SB)/8, $0xffffffffff0f0e0d |
| DATA shifts<>+0x38(SB)/8, $0xffffffffffffffff | | DATA shifts<>+0x38(SB)/8, $0xffffffffffffffff |
| DATA shifts<>+0x40(SB)/8, $0xffffffff0f0e0d0c | | DATA shifts<>+0x40(SB)/8, $0xffffffff0f0e0d0c |
| DATA shifts<>+0x48(SB)/8, $0xffffffffffffffff | | DATA shifts<>+0x48(SB)/8, $0xffffffffffffffff |
| DATA shifts<>+0x50(SB)/8, $0xffffff0f0e0d0c0b | | DATA shifts<>+0x50(SB)/8, $0xffffff0f0e0d0c0b |
| DATA shifts<>+0x58(SB)/8, $0xffffffffffffffff | | DATA shifts<>+0x58(SB)/8, $0xffffffffffffffff |
| DATA shifts<>+0x60(SB)/8, $0xffff0f0e0d0c0b0a | | DATA shifts<>+0x60(SB)/8, $0xffff0f0e0d0c0b0a |
| DATA shifts<>+0x68(SB)/8, $0xffffffffffffffff | | DATA shifts<>+0x68(SB)/8, $0xffffffffffffffff |
| DATA shifts<>+0x70(SB)/8, $0xff0f0e0d0c0b0a09 | | DATA shifts<>+0x70(SB)/8, $0xff0f0e0d0c0b0a09 |
| DATA shifts<>+0x78(SB)/8, $0xffffffffffffffff | | DATA shifts<>+0x78(SB)/8, $0xffffffffffffffff |
| DATA shifts<>+0x80(SB)/8, $0x0f0e0d0c0b0a0908 | | DATA shifts<>+0x80(SB)/8, $0x0f0e0d0c0b0a0908 |
| DATA shifts<>+0x88(SB)/8, $0xffffffffffffffff | | DATA shifts<>+0x88(SB)/8, $0xffffffffffffffff |
| DATA shifts<>+0x90(SB)/8, $0x0e0d0c0b0a090807 | | DATA shifts<>+0x90(SB)/8, $0x0e0d0c0b0a090807 |
| DATA shifts<>+0x98(SB)/8, $0xffffffffffffff0f | | DATA shifts<>+0x98(SB)/8, $0xffffffffffffff0f |
| DATA shifts<>+0xa0(SB)/8, $0x0d0c0b0a09080706 | | DATA shifts<>+0xa0(SB)/8, $0x0d0c0b0a09080706 |
| DATA shifts<>+0xa8(SB)/8, $0xffffffffffff0f0e | | DATA shifts<>+0xa8(SB)/8, $0xffffffffffff0f0e |
| DATA shifts<>+0xb0(SB)/8, $0x0c0b0a0908070605 | | DATA shifts<>+0xb0(SB)/8, $0x0c0b0a0908070605 |
| DATA shifts<>+0xb8(SB)/8, $0xffffffffff0f0e0d | | DATA shifts<>+0xb8(SB)/8, $0xffffffffff0f0e0d |
| DATA shifts<>+0xc0(SB)/8, $0x0b0a090807060504 | | DATA shifts<>+0xc0(SB)/8, $0x0b0a090807060504 |
| DATA shifts<>+0xc8(SB)/8, $0xffffffff0f0e0d0c | | DATA shifts<>+0xc8(SB)/8, $0xffffffff0f0e0d0c |
| DATA shifts<>+0xd0(SB)/8, $0x0a09080706050403 | | DATA shifts<>+0xd0(SB)/8, $0x0a09080706050403 |
| DATA shifts<>+0xd8(SB)/8, $0xffffff0f0e0d0c0b | | DATA shifts<>+0xd8(SB)/8, $0xffffff0f0e0d0c0b |
| DATA shifts<>+0xe0(SB)/8, $0x0908070605040302 | | DATA shifts<>+0xe0(SB)/8, $0x0908070605040302 |
| DATA shifts<>+0xe8(SB)/8, $0xffff0f0e0d0c0b0a | | DATA shifts<>+0xe8(SB)/8, $0xffff0f0e0d0c0b0a |
| DATA shifts<>+0xf0(SB)/8, $0x0807060504030201 | | DATA shifts<>+0xf0(SB)/8, $0x0807060504030201 |
| DATA shifts<>+0xf8(SB)/8, $0xff0f0e0d0c0b0a09 | | DATA shifts<>+0xf8(SB)/8, $0xff0f0e0d0c0b0a09 |
| 1036 | GLOBL shifts<>(SB),RODATA,$256 | | 1060 | GLOBL shifts<>(SB), RODATA, $256 |
| | | |
| 1038 | TEXT runtime·memeq(SB),NOSPLIT,$0-25 | | 1062 | TEXT runtime·memeq(SB), NOSPLIT, $0-25 |
| 1039 | MOVQ a+0(FP), SI | | 1063 | MOVQ a+0(FP), SI |
| 1040 | MOVQ b+8(FP), DI | | 1064 | MOVQ b+8(FP), DI |
| 1041 | MOVQ size+16(FP), BX | | 1065 | MOVQ size+16(FP), BX |
| 1042 | CALL runtime·memeqbody(SB) | | 1066 | CALL runtime·memeqbody(SB) |
| 1043 | MOVB AX, ret+24(FP) | | 1067 | MOVB AX, ret+24(FP) |
| RET | | RET |
| | | |
| // eqstring tests whether two strings are equal. | | // eqstring tests whether two strings are equal. |
| // See runtime_test.go:eqstring_generic for | | // See runtime_test.go:eqstring_generic for |
| // equivalent Go code. | | // equivalent Go code. |
| 1049 | TEXT runtime·eqstring(SB),NOSPLIT,$0-33 | | 1073 | TEXT runtime·eqstring(SB), NOSPLIT, $0-33 |
| 1050 | MOVQ s1len+8(FP), AX | | 1074 | MOVQ s1len+8(FP), AX |
| 1051 | MOVQ s2len+24(FP), BX | | 1075 | MOVQ s2len+24(FP), BX |
| 1052 | CMPQ AX, BX | | 1076 | CMPQ AX, BX |
| 1053 | JNE different | | 1077 | JNE different |
| 1054 | MOVQ s1str+0(FP), SI | | 1078 | MOVQ s1str+0(FP), SI |
| 1055 | MOVQ s2str+16(FP), DI | | 1079 | MOVQ s2str+16(FP), DI |
| 1056 | CMPQ SI, DI | | 1080 | CMPQ SI, DI |
| 1057 | JEQ same | | 1081 | JEQ same |
| 1058 | CALL runtime·memeqbody(SB) | | 1082 | CALL runtime·memeqbody(SB) |
| 1059 | MOVB AX, v+32(FP) | | 1083 | MOVB AX, v+32(FP) |
| RET | | RET |
| | | | 1085 |
|
| same: | | same: |
| 1062 | MOVB $1, v+32(FP) | | 1087 | MOVB $1, v+32(FP) |
| RET | | RET |
| | | | 1089 |
|
| different: | | different: |
| 1065 | MOVB $0, v+32(FP) | | 1091 | MOVB $0, v+32(FP) |
| RET | | RET |
| | | |
| // a in SI | | // a in SI |
| // b in DI | | // b in DI |
| // count in BX | | // count in BX |
| 1071 | TEXT runtime·memeqbody(SB),NOSPLIT,$0-0 | | 1097 | TEXT runtime·memeqbody(SB), NOSPLIT, $0-0 |
| 1072 | XORQ AX, AX | | 1098 | XORQ AX, AX |
| | | |
| 1074 | CMPQ BX, $8 | | 1100 | CMPQ BX, $8 |
| 1075 | JB small | | 1101 | JB small |
| 1076 |
| | 1102 |
|
| // 64 bytes at a time using xmm registers | | // 64 bytes at a time using xmm registers |
| hugeloop: | | hugeloop: |
| 1079 | CMPQ BX, $64 | | 1105 | CMPQ BX, $64 |
| 1080 | JB bigloop | | 1106 | JB bigloop |
| 1081 | MOVOU (SI), X0 | | 1107 | MOVOU (SI), X0 |
| 1082 | MOVOU (DI), X1 | | 1108 | MOVOU (DI), X1 |
| 1083 | MOVOU 16(SI), X2 | | 1109 | MOVOU 16(SI), X2 |
| 1084 | MOVOU 16(DI), X3 | | 1110 | MOVOU 16(DI), X3 |
| 1085 | MOVOU 32(SI), X4 | | 1111 | MOVOU 32(SI), X4 |
| 1086 | MOVOU 32(DI), X5 | | 1112 | MOVOU 32(DI), X5 |
| 1087 | MOVOU 48(SI), X6 | | 1113 | MOVOU 48(SI), X6 |
| 1088 | MOVOU 48(DI), X7 | | 1114 | MOVOU 48(DI), X7 |
| 1089 | PCMPEQB X1, X0 | | 1115 | PCMPEQB X1, X0 |
| 1090 | PCMPEQB X3, X2 | | 1116 | PCMPEQB X3, X2 |
| 1091 | PCMPEQB X5, X4 | | 1117 | PCMPEQB X5, X4 |
| 1092 | PCMPEQB X7, X6 | | 1118 | PCMPEQB X7, X6 |
| 1093 | PAND X2, X0 | | 1119 | PAND X2, X0 |
| 1094 | PAND X6, X4 | | 1120 | PAND X6, X4 |
| 1095 | PAND X4, X0 | | 1121 | PAND X4, X0 |
| PMOVMSKB X0, DX | | PMOVMSKB X0, DX |
| 1097 | ADDQ $64, SI | | 1123 | ADDQ $64, SI |
| 1098 | ADDQ $64, DI | | 1124 | ADDQ $64, DI |
| 1099 | SUBQ $64, BX | | 1125 | SUBQ $64, BX |
| 1100 | CMPL DX, $0xffff | | 1126 | CMPL DX, $0xffff |
| 1101 | JEQ hugeloop | | 1127 | JEQ hugeloop |
| RET | | RET |
| | | |
| 1104 | // 8 bytes at a time using 64-bit register | | 1130 | // 8 bytes at a time using 64-bit register |
| bigloop: | | bigloop: |
| 1106 | CMPQ BX, $8 | | 1132 | CMPQ BX, $8 |
| 1107 | JBE leftover | | 1133 | JBE leftover |
| 1108 | MOVQ (SI), CX | | 1134 | MOVQ (SI), CX |
| 1109 | MOVQ (DI), DX | | 1135 | MOVQ (DI), DX |
| 1110 | ADDQ $8, SI | | 1136 | ADDQ $8, SI |
| 1111 | ADDQ $8, DI | | 1137 | ADDQ $8, DI |
| 1112 | SUBQ $8, BX | | 1138 | SUBQ $8, BX |
| 1113 | CMPQ CX, DX | | 1139 | CMPQ CX, DX |
| 1114 | JEQ bigloop | | 1140 | JEQ bigloop |
| RET | | RET |
| | | |
| 1117 | // remaining 0-8 bytes | | 1143 | // remaining 0-8 bytes |
| leftover: | | leftover: |
| 1119 | MOVQ -8(SI)(BX*1), CX | | 1145 | MOVQ -8(SI)(BX*1), CX |
| 1120 | MOVQ -8(DI)(BX*1), DX | | 1146 | MOVQ -8(DI)(BX*1), DX |
| 1121 | CMPQ CX, DX | | 1147 | CMPQ CX, DX |
| 1122 | SETEQ AX | | 1148 | SETEQ AX |
| RET | | RET |
| | | |
| small: | | small: |
| 1126 | CMPQ BX, $0 | | 1152 | CMPQ BX, $0 |
| 1127 | JEQ equal | | 1153 | JEQ equal |
| | | |
| 1129 | LEAQ 0(BX*8), CX | | 1155 | LEAQ 0(BX*8), CX |
| 1130 | NEGQ CX | | 1156 | NEGQ CX |
| | | |
| 1132 | CMPB SI, $0xf8 | | 1158 | CMPB SI, $0xf8 |
| 1133 | JA si_high | | 1159 | JA si_high |
| | | |
| // load at SI won't cross a page boundary. | | // load at SI won't cross a page boundary. |
| 1136 | MOVQ (SI), SI | | 1162 | MOVQ (SI), SI |
| 1137 | JMP si_finish | | 1163 | JMP si_finish |
| | | | 1164 |
|
| si_high: | | si_high: |
| // address ends in 11111xxx. Load up to bytes we want, move to correct position. | | // address ends in 11111xxx. Load up to bytes we want, move to correct position. |
| 1140 | MOVQ -8(SI)(BX*1), SI | | 1167 | MOVQ -8(SI)(BX*1), SI |
| 1141 | SHRQ CX, SI | | 1168 | SHRQ CX, SI |
| | | | 1169 |
|
| si_finish: | | si_finish: |
| | | |
| // same for DI. | | // same for DI. |
| 1145 | CMPB DI, $0xf8 | | 1173 | CMPB DI, $0xf8 |
| 1146 | JA di_high | | 1174 | JA di_high |
| 1147 | MOVQ (DI), DI | | 1175 | MOVQ (DI), DI |
| 1148 | JMP di_finish | | 1176 | JMP di_finish |
| | | | 1177 |
|
| di_high: | | di_high: |
| 1150 | MOVQ -8(DI)(BX*1), DI | | 1179 | MOVQ -8(DI)(BX*1), DI |
| 1151 | SHRQ CX, DI | | 1180 | SHRQ CX, DI |
| | | | 1181 |
|
| di_finish: | | di_finish: |
| | | |
| 1154 | SUBQ SI, DI | | 1184 | SUBQ SI, DI |
| 1155 | SHLQ CX, DI | | 1185 | SHLQ CX, DI |
| | | | 1186 |
|
| equal: | | equal: |
| 1157 | SETEQ AX | | 1188 | SETEQ AX |
| RET | | RET |
| | | |
| 1160 | TEXT runtime·cmpstring(SB),NOSPLIT,$0-40 | | 1191 | TEXT runtime·cmpstring(SB), NOSPLIT, $0-40 |
| 1161 | MOVQ s1_base+0(FP), SI | | 1192 | MOVQ s1_base+0(FP), SI |
| 1162 | MOVQ s1_len+8(FP), BX | | 1193 | MOVQ s1_len+8(FP), BX |
| 1163 | MOVQ s2_base+16(FP), DI | | 1194 | MOVQ s2_base+16(FP), DI |
| 1164 | MOVQ s2_len+24(FP), DX | | 1195 | MOVQ s2_len+24(FP), DX |
| 1165 | CALL runtime·cmpbody(SB) | | 1196 | CALL runtime·cmpbody(SB) |
| 1166 | MOVQ AX, ret+32(FP) | | 1197 | MOVQ AX, ret+32(FP) |
| RET | | RET |
| | | |
| 1169 | TEXT runtime·cmpbytes(SB),NOSPLIT,$0-56 | | 1200 | TEXT runtime·cmpbytes(SB), NOSPLIT, $0-56 |
| 1170 | MOVQ s1+0(FP), SI | | 1201 | MOVQ s1+0(FP), SI |
| 1171 | MOVQ s1+8(FP), BX | | 1202 | MOVQ s1+8(FP), BX |
| 1172 | MOVQ s2+24(FP), DI | | 1203 | MOVQ s2+24(FP), DI |
| 1173 | MOVQ s2+32(FP), DX | | 1204 | MOVQ s2+32(FP), DX |
| 1174 | CALL runtime·cmpbody(SB) | | 1205 | CALL runtime·cmpbody(SB) |
| 1175 | MOVQ AX, res+48(FP) | | 1206 | MOVQ AX, res+48(FP) |
| RET | | RET |
| | | |
| // input: | | // input: |
| // SI = a | | // SI = a |
| // DI = b | | // DI = b |
| // BX = alen | | // BX = alen |
| // DX = blen | | // DX = blen |
| // output: | | // output: |
| // AX = 1/0/-1 | | // AX = 1/0/-1 |
| 1185 | TEXT runtime·cmpbody(SB),NOSPLIT,$0-0 | | 1216 | TEXT runtime·cmpbody(SB), NOSPLIT, $0-0 |
| 1186 | CMPQ SI, DI | | 1217 | CMPQ SI, DI |
| 1187 | JEQ cmp_allsame | | 1218 | JEQ cmp_allsame |
| 1188 | CMPQ BX, DX | | 1219 | CMPQ BX, DX |
| 1189 | MOVQ DX, BP | | 1220 | MOVQ DX, BP |
| 1190 | CMOVQLT BX, BP // BP = min(alen, blen) = # of bytes to compare | | 1221 | CMOVQLT BX, BP // BP = min(alen, blen) = # of bytes to compare |
| 1191 | CMPQ BP, $8 | | 1222 | CMPQ BP, $8 |
| 1192 | JB cmp_small | | 1223 | JB cmp_small |
| | | |
| cmp_loop: | | cmp_loop: |
| 1195 | CMPQ BP, $16 | | 1226 | CMPQ BP, $16 |
| 1196 | JBE cmp_0through16 | | 1227 | JBE cmp_0through16 |
| 1197 | MOVOU (SI), X0 | | 1228 | MOVOU (SI), X0 |
| 1198 | MOVOU (DI), X1 | | 1229 | MOVOU (DI), X1 |
| 1199 | PCMPEQB X0, X1 | | 1230 | PCMPEQB X0, X1 |
| PMOVMSKB X1, AX | | PMOVMSKB X1, AX |
| 1201 | XORQ $0xffff, AX // convert EQ to NE | | 1232 | XORQ $0xffff, AX // convert EQ to NE |
| 1202 | JNE cmp_diff16 // branch if at least one byte is not equal | | 1233 | JNE cmp_diff16 // branch if at least one byte is not equal |
| 1203 | ADDQ $16, SI | | 1234 | ADDQ $16, SI |
| 1204 | ADDQ $16, DI | | 1235 | ADDQ $16, DI |
| 1205 | SUBQ $16, BP | | 1236 | SUBQ $16, BP |
| 1206 | JMP cmp_loop | | 1237 | JMP cmp_loop |
| 1207 |
| | 1238 |
|
| 1208 | // AX = bit mask of differences | | 1239 | // AX = bit mask of differences |
| cmp_diff16: | | cmp_diff16: |
| 1210 | BSFQ AX, BX // index of first byte that differs | | 1241 | BSFQ AX, BX // index of first byte that differs |
| 1211 | XORQ AX, AX | | 1242 | XORQ AX, AX |
| 1212 | MOVB (SI)(BX*1), CX | | 1243 | MOVB (SI)(BX*1), CX |
| 1213 | CMPB CX, (DI)(BX*1) | | 1244 | CMPB CX, (DI)(BX*1) |
| 1214 | SETHI AX | | 1245 | SETHI AX |
| 1215 | LEAQ -1(AX*2), AX // convert 1/0 to +1/-1 | | 1246 | LEAQ -1(AX*2), AX // convert 1/0 to +1/-1 |
| RET | | RET |
| | | |
| 1218 | // 0 through 16 bytes left, alen>=8, blen>=8 | | 1249 | // 0 through 16 bytes left, alen>=8, blen>=8 |
| cmp_0through16: | | cmp_0through16: |
| 1220 | CMPQ BP, $8 | | 1251 | CMPQ BP, $8 |
| 1221 | JBE cmp_0through8 | | 1252 | JBE cmp_0through8 |
| 1222 | MOVQ (SI), AX | | 1253 | MOVQ (SI), AX |
| 1223 | MOVQ (DI), CX | | 1254 | MOVQ (DI), CX |
| 1224 | CMPQ AX, CX | | 1255 | CMPQ AX, CX |
| 1225 | JNE cmp_diff8 | | 1256 | JNE cmp_diff8 |
| | | | 1257 |
|
| cmp_0through8: | | cmp_0through8: |
| 1227 | MOVQ -8(SI)(BP*1), AX | | 1259 | MOVQ -8(SI)(BP*1), AX |
| 1228 | MOVQ -8(DI)(BP*1), CX | | 1260 | MOVQ -8(DI)(BP*1), CX |
| 1229 | CMPQ AX, CX | | 1261 | CMPQ AX, CX |
| 1230 | JEQ cmp_allsame | | 1262 | JEQ cmp_allsame |
| | | |
| // AX and CX contain parts of a and b that differ. | | // AX and CX contain parts of a and b that differ. |
| cmp_diff8: | | cmp_diff8: |
| 1234 | BSWAPQ AX // reverse order of bytes | | 1266 | BSWAPQ AX // reverse order of bytes |
| 1235 | BSWAPQ CX | | 1267 | BSWAPQ CX |
| 1236 | XORQ AX, CX | | 1268 | XORQ AX, CX |
| 1237 | BSRQ CX, CX // index of highest bit difference | | 1269 | BSRQ CX, CX // index of highest bit difference |
| 1238 | SHRQ CX, AX // move a's bit to bottom | | 1270 | SHRQ CX, AX // move a's bit to bottom |
| 1239 | ANDQ $1, AX // mask bit | | 1271 | ANDQ $1, AX // mask bit |
| 1240 | LEAQ -1(AX*2), AX // 1/0 => +1/-1 | | 1272 | LEAQ -1(AX*2), AX // 1/0 => +1/-1 |
| RET | | RET |
| | | |
| 1243 | // 0-7 bytes in common | | 1275 | // 0-7 bytes in common |
| cmp_small: | | cmp_small: |
| 1245 | LEAQ (BP*8), CX // bytes left -> bits left | | 1277 | LEAQ (BP*8), CX // bytes left -> bits left |
| 1246 | NEGQ CX // - bits lift (== 64 - bits left mod 64) | | 1278 | NEGQ CX // - bits lift (== 64 - bits left mod 64) |
| 1247 | JEQ cmp_allsame | | 1279 | JEQ cmp_allsame |
| | | |
| // load bytes of a into high bytes of AX | | // load bytes of a into high bytes of AX |
| 1250 | CMPB SI, $0xf8 | | 1282 | CMPB SI, $0xf8 |
| 1251 | JA cmp_si_high | | 1283 | JA cmp_si_high |
| 1252 | MOVQ (SI), SI | | 1284 | MOVQ (SI), SI |
| 1253 | JMP cmp_si_finish | | 1285 | JMP cmp_si_finish |
| | | | 1286 |
|
| cmp_si_high: | | cmp_si_high: |
| 1255 | MOVQ -8(SI)(BP*1), SI | | 1288 | MOVQ -8(SI)(BP*1), SI |
| 1256 | SHRQ CX, SI | | 1289 | SHRQ CX, SI |
| | | | 1290 |
|
| cmp_si_finish: | | cmp_si_finish: |
| 1258 | SHLQ CX, SI | | 1292 | SHLQ CX, SI |
| | | |
| // load bytes of b in to high bytes of BX | | // load bytes of b in to high bytes of BX |
| 1261 | CMPB DI, $0xf8 | | 1295 | CMPB DI, $0xf8 |
| 1262 | JA cmp_di_high | | 1296 | JA cmp_di_high |
| 1263 | MOVQ (DI), DI | | 1297 | MOVQ (DI), DI |
| 1264 | JMP cmp_di_finish | | 1298 | JMP cmp_di_finish |
| | | | 1299 |
|
| cmp_di_high: | | cmp_di_high: |
| 1266 | MOVQ -8(DI)(BP*1), DI | | 1301 | MOVQ -8(DI)(BP*1), DI |
| 1267 | SHRQ CX, DI | | 1302 | SHRQ CX, DI |
| | | | 1303 |
|
| cmp_di_finish: | | cmp_di_finish: |
| 1269 | SHLQ CX, DI | | 1305 | SHLQ CX, DI |
| | | |
| 1271 | BSWAPQ SI // reverse order of bytes | | 1307 | BSWAPQ SI // reverse order of bytes |
| 1272 | BSWAPQ DI | | 1308 | BSWAPQ DI |
| 1273 | XORQ SI, DI // find bit differences | | 1309 | XORQ SI, DI // find bit differences |
| 1274 | JEQ cmp_allsame | | 1310 | JEQ cmp_allsame |
| 1275 | BSRQ DI, CX // index of highest bit difference | | 1311 | BSRQ DI, CX // index of highest bit difference |
| 1276 | SHRQ CX, SI // move a's bit to bottom | | 1312 | SHRQ CX, SI // move a's bit to bottom |
| 1277 | ANDQ $1, SI // mask bit | | 1313 | ANDQ $1, SI // mask bit |
| 1278 | LEAQ -1(SI*2), AX // 1/0 => +1/-1 | | 1314 | LEAQ -1(SI*2), AX // 1/0 => +1/-1 |
| RET | | RET |
| | | |
| cmp_allsame: | | cmp_allsame: |
| 1282 | XORQ AX, AX | | 1318 | XORQ AX, AX |
| 1283 | XORQ CX, CX | | 1319 | XORQ CX, CX |
| 1284 | CMPQ BX, DX | | 1320 | CMPQ BX, DX |
| 1285 | SETGT AX // 1 if alen > blen | | 1321 | SETGT AX // 1 if alen > blen |
| 1286 | SETEQ CX // 1 if alen == blen | | 1322 | SETEQ CX // 1 if alen == blen |
| 1287 | LEAQ -1(CX)(AX*2), AX // 1,0,-1 result | | 1323 | LEAQ -1(CX)(AX*2), AX // 1,0,-1 result |
| RET | | RET |
| | | |
| 1290 | TEXT bytes·IndexByte(SB),NOSPLIT,$0 | | 1326 | TEXT bytes·IndexByte(SB), NOSPLIT, $0 |
| MOVQ s+0(FP), SI | | MOVQ s+0(FP), SI |
| MOVQ s_len+8(FP), BX | | MOVQ s_len+8(FP), BX |
| MOVB c+24(FP), AL | | MOVB c+24(FP), AL |
| CALL runtime·indexbytebody(SB) | | CALL runtime·indexbytebody(SB) |
| MOVQ AX, ret+32(FP) | | MOVQ AX, ret+32(FP) |
| RET | | RET |
| | | |
| 1298 | TEXT strings·IndexByte(SB),NOSPLIT,$0 | | 1334 | TEXT strings·IndexByte(SB), NOSPLIT, $0 |
| MOVQ s+0(FP), SI | | MOVQ s+0(FP), SI |
| MOVQ s_len+8(FP), BX | | MOVQ s_len+8(FP), BX |
| MOVB c+16(FP), AL | | MOVB c+16(FP), AL |
| CALL runtime·indexbytebody(SB) | | CALL runtime·indexbytebody(SB) |
| MOVQ AX, ret+24(FP) | | MOVQ AX, ret+24(FP) |
| RET | | RET |
| | | |
| // input: | | // input: |
| // SI: data | | // SI: data |
| // BX: data len | | // BX: data len |
| // AL: byte sought | | // AL: byte sought |
| // output: | | // output: |
| // AX | | // AX |
| 1312 | TEXT runtime·indexbytebody(SB),NOSPLIT,$0 | | 1348 | TEXT runtime·indexbytebody(SB), NOSPLIT, $0 |
| MOVQ SI, DI | | MOVQ SI, DI |
| | | |
| CMPQ BX, $16 | | CMPQ BX, $16 |
| 1316 | JLT indexbyte_small | | 1352 | JLT indexbyte_small |
| | | |
| // round up to first 16-byte boundary | | // round up to first 16-byte boundary |
| TESTQ $15, SI | | TESTQ $15, SI |
| 1320 | JZ aligned | | 1356 | JZ aligned |
| 1321 | MOVQ SI, CX | | 1357 | MOVQ SI, CX |
| 1322 | ANDQ $~15, CX | | 1358 | ANDQ $~15, CX |
| 1323 | ADDQ $16, CX | | 1359 | ADDQ $16, CX |
| | | |
| // search the beginning | | // search the beginning |
| 1326 | SUBQ SI, CX | | 1362 | SUBQ SI, CX |
| REPN; SCASB | | REPN; SCASB |
| 1328 | JZ success | | 1364 | JZ success |
| | | |
| 1330 | // DI is 16-byte aligned; get ready to search using SSE instructions | | 1366 | // DI is 16-byte aligned; get ready to search using SSE instructions |
| aligned: | | aligned: |
| // round down to last 16-byte boundary | | // round down to last 16-byte boundary |
| MOVQ BX, R11 | | MOVQ BX, R11 |
| ADDQ SI, R11 | | ADDQ SI, R11 |
| ANDQ $~15, R11 | | ANDQ $~15, R11 |
| | | |
| // shuffle X0 around so that each byte contains c | | // shuffle X0 around so that each byte contains c |
| 1338 | MOVD AX, X0 | | 1374 | MOVD AX, X0 |
| PUNPCKLBW X0, X0 | | PUNPCKLBW X0, X0 |
| PUNPCKLBW X0, X0 | | PUNPCKLBW X0, X0 |
| 1341 | PSHUFL $0, X0, X0 | | 1377 | PSHUFL $0, X0, X0 |
| 1342 | JMP condition | | 1378 | JMP condition |
| | | |
| sse: | | sse: |
| // move the next 16-byte chunk of the buffer into X1 | | // move the next 16-byte chunk of the buffer into X1 |
| MOVO (DI), X1 | | MOVO (DI), X1 |
| | | | 1383 |
|
| // compare bytes in X0 to X1 | | // compare bytes in X0 to X1 |
| PCMPEQB X0, X1 | | PCMPEQB X0, X1 |
| | | | 1386 |
|
| // take the top bit of each byte in X1 and put the result in DX | | // take the top bit of each byte in X1 and put the result in DX |
| PMOVMSKB X1, DX | | PMOVMSKB X1, DX |
| 1351 | TESTL DX, DX | | 1389 | TESTL DX, DX |
| 1352 | JNZ ssesuccess | | 1390 | JNZ ssesuccess |
| 1353 | ADDQ $16, DI | | 1391 | ADDQ $16, DI |
| | | |
| condition: | | condition: |
| CMPQ DI, R11 | | CMPQ DI, R11 |
| 1357 | JLT sse | | 1395 | JLT sse |
| | | |
| // search the end | | // search the end |
| MOVQ SI, CX | | MOVQ SI, CX |
| ADDQ BX, CX | | ADDQ BX, CX |
| SUBQ R11, CX | | SUBQ R11, CX |
| | | | 1401 |
|
| // if CX == 0, the zero flag will be set and we'll end up | | // if CX == 0, the zero flag will be set and we'll end up |
| // returning a false success | | // returning a false success |
| 1365 | JZ failure | | 1404 | JZ failure |
| REPN; SCASB | | REPN; SCASB |
| 1367 | JZ success | | 1406 | JZ success |
| | | |
| failure: | | failure: |
| MOVQ $-1, AX | | MOVQ $-1, AX |
| RET | | RET |
| | | |
| // handle for lengths < 16 | | // handle for lengths < 16 |
| indexbyte_small: | | indexbyte_small: |
| 1375 | MOVQ BX, CX | | 1414 | MOVQ BX, CX |
| REPN; SCASB | | REPN; SCASB |
| 1377 | JZ success | | 1416 | JZ success |
| 1378 | MOVQ $-1, AX | | 1417 | MOVQ $-1, AX |
| RET | | RET |
| | | |
| // we've found the chunk containing the byte | | // we've found the chunk containing the byte |
| // now just figure out which specific byte it is | | // now just figure out which specific byte it is |
| ssesuccess: | | ssesuccess: |
| // get the index of the least significant set bit | | // get the index of the least significant set bit |
| BSFW DX, DX | | BSFW DX, DX |
| SUBQ SI, DI | | SUBQ SI, DI |
| ADDQ DI, DX | | ADDQ DI, DX |
| MOVQ DX, AX | | MOVQ DX, AX |
| RET | | RET |
| | | |
| success: | | success: |
| SUBQ SI, DI | | SUBQ SI, DI |
| SUBL $1, DI | | SUBL $1, DI |
| MOVQ DI, AX | | MOVQ DI, AX |
| RET | | RET |
| | | |
| 1397 | TEXT bytes·Equal(SB),NOSPLIT,$0-49 | | 1436 | TEXT bytes·Equal(SB), NOSPLIT, $0-49 |
| 1398 | MOVQ a_len+8(FP), BX | | 1437 | MOVQ a_len+8(FP), BX |
| 1399 | MOVQ b_len+32(FP), CX | | 1438 | MOVQ b_len+32(FP), CX |
| 1400 | XORQ AX, AX | | 1439 | XORQ AX, AX |
| 1401 | CMPQ BX, CX | | 1440 | CMPQ BX, CX |
| 1402 | JNE eqret | | 1441 | JNE eqret |
| 1403 | MOVQ a+0(FP), SI | | 1442 | MOVQ a+0(FP), SI |
| 1404 | MOVQ b+24(FP), DI | | 1443 | MOVQ b+24(FP), DI |
| 1405 | CALL runtime·memeqbody(SB) | | 1444 | CALL runtime·memeqbody(SB) |
| | | | 1445 |
|
| eqret: | | eqret: |
| 1407 | MOVB AX, ret+48(FP) | | 1447 | MOVB AX, ret+48(FP) |
| RET | | RET |
| | | |
| // A Duff's device for zeroing memory. | | // A Duff's device for zeroing memory. |
| // The compiler jumps to computed addresses within | | // The compiler jumps to computed addresses within |
| // this routine to zero chunks of memory. Do not | | // this routine to zero chunks of memory. Do not |
| // change this code without also changing the code | | // change this code without also changing the code |
| // in ../../cmd/6g/ggen.c:clearfat. | | // in ../../cmd/6g/ggen.c:clearfat. |
| // AX: zero | | // AX: zero |
| // DI: ptr to memory to be zeroed | | // DI: ptr to memory to be zeroed |
| // DI is updated as a side effect. | | // DI is updated as a side effect. |
| TEXT runtime·duffzero(SB), NOSPLIT, $0-0 | | TEXT runtime·duffzero(SB), NOSPLIT, $0-0 |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| STOSQ | | STOSQ |
| RET | | RET |
| | | |
| // A Duff's device for copying memory. | | // A Duff's device for copying memory. |
| // The compiler jumps to computed addresses within | | // The compiler jumps to computed addresses within |
| // this routine to copy chunks of memory. Source | | // this routine to copy chunks of memory. Source |
| // and destination must not overlap. Do not | | // and destination must not overlap. Do not |
| // change this code without also changing the code | | // change this code without also changing the code |
| // in ../../cmd/6g/cgen.c:sgen. | | // in ../../cmd/6g/cgen.c:sgen. |
| // SI: ptr to source memory | | // SI: ptr to source memory |
| // DI: ptr to destination memory | | // DI: ptr to destination memory |
| // SI and DI are updated as a side effect. | | // SI and DI are updated as a side effect. |
| | | |
| // NOTE: this is equivalent to a sequence of MOVSQ but | | // NOTE: this is equivalent to a sequence of MOVSQ but |
| // for some reason that is 3.5x slower than this code. | | // for some reason that is 3.5x slower than this code. |
| // The STOSQ above seem fine, though. | | // The STOSQ above seem fine, though. |
| TEXT runtime·duffcopy(SB), NOSPLIT, $0-0 | | TEXT runtime·duffcopy(SB), NOSPLIT, $0-0 |
| 1563 | MOVQ (SI),CX | | 1603 | MOVQ (SI), CX |
| 1564 | ADDQ $8,SI | | 1604 | ADDQ $8, SI |
| 1565 | MOVQ CX,(DI) | | 1605 | MOVQ CX, (DI) |
| 1566 | ADDQ $8,DI | | 1606 | ADDQ $8, DI |
| | | |
| 1568 | MOVQ (SI),CX | | 1608 | MOVQ (SI), CX |
| 1569 | ADDQ $8,SI | | 1609 | ADDQ $8, SI |
| 1570 | MOVQ CX,(DI) | | 1610 | MOVQ CX, (DI) |
| 1571 | ADDQ $8,DI | | 1611 | ADDQ $8, DI |
| | | |
| 1573 | MOVQ (SI),CX | | 1613 | MOVQ (SI), CX |
| 1574 | ADDQ $8,SI | | 1614 | ADDQ $8, SI |
| 1575 | MOVQ CX,(DI) | | 1615 | MOVQ CX, (DI) |
| 1576 | ADDQ $8,DI | | 1616 | ADDQ $8, DI |
| | | |
| 1578 | MOVQ (SI),CX | | 1618 | MOVQ (SI), CX |
| 1579 | ADDQ $8,SI | | 1619 | ADDQ $8, SI |
| 1580 | MOVQ CX,(DI) | | 1620 | MOVQ CX, (DI) |
| 1581 | ADDQ $8,DI | | 1621 | ADDQ $8, DI |
| | | |
| 1583 | MOVQ (SI),CX | | 1623 | MOVQ (SI), CX |
| 1584 | ADDQ $8,SI | | 1624 | ADDQ $8, SI |
| 1585 | MOVQ CX,(DI) | | 1625 | MOVQ CX, (DI) |
| 1586 | ADDQ $8,DI | | 1626 | ADDQ $8, DI |
| | | |
| 1588 | MOVQ (SI),CX | | 1628 | MOVQ (SI), CX |
| 1589 | ADDQ $8,SI | | 1629 | ADDQ $8, SI |
| 1590 | MOVQ CX,(DI) | | 1630 | MOVQ CX, (DI) |
| 1591 | ADDQ $8,DI | | 1631 | ADDQ $8, DI |
| | | |
| 1593 | MOVQ (SI),CX | | 1633 | MOVQ (SI), CX |
| 1594 | ADDQ $8,SI | | 1634 | ADDQ $8, SI |
| 1595 | MOVQ CX,(DI) | | 1635 | MOVQ CX, (DI) |
| 1596 | ADDQ $8,DI | | 1636 | ADDQ $8, DI |
| | | |
| 1598 | MOVQ (SI),CX | | 1638 | MOVQ (SI), CX |
| 1599 | ADDQ $8,SI | | 1639 | ADDQ $8, SI |
| 1600 | MOVQ CX,(DI) | | 1640 | MOVQ CX, (DI) |
| 1601 | ADDQ $8,DI | | 1641 | ADDQ $8, DI |
| | | |
| 1603 | MOVQ (SI),CX | | 1643 | MOVQ (SI), CX |
| 1604 | ADDQ $8,SI | | 1644 | ADDQ $8, SI |
| 1605 | MOVQ CX,(DI) | | 1645 | MOVQ CX, (DI) |
| 1606 | ADDQ $8,DI | | 1646 | ADDQ $8, DI |
| | | |
| 1608 | MOVQ (SI),CX | | 1648 | MOVQ (SI), CX |
| 1609 | ADDQ $8,SI | | 1649 | ADDQ $8, SI |
| 1610 | MOVQ CX,(DI) | | 1650 | MOVQ CX, (DI) |
| 1611 | ADDQ $8,DI | | 1651 | ADDQ $8, DI |
| | | |
| 1613 | MOVQ (SI),CX | | 1653 | MOVQ (SI), CX |
| 1614 | ADDQ $8,SI | | 1654 | ADDQ $8, SI |
| 1615 | MOVQ CX,(DI) | | 1655 | MOVQ CX, (DI) |
| 1616 | ADDQ $8,DI | | 1656 | ADDQ $8, DI |
| | | |
| 1618 | MOVQ (SI),CX | | 1658 | MOVQ (SI), CX |
| 1619 | ADDQ $8,SI | | 1659 | ADDQ $8, SI |
| 1620 | MOVQ CX,(DI) | | 1660 | MOVQ CX, (DI) |
| 1621 | ADDQ $8,DI | | 1661 | ADDQ $8, DI |
| | | |
| 1623 | MOVQ (SI),CX | | 1663 | MOVQ (SI), CX |
| 1624 | ADDQ $8,SI | | 1664 | ADDQ $8, SI |
| 1625 | MOVQ CX,(DI) | | 1665 | MOVQ CX, (DI) |
| 1626 | ADDQ $8,DI | | 1666 | ADDQ $8, DI |
| | | |
| 1628 | MOVQ (SI),CX | | 1668 | MOVQ (SI), CX |
| 1629 | ADDQ $8,SI | | 1669 | ADDQ $8, SI |
| 1630 | MOVQ CX,(DI) | | 1670 | MOVQ CX, (DI) |
| 1631 | ADDQ $8,DI | | 1671 | ADDQ $8, DI |
| | | |
| 1633 | MOVQ (SI),CX | | 1673 | MOVQ (SI), CX |
| 1634 | ADDQ $8,SI | | 1674 | ADDQ $8, SI |
| 1635 | MOVQ CX,(DI) | | 1675 | MOVQ CX, (DI) |
| 1636 | ADDQ $8,DI | | 1676 | ADDQ $8, DI |
| | | |
| 1638 | MOVQ (SI),CX | | 1678 | MOVQ (SI), CX |
| 1639 | ADDQ $8,SI | | 1679 | ADDQ $8, SI |
| 1640 | MOVQ CX,(DI) | | 1680 | MOVQ CX, (DI) |
| 1641 | ADDQ $8,DI | | 1681 | ADDQ $8, DI |
| | | |
| 1643 | MOVQ (SI),CX | | 1683 | MOVQ (SI), CX |
| 1644 | ADDQ $8,SI | | 1684 | ADDQ $8, SI |
| 1645 | MOVQ CX,(DI) | | 1685 | MOVQ CX, (DI) |
| 1646 | ADDQ $8,DI | | 1686 | ADDQ $8, DI |
| | | |
| 1648 | MOVQ (SI),CX | | 1688 | MOVQ (SI), CX |
| 1649 | ADDQ $8,SI | | 1689 | ADDQ $8, SI |
| 1650 | MOVQ CX,(DI) | | 1690 | MOVQ CX, (DI) |
| 1651 | ADDQ $8,DI | | 1691 | ADDQ $8, DI |
| | | |
| 1653 | MOVQ (SI),CX | | 1693 | MOVQ (SI), CX |
| 1654 | ADDQ $8,SI | | 1694 | ADDQ $8, SI |
| 1655 | MOVQ CX,(DI) | | 1695 | MOVQ CX, (DI) |
| 1656 | ADDQ $8,DI | | 1696 | ADDQ $8, DI |
| | | |
| 1658 | MOVQ (SI),CX | | 1698 | MOVQ (SI), CX |
| 1659 | ADDQ $8,SI | | 1699 | ADDQ $8, SI |
| 1660 | MOVQ CX,(DI) | | 1700 | MOVQ CX, (DI) |
| 1661 | ADDQ $8,DI | | 1701 | ADDQ $8, DI |
| | | |
| 1663 | MOVQ (SI),CX | | 1703 | MOVQ (SI), CX |
| 1664 | ADDQ $8,SI | | 1704 | ADDQ $8, SI |
| 1665 | MOVQ CX,(DI) | | 1705 | MOVQ CX, (DI) |
| 1666 | ADDQ $8,DI | | 1706 | ADDQ $8, DI |
| | | |
| 1668 | MOVQ (SI),CX | | 1708 | MOVQ (SI), CX |
| 1669 | ADDQ $8,SI | | 1709 | ADDQ $8, SI |
| 1670 | MOVQ CX,(DI) | | 1710 | MOVQ CX, (DI) |
| 1671 | ADDQ $8,DI | | 1711 | ADDQ $8, DI |
| | | |
| 1673 | MOVQ (SI),CX | | 1713 | MOVQ (SI), CX |
| 1674 | ADDQ $8,SI | | 1714 | ADDQ $8, SI |
| 1675 | MOVQ CX,(DI) | | 1715 | MOVQ CX, (DI) |
| 1676 | ADDQ $8,DI | | 1716 | ADDQ $8, DI |
| | | |
| 1678 | MOVQ (SI),CX | | 1718 | MOVQ (SI), CX |
| 1679 | ADDQ $8,SI | | 1719 | ADDQ $8, SI |
| 1680 | MOVQ CX,(DI) | | 1720 | MOVQ CX, (DI) |
| 1681 | ADDQ $8,DI | | 1721 | ADDQ $8, DI |
| | | |
| 1683 | MOVQ (SI),CX | | 1723 | MOVQ (SI), CX |
| 1684 | ADDQ $8,SI | | 1724 | ADDQ $8, SI |
| 1685 | MOVQ CX,(DI) | | 1725 | MOVQ CX, (DI) |
| 1686 | ADDQ $8,DI | | 1726 | ADDQ $8, DI |
| | | |
| 1688 | MOVQ (SI),CX | | 1728 | MOVQ (SI), CX |
| 1689 | ADDQ $8,SI | | 1729 | ADDQ $8, SI |
| 1690 | MOVQ CX,(DI) | | 1730 | MOVQ CX, (DI) |
| 1691 | ADDQ $8,DI | | 1731 | ADDQ $8, DI |
| | | |
| 1693 | MOVQ (SI),CX | | 1733 | MOVQ (SI), CX |
| 1694 | ADDQ $8,SI | | 1734 | ADDQ $8, SI |
| 1695 | MOVQ CX,(DI) | | 1735 | MOVQ CX, (DI) |
| 1696 | ADDQ $8,DI | | 1736 | ADDQ $8, DI |
| | | |
| 1698 | MOVQ (SI),CX | | 1738 | MOVQ (SI), CX |
| 1699 | ADDQ $8,SI | | 1739 | ADDQ $8, SI |
| 1700 | MOVQ CX,(DI) | | 1740 | MOVQ CX, (DI) |
| 1701 | ADDQ $8,DI | | 1741 | ADDQ $8, DI |
| | | |
| 1703 | MOVQ (SI),CX | | 1743 | MOVQ (SI), CX |
| 1704 | ADDQ $8,SI | | 1744 | ADDQ $8, SI |
| 1705 | MOVQ CX,(DI) | | 1745 | MOVQ CX, (DI) |
| 1706 | ADDQ $8,DI | | 1746 | ADDQ $8, DI |
| | | |
| 1708 | MOVQ (SI),CX | | 1748 | MOVQ (SI), CX |
| 1709 | ADDQ $8,SI | | 1749 | ADDQ $8, SI |
| 1710 | MOVQ CX,(DI) | | 1750 | MOVQ CX, (DI) |
| 1711 | ADDQ $8,DI | | 1751 | ADDQ $8, DI |
| | | |
| 1713 | MOVQ (SI),CX | | 1753 | MOVQ (SI), CX |
| 1714 | ADDQ $8,SI | | 1754 | ADDQ $8, SI |
| 1715 | MOVQ CX,(DI) | | 1755 | MOVQ CX, (DI) |
| 1716 | ADDQ $8,DI | | 1756 | ADDQ $8, DI |
| | | |
| 1718 | MOVQ (SI),CX | | 1758 | MOVQ (SI), CX |
| 1719 | ADDQ $8,SI | | 1759 | ADDQ $8, SI |
| 1720 | MOVQ CX,(DI) | | 1760 | MOVQ CX, (DI) |
| 1721 | ADDQ $8,DI | | 1761 | ADDQ $8, DI |
| | | |
| 1723 | MOVQ (SI),CX | | 1763 | MOVQ (SI), CX |
| 1724 | ADDQ $8,SI | | 1764 | ADDQ $8, SI |
| 1725 | MOVQ CX,(DI) | | 1765 | MOVQ CX, (DI) |
| 1726 | ADDQ $8,DI | | 1766 | ADDQ $8, DI |
| | | |
| 1728 | MOVQ (SI),CX | | 1768 | MOVQ (SI), CX |
| 1729 | ADDQ $8,SI | | 1769 | ADDQ $8, SI |
| 1730 | MOVQ CX,(DI) | | 1770 | MOVQ CX, (DI) |
| 1731 | ADDQ $8,DI | | 1771 | ADDQ $8, DI |
| | | |
| 1733 | MOVQ (SI),CX | | 1773 | MOVQ (SI), CX |
| 1734 | ADDQ $8,SI | | 1774 | ADDQ $8, SI |
| 1735 | MOVQ CX,(DI) | | 1775 | MOVQ CX, (DI) |
| 1736 | ADDQ $8,DI | | 1776 | ADDQ $8, DI |
| | | |
| 1738 | MOVQ (SI),CX | | 1778 | MOVQ (SI), CX |
| 1739 | ADDQ $8,SI | | 1779 | ADDQ $8, SI |
| 1740 | MOVQ CX,(DI) | | 1780 | MOVQ CX, (DI) |
| 1741 | ADDQ $8,DI | | 1781 | ADDQ $8, DI |
| | | |
| 1743 | MOVQ (SI),CX | | 1783 | MOVQ (SI), CX |
| 1744 | ADDQ $8,SI | | 1784 | ADDQ $8, SI |
| 1745 | MOVQ CX,(DI) | | 1785 | MOVQ CX, (DI) |
| 1746 | ADDQ $8,DI | | 1786 | ADDQ $8, DI |
| | | |
| 1748 | MOVQ (SI),CX | | 1788 | MOVQ (SI), CX |
| 1749 | ADDQ $8,SI | | 1789 | ADDQ $8, SI |
| 1750 | MOVQ CX,(DI) | | 1790 | MOVQ CX, (DI) |
| 1751 | ADDQ $8,DI | | 1791 | ADDQ $8, DI |
| | | |
| 1753 | MOVQ (SI),CX | | 1793 | MOVQ (SI), CX |
| 1754 | ADDQ $8,SI | | 1794 | ADDQ $8, SI |
| 1755 | MOVQ CX,(DI) | | 1795 | MOVQ CX, (DI) |
| 1756 | ADDQ $8,DI | | 1796 | ADDQ $8, DI |
| | | |
| 1758 | MOVQ (SI),CX | | 1798 | MOVQ (SI), CX |
| 1759 | ADDQ $8,SI | | 1799 | ADDQ $8, SI |
| 1760 | MOVQ CX,(DI) | | 1800 | MOVQ CX, (DI) |
| 1761 | ADDQ $8,DI | | 1801 | ADDQ $8, DI |
| | | |
| 1763 | MOVQ (SI),CX | | 1803 | MOVQ (SI), CX |
| 1764 | ADDQ $8,SI | | 1804 | ADDQ $8, SI |
| 1765 | MOVQ CX,(DI) | | 1805 | MOVQ CX, (DI) |
| 1766 | ADDQ $8,DI | | 1806 | ADDQ $8, DI |
| | | |
| 1768 | MOVQ (SI),CX | | 1808 | MOVQ (SI), CX |
| 1769 | ADDQ $8,SI | | 1809 | ADDQ $8, SI |
| 1770 | MOVQ CX,(DI) | | 1810 | MOVQ CX, (DI) |
| 1771 | ADDQ $8,DI | | 1811 | ADDQ $8, DI |
| | | |
| 1773 | MOVQ (SI),CX | | 1813 | MOVQ (SI), CX |
| 1774 | ADDQ $8,SI | | 1814 | ADDQ $8, SI |
| 1775 | MOVQ CX,(DI) | | 1815 | MOVQ CX, (DI) |
| 1776 | ADDQ $8,DI | | 1816 | ADDQ $8, DI |
| | | |
| 1778 | MOVQ (SI),CX | | 1818 | MOVQ (SI), CX |
| 1779 | ADDQ $8,SI | | 1819 | ADDQ $8, SI |
| 1780 | MOVQ CX,(DI) | | 1820 | MOVQ CX, (DI) |
| 1781 | ADDQ $8,DI | | 1821 | ADDQ $8, DI |
| | | |
| 1783 | MOVQ (SI),CX | | 1823 | MOVQ (SI), CX |
| 1784 | ADDQ $8,SI | | 1824 | ADDQ $8, SI |
| 1785 | MOVQ CX,(DI) | | 1825 | MOVQ CX, (DI) |
| 1786 | ADDQ $8,DI | | 1826 | ADDQ $8, DI |
| | | |
| 1788 | MOVQ (SI),CX | | 1828 | MOVQ (SI), CX |
| 1789 | ADDQ $8,SI | | 1829 | ADDQ $8, SI |
| 1790 | MOVQ CX,(DI) | | 1830 | MOVQ CX, (DI) |
| 1791 | ADDQ $8,DI | | 1831 | ADDQ $8, DI |
| | | |
| 1793 | MOVQ (SI),CX | | 1833 | MOVQ (SI), CX |
| 1794 | ADDQ $8,SI | | 1834 | ADDQ $8, SI |
| 1795 | MOVQ CX,(DI) | | 1835 | MOVQ CX, (DI) |
| 1796 | ADDQ $8,DI | | 1836 | ADDQ $8, DI |
| | | |
| 1798 | MOVQ (SI),CX | | 1838 | MOVQ (SI), CX |
| 1799 | ADDQ $8,SI | | 1839 | ADDQ $8, SI |
| 1800 | MOVQ CX,(DI) | | 1840 | MOVQ CX, (DI) |
| 1801 | ADDQ $8,DI | | 1841 | ADDQ $8, DI |
| | | |
| 1803 | MOVQ (SI),CX | | 1843 | MOVQ (SI), CX |
| 1804 | ADDQ $8,SI | | 1844 | ADDQ $8, SI |
| 1805 | MOVQ CX,(DI) | | 1845 | MOVQ CX, (DI) |
| 1806 | ADDQ $8,DI | | 1846 | ADDQ $8, DI |
| | | |
| 1808 | MOVQ (SI),CX | | 1848 | MOVQ (SI), CX |
| 1809 | ADDQ $8,SI | | 1849 | ADDQ $8, SI |
| 1810 | MOVQ CX,(DI) | | 1850 | MOVQ CX, (DI) |
| 1811 | ADDQ $8,DI | | 1851 | ADDQ $8, DI |
| | | |
| 1813 | MOVQ (SI),CX | | 1853 | MOVQ (SI), CX |
| 1814 | ADDQ $8,SI | | 1854 | ADDQ $8, SI |
| 1815 | MOVQ CX,(DI) | | 1855 | MOVQ CX, (DI) |
| 1816 | ADDQ $8,DI | | 1856 | ADDQ $8, DI |
| | | |
| 1818 | MOVQ (SI),CX | | 1858 | MOVQ (SI), CX |
| 1819 | ADDQ $8,SI | | 1859 | ADDQ $8, SI |
| 1820 | MOVQ CX,(DI) | | 1860 | MOVQ CX, (DI) |
| 1821 | ADDQ $8,DI | | 1861 | ADDQ $8, DI |
| | | |
| 1823 | MOVQ (SI),CX | | 1863 | MOVQ (SI), CX |
| 1824 | ADDQ $8,SI | | 1864 | ADDQ $8, SI |
| 1825 | MOVQ CX,(DI) | | 1865 | MOVQ CX, (DI) |
| 1826 | ADDQ $8,DI | | 1866 | ADDQ $8, DI |
| | | |
| 1828 | MOVQ (SI),CX | | 1868 | MOVQ (SI), CX |
| 1829 | ADDQ $8,SI | | 1869 | ADDQ $8, SI |
| 1830 | MOVQ CX,(DI) | | 1870 | MOVQ CX, (DI) |
| 1831 | ADDQ $8,DI | | 1871 | ADDQ $8, DI |
| | | |
| 1833 | MOVQ (SI),CX | | 1873 | MOVQ (SI), CX |
| 1834 | ADDQ $8,SI | | 1874 | ADDQ $8, SI |
| 1835 | MOVQ CX,(DI) | | 1875 | MOVQ CX, (DI) |
| 1836 | ADDQ $8,DI | | 1876 | ADDQ $8, DI |
| | | |
| 1838 | MOVQ (SI),CX | | 1878 | MOVQ (SI), CX |
| 1839 | ADDQ $8,SI | | 1879 | ADDQ $8, SI |
| 1840 | MOVQ CX,(DI) | | 1880 | MOVQ CX, (DI) |
| 1841 | ADDQ $8,DI | | 1881 | ADDQ $8, DI |
| | | |
| 1843 | MOVQ (SI),CX | | 1883 | MOVQ (SI), CX |
| 1844 | ADDQ $8,SI | | 1884 | ADDQ $8, SI |
| 1845 | MOVQ CX,(DI) | | 1885 | MOVQ CX, (DI) |
| 1846 | ADDQ $8,DI | | 1886 | ADDQ $8, DI |
| | | |
| 1848 | MOVQ (SI),CX | | 1888 | MOVQ (SI), CX |
| 1849 | ADDQ $8,SI | | 1889 | ADDQ $8, SI |
| 1850 | MOVQ CX,(DI) | | 1890 | MOVQ CX, (DI) |
| 1851 | ADDQ $8,DI | | 1891 | ADDQ $8, DI |
| | | |
| 1853 | MOVQ (SI),CX | | 1893 | MOVQ (SI), CX |
| 1854 | ADDQ $8,SI | | 1894 | ADDQ $8, SI |
| 1855 | MOVQ CX,(DI) | | 1895 | MOVQ CX, (DI) |
| 1856 | ADDQ $8,DI | | 1896 | ADDQ $8, DI |
| | | |
| 1858 | MOVQ (SI),CX | | 1898 | MOVQ (SI), CX |
| 1859 | ADDQ $8,SI | | 1899 | ADDQ $8, SI |
| 1860 | MOVQ CX,(DI) | | 1900 | MOVQ CX, (DI) |
| 1861 | ADDQ $8,DI | | 1901 | ADDQ $8, DI |
| | | |
| 1863 | MOVQ (SI),CX | | 1903 | MOVQ (SI), CX |
| 1864 | ADDQ $8,SI | | 1904 | ADDQ $8, SI |
| 1865 | MOVQ CX,(DI) | | 1905 | MOVQ CX, (DI) |
| 1866 | ADDQ $8,DI | | 1906 | ADDQ $8, DI |
| | | |
| 1868 | MOVQ (SI),CX | | 1908 | MOVQ (SI), CX |
| 1869 | ADDQ $8,SI | | 1909 | ADDQ $8, SI |
| 1870 | MOVQ CX,(DI) | | 1910 | MOVQ CX, (DI) |
| 1871 | ADDQ $8,DI | | 1911 | ADDQ $8, DI |
| | | |
| 1873 | MOVQ (SI),CX | | 1913 | MOVQ (SI), CX |
| 1874 | ADDQ $8,SI | | 1914 | ADDQ $8, SI |
| 1875 | MOVQ CX,(DI) | | 1915 | MOVQ CX, (DI) |
| 1876 | ADDQ $8,DI | | 1916 | ADDQ $8, DI |
| | | |
| 1878 | MOVQ (SI),CX | | 1918 | MOVQ (SI), CX |
| 1879 | ADDQ $8,SI | | 1919 | ADDQ $8, SI |
| 1880 | MOVQ CX,(DI) | | 1920 | MOVQ CX, (DI) |
| 1881 | ADDQ $8,DI | | 1921 | ADDQ $8, DI |
| | | |
| 1883 | MOVQ (SI),CX | | 1923 | MOVQ (SI), CX |
| 1884 | ADDQ $8,SI | | 1924 | ADDQ $8, SI |
| 1885 | MOVQ CX,(DI) | | 1925 | MOVQ CX, (DI) |
| 1886 | ADDQ $8,DI | | 1926 | ADDQ $8, DI |
| | | |
| 1888 | MOVQ (SI),CX | | 1928 | MOVQ (SI), CX |
| 1889 | ADDQ $8,SI | | 1929 | ADDQ $8, SI |
| 1890 | MOVQ CX,(DI) | | 1930 | MOVQ CX, (DI) |
| 1891 | ADDQ $8,DI | | 1931 | ADDQ $8, DI |
| | | |
| 1893 | MOVQ (SI),CX | | 1933 | MOVQ (SI), CX |
| 1894 | ADDQ $8,SI | | 1934 | ADDQ $8, SI |
| 1895 | MOVQ CX,(DI) | | 1935 | MOVQ CX, (DI) |
| 1896 | ADDQ $8,DI | | 1936 | ADDQ $8, DI |
| | | |
| 1898 | MOVQ (SI),CX | | 1938 | MOVQ (SI), CX |
| 1899 | ADDQ $8,SI | | 1939 | ADDQ $8, SI |
| 1900 | MOVQ CX,(DI) | | 1940 | MOVQ CX, (DI) |
| 1901 | ADDQ $8,DI | | 1941 | ADDQ $8, DI |
| | | |
| 1903 | MOVQ (SI),CX | | 1943 | MOVQ (SI), CX |
| 1904 | ADDQ $8,SI | | 1944 | ADDQ $8, SI |
| 1905 | MOVQ CX,(DI) | | 1945 | MOVQ CX, (DI) |
| 1906 | ADDQ $8,DI | | 1946 | ADDQ $8, DI |
| | | |
| 1908 | MOVQ (SI),CX | | 1948 | MOVQ (SI), CX |
| 1909 | ADDQ $8,SI | | 1949 | ADDQ $8, SI |
| 1910 | MOVQ CX,(DI) | | 1950 | MOVQ CX, (DI) |
| 1911 | ADDQ $8,DI | | 1951 | ADDQ $8, DI |
| | | |
| 1913 | MOVQ (SI),CX | | 1953 | MOVQ (SI), CX |
| 1914 | ADDQ $8,SI | | 1954 | ADDQ $8, SI |
| 1915 | MOVQ CX,(DI) | | 1955 | MOVQ CX, (DI) |
| 1916 | ADDQ $8,DI | | 1956 | ADDQ $8, DI |
| | | |
| 1918 | MOVQ (SI),CX | | 1958 | MOVQ (SI), CX |
| 1919 | ADDQ $8,SI | | 1959 | ADDQ $8, SI |
| 1920 | MOVQ CX,(DI) | | 1960 | MOVQ CX, (DI) |
| 1921 | ADDQ $8,DI | | 1961 | ADDQ $8, DI |
| | | |
| 1923 | MOVQ (SI),CX | | 1963 | MOVQ (SI), CX |
| 1924 | ADDQ $8,SI | | 1964 | ADDQ $8, SI |
| 1925 | MOVQ CX,(DI) | | 1965 | MOVQ CX, (DI) |
| 1926 | ADDQ $8,DI | | 1966 | ADDQ $8, DI |
| | | |
| 1928 | MOVQ (SI),CX | | 1968 | MOVQ (SI), CX |
| 1929 | ADDQ $8,SI | | 1969 | ADDQ $8, SI |
| 1930 | MOVQ CX,(DI) | | 1970 | MOVQ CX, (DI) |
| 1931 | ADDQ $8,DI | | 1971 | ADDQ $8, DI |
| | | |
| 1933 | MOVQ (SI),CX | | 1973 | MOVQ (SI), CX |
| 1934 | ADDQ $8,SI | | 1974 | ADDQ $8, SI |
| 1935 | MOVQ CX,(DI) | | 1975 | MOVQ CX, (DI) |
| 1936 | ADDQ $8,DI | | 1976 | ADDQ $8, DI |
| | | |
| 1938 | MOVQ (SI),CX | | 1978 | MOVQ (SI), CX |
| 1939 | ADDQ $8,SI | | 1979 | ADDQ $8, SI |
| 1940 | MOVQ CX,(DI) | | 1980 | MOVQ CX, (DI) |
| 1941 | ADDQ $8,DI | | 1981 | ADDQ $8, DI |
| | | |
| 1943 | MOVQ (SI),CX | | 1983 | MOVQ (SI), CX |
| 1944 | ADDQ $8,SI | | 1984 | ADDQ $8, SI |
| 1945 | MOVQ CX,(DI) | | 1985 | MOVQ CX, (DI) |
| 1946 | ADDQ $8,DI | | 1986 | ADDQ $8, DI |
| | | |
| 1948 | MOVQ (SI),CX | | 1988 | MOVQ (SI), CX |
| 1949 | ADDQ $8,SI | | 1989 | ADDQ $8, SI |
| 1950 | MOVQ CX,(DI) | | 1990 | MOVQ CX, (DI) |
| 1951 | ADDQ $8,DI | | 1991 | ADDQ $8, DI |
| | | |
| 1953 | MOVQ (SI),CX | | 1993 | MOVQ (SI), CX |
| 1954 | ADDQ $8,SI | | 1994 | ADDQ $8, SI |
| 1955 | MOVQ CX,(DI) | | 1995 | MOVQ CX, (DI) |
| 1956 | ADDQ $8,DI | | 1996 | ADDQ $8, DI |
| | | |
| 1958 | MOVQ (SI),CX | | 1998 | MOVQ (SI), CX |
| 1959 | ADDQ $8,SI | | 1999 | ADDQ $8, SI |
| 1960 | MOVQ CX,(DI) | | 2000 | MOVQ CX, (DI) |
| 1961 | ADDQ $8,DI | | 2001 | ADDQ $8, DI |
| | | |
| 1963 | MOVQ (SI),CX | | 2003 | MOVQ (SI), CX |
| 1964 | ADDQ $8,SI | | 2004 | ADDQ $8, SI |
| 1965 | MOVQ CX,(DI) | | 2005 | MOVQ CX, (DI) |
| 1966 | ADDQ $8,DI | | 2006 | ADDQ $8, DI |
| | | |
| 1968 | MOVQ (SI),CX | | 2008 | MOVQ (SI), CX |
| 1969 | ADDQ $8,SI | | 2009 | ADDQ $8, SI |
| 1970 | MOVQ CX,(DI) | | 2010 | MOVQ CX, (DI) |
| 1971 | ADDQ $8,DI | | 2011 | ADDQ $8, DI |
| | | |
| 1973 | MOVQ (SI),CX | | 2013 | MOVQ (SI), CX |
| 1974 | ADDQ $8,SI | | 2014 | ADDQ $8, SI |
| 1975 | MOVQ CX,(DI) | | 2015 | MOVQ CX, (DI) |
| 1976 | ADDQ $8,DI | | 2016 | ADDQ $8, DI |
| | | |
| 1978 | MOVQ (SI),CX | | 2018 | MOVQ (SI), CX |
| 1979 | ADDQ $8,SI | | 2019 | ADDQ $8, SI |
| 1980 | MOVQ CX,(DI) | | 2020 | MOVQ CX, (DI) |
| 1981 | ADDQ $8,DI | | 2021 | ADDQ $8, DI |
| | | |
| 1983 | MOVQ (SI),CX | | 2023 | MOVQ (SI), CX |
| 1984 | ADDQ $8,SI | | 2024 | ADDQ $8, SI |
| 1985 | MOVQ CX,(DI) | | 2025 | MOVQ CX, (DI) |
| 1986 | ADDQ $8,DI | | 2026 | ADDQ $8, DI |
| | | |
| 1988 | MOVQ (SI),CX | | 2028 | MOVQ (SI), CX |
| 1989 | ADDQ $8,SI | | 2029 | ADDQ $8, SI |
| 1990 | MOVQ CX,(DI) | | 2030 | MOVQ CX, (DI) |
| 1991 | ADDQ $8,DI | | 2031 | ADDQ $8, DI |
| | | |
| 1993 | MOVQ (SI),CX | | 2033 | MOVQ (SI), CX |
| 1994 | ADDQ $8,SI | | 2034 | ADDQ $8, SI |
| 1995 | MOVQ CX,(DI) | | 2035 | MOVQ CX, (DI) |
| 1996 | ADDQ $8,DI | | 2036 | ADDQ $8, DI |
| | | |
| 1998 | MOVQ (SI),CX | | 2038 | MOVQ (SI), CX |
| 1999 | ADDQ $8,SI | | 2039 | ADDQ $8, SI |
| 2000 | MOVQ CX,(DI) | | 2040 | MOVQ CX, (DI) |
| 2001 | ADDQ $8,DI | | 2041 | ADDQ $8, DI |
| | | |
| 2003 | MOVQ (SI),CX | | 2043 | MOVQ (SI), CX |
| 2004 | ADDQ $8,SI | | 2044 | ADDQ $8, SI |
| 2005 | MOVQ CX,(DI) | | 2045 | MOVQ CX, (DI) |
| 2006 | ADDQ $8,DI | | 2046 | ADDQ $8, DI |
| | | |
| 2008 | MOVQ (SI),CX | | 2048 | MOVQ (SI), CX |
| 2009 | ADDQ $8,SI | | 2049 | ADDQ $8, SI |
| 2010 | MOVQ CX,(DI) | | 2050 | MOVQ CX, (DI) |
| 2011 | ADDQ $8,DI | | 2051 | ADDQ $8, DI |
| | | |
| 2013 | MOVQ (SI),CX | | 2053 | MOVQ (SI), CX |
| 2014 | ADDQ $8,SI | | 2054 | ADDQ $8, SI |
| 2015 | MOVQ CX,(DI) | | 2055 | MOVQ CX, (DI) |
| 2016 | ADDQ $8,DI | | 2056 | ADDQ $8, DI |
| | | |
| 2018 | MOVQ (SI),CX | | 2058 | MOVQ (SI), CX |
| 2019 | ADDQ $8,SI | | 2059 | ADDQ $8, SI |
| 2020 | MOVQ CX,(DI) | | 2060 | MOVQ CX, (DI) |
| 2021 | ADDQ $8,DI | | 2061 | ADDQ $8, DI |
| | | |
| 2023 | MOVQ (SI),CX | | 2063 | MOVQ (SI), CX |
| 2024 | ADDQ $8,SI | | 2064 | ADDQ $8, SI |
| 2025 | MOVQ CX,(DI) | | 2065 | MOVQ CX, (DI) |
| 2026 | ADDQ $8,DI | | 2066 | ADDQ $8, DI |
| | | |
| 2028 | MOVQ (SI),CX | | 2068 | MOVQ (SI), CX |
| 2029 | ADDQ $8,SI | | 2069 | ADDQ $8, SI |
| 2030 | MOVQ CX,(DI) | | 2070 | MOVQ CX, (DI) |
| 2031 | ADDQ $8,DI | | 2071 | ADDQ $8, DI |
| | | |
| 2033 | MOVQ (SI),CX | | 2073 | MOVQ (SI), CX |
| 2034 | ADDQ $8,SI | | 2074 | ADDQ $8, SI |
| 2035 | MOVQ CX,(DI) | | 2075 | MOVQ CX, (DI) |
| 2036 | ADDQ $8,DI | | 2076 | ADDQ $8, DI |
| | | |
| 2038 | MOVQ (SI),CX | | 2078 | MOVQ (SI), CX |
| 2039 | ADDQ $8,SI | | 2079 | ADDQ $8, SI |
| 2040 | MOVQ CX,(DI) | | 2080 | MOVQ CX, (DI) |
| 2041 | ADDQ $8,DI | | 2081 | ADDQ $8, DI |
| | | |
| 2043 | MOVQ (SI),CX | | 2083 | MOVQ (SI), CX |
| 2044 | ADDQ $8,SI | | 2084 | ADDQ $8, SI |
| 2045 | MOVQ CX,(DI) | | 2085 | MOVQ CX, (DI) |
| 2046 | ADDQ $8,DI | | 2086 | ADDQ $8, DI |
| | | |
| 2048 | MOVQ (SI),CX | | 2088 | MOVQ (SI), CX |
| 2049 | ADDQ $8,SI | | 2089 | ADDQ $8, SI |
| 2050 | MOVQ CX,(DI) | | 2090 | MOVQ CX, (DI) |
| 2051 | ADDQ $8,DI | | 2091 | ADDQ $8, DI |
| | | |
| 2053 | MOVQ (SI),CX | | 2093 | MOVQ (SI), CX |
| 2054 | ADDQ $8,SI | | 2094 | ADDQ $8, SI |
| 2055 | MOVQ CX,(DI) | | 2095 | MOVQ CX, (DI) |
| 2056 | ADDQ $8,DI | | 2096 | ADDQ $8, DI |
| | | |
| 2058 | MOVQ (SI),CX | | 2098 | MOVQ (SI), CX |
| 2059 | ADDQ $8,SI | | 2099 | ADDQ $8, SI |
| 2060 | MOVQ CX,(DI) | | 2100 | MOVQ CX, (DI) |
| 2061 | ADDQ $8,DI | | 2101 | ADDQ $8, DI |
| | | |
| 2063 | MOVQ (SI),CX | | 2103 | MOVQ (SI), CX |
| 2064 | ADDQ $8,SI | | 2104 | ADDQ $8, SI |
| 2065 | MOVQ CX,(DI) | | 2105 | MOVQ CX, (DI) |
| 2066 | ADDQ $8,DI | | 2106 | ADDQ $8, DI |
| | | |
| 2068 | MOVQ (SI),CX | | 2108 | MOVQ (SI), CX |
| 2069 | ADDQ $8,SI | | 2109 | ADDQ $8, SI |
| 2070 | MOVQ CX,(DI) | | 2110 | MOVQ CX, (DI) |
| 2071 | ADDQ $8,DI | | 2111 | ADDQ $8, DI |
| | | |
| 2073 | MOVQ (SI),CX | | 2113 | MOVQ (SI), CX |
| 2074 | ADDQ $8,SI | | 2114 | ADDQ $8, SI |
| 2075 | MOVQ CX,(DI) | | 2115 | MOVQ CX, (DI) |
| 2076 | ADDQ $8,DI | | 2116 | ADDQ $8, DI |
| | | |
| 2078 | MOVQ (SI),CX | | 2118 | MOVQ (SI), CX |
| 2079 | ADDQ $8,SI | | 2119 | ADDQ $8, SI |
| 2080 | MOVQ CX,(DI) | | 2120 | MOVQ CX, (DI) |
| 2081 | ADDQ $8,DI | | 2121 | ADDQ $8, DI |
| | | |
| 2083 | MOVQ (SI),CX | | 2123 | MOVQ (SI), CX |
| 2084 | ADDQ $8,SI | | 2124 | ADDQ $8, SI |
| 2085 | MOVQ CX,(DI) | | 2125 | MOVQ CX, (DI) |
| 2086 | ADDQ $8,DI | | 2126 | ADDQ $8, DI |
| | | |
| 2088 | MOVQ (SI),CX | | 2128 | MOVQ (SI), CX |
| 2089 | ADDQ $8,SI | | 2129 | ADDQ $8, SI |
| 2090 | MOVQ CX,(DI) | | 2130 | MOVQ CX, (DI) |
| 2091 | ADDQ $8,DI | | 2131 | ADDQ $8, DI |
| | | |
| 2093 | MOVQ (SI),CX | | 2133 | MOVQ (SI), CX |
| 2094 | ADDQ $8,SI | | 2134 | ADDQ $8, SI |
| 2095 | MOVQ CX,(DI) | | 2135 | MOVQ CX, (DI) |
| 2096 | ADDQ $8,DI | | 2136 | ADDQ $8, DI |
| | | |
| 2098 | MOVQ (SI),CX | | 2138 | MOVQ (SI), CX |
| 2099 | ADDQ $8,SI | | 2139 | ADDQ $8, SI |
| 2100 | MOVQ CX,(DI) | | 2140 | MOVQ CX, (DI) |
| 2101 | ADDQ $8,DI | | 2141 | ADDQ $8, DI |
| | | |
| 2103 | MOVQ (SI),CX | | 2143 | MOVQ (SI), CX |
| 2104 | ADDQ $8,SI | | 2144 | ADDQ $8, SI |
| 2105 | MOVQ CX,(DI) | | 2145 | MOVQ CX, (DI) |
| 2106 | ADDQ $8,DI | | 2146 | ADDQ $8, DI |
| | | |
| 2108 | MOVQ (SI),CX | | 2148 | MOVQ (SI), CX |
| 2109 | ADDQ $8,SI | | 2149 | ADDQ $8, SI |
| 2110 | MOVQ CX,(DI) | | 2150 | MOVQ CX, (DI) |
| 2111 | ADDQ $8,DI | | 2151 | ADDQ $8, DI |
| | | |
| 2113 | MOVQ (SI),CX | | 2153 | MOVQ (SI), CX |
| 2114 | ADDQ $8,SI | | 2154 | ADDQ $8, SI |
| 2115 | MOVQ CX,(DI) | | 2155 | MOVQ CX, (DI) |
| 2116 | ADDQ $8,DI | | 2156 | ADDQ $8, DI |
| | | |
| 2118 | MOVQ (SI),CX | | 2158 | MOVQ (SI), CX |
| 2119 | ADDQ $8,SI | | 2159 | ADDQ $8, SI |
| 2120 | MOVQ CX,(DI) | | 2160 | MOVQ CX, (DI) |
| 2121 | ADDQ $8,DI | | 2161 | ADDQ $8, DI |
| | | |
| 2123 | MOVQ (SI),CX | | 2163 | MOVQ (SI), CX |
| 2124 | ADDQ $8,SI | | 2164 | ADDQ $8, SI |
| 2125 | MOVQ CX,(DI) | | 2165 | MOVQ CX, (DI) |
| 2126 | ADDQ $8,DI | | 2166 | ADDQ $8, DI |
| | | |
| 2128 | MOVQ (SI),CX | | 2168 | MOVQ (SI), CX |
| 2129 | ADDQ $8,SI | | 2169 | ADDQ $8, SI |
| 2130 | MOVQ CX,(DI) | | 2170 | MOVQ CX, (DI) |
| 2131 | ADDQ $8,DI | | 2171 | ADDQ $8, DI |
| | | |
| 2133 | MOVQ (SI),CX | | 2173 | MOVQ (SI), CX |
| 2134 | ADDQ $8,SI | | 2174 | ADDQ $8, SI |
| 2135 | MOVQ CX,(DI) | | 2175 | MOVQ CX, (DI) |
| 2136 | ADDQ $8,DI | | 2176 | ADDQ $8, DI |
| | | |
| 2138 | MOVQ (SI),CX | | 2178 | MOVQ (SI), CX |
| 2139 | ADDQ $8,SI | | 2179 | ADDQ $8, SI |
| 2140 | MOVQ CX,(DI) | | 2180 | MOVQ CX, (DI) |
| 2141 | ADDQ $8,DI | | 2181 | ADDQ $8, DI |
| | | |
| 2143 | MOVQ (SI),CX | | 2183 | MOVQ (SI), CX |
| 2144 | ADDQ $8,SI | | 2184 | ADDQ $8, SI |
| 2145 | MOVQ CX,(DI) | | 2185 | MOVQ CX, (DI) |
| 2146 | ADDQ $8,DI | | 2186 | ADDQ $8, DI |
| | | |
| 2148 | MOVQ (SI),CX | | 2188 | MOVQ (SI), CX |
| 2149 | ADDQ $8,SI | | 2189 | ADDQ $8, SI |
| 2150 | MOVQ CX,(DI) | | 2190 | MOVQ CX, (DI) |
| 2151 | ADDQ $8,DI | | 2191 | ADDQ $8, DI |
| | | |
| 2153 | MOVQ (SI),CX | | 2193 | MOVQ (SI), CX |
| 2154 | ADDQ $8,SI | | 2194 | ADDQ $8, SI |
| 2155 | MOVQ CX,(DI) | | 2195 | MOVQ CX, (DI) |
| 2156 | ADDQ $8,DI | | 2196 | ADDQ $8, DI |
| | | |
| 2158 | MOVQ (SI),CX | | 2198 | MOVQ (SI), CX |
| 2159 | ADDQ $8,SI | | 2199 | ADDQ $8, SI |
| 2160 | MOVQ CX,(DI) | | 2200 | MOVQ CX, (DI) |
| 2161 | ADDQ $8,DI | | 2201 | ADDQ $8, DI |
| | | |
| 2163 | MOVQ (SI),CX | | 2203 | MOVQ (SI), CX |
| 2164 | ADDQ $8,SI | | 2204 | ADDQ $8, SI |
| 2165 | MOVQ CX,(DI) | | 2205 | MOVQ CX, (DI) |
| 2166 | ADDQ $8,DI | | 2206 | ADDQ $8, DI |
| | | |
| 2168 | MOVQ (SI),CX | | 2208 | MOVQ (SI), CX |
| 2169 | ADDQ $8,SI | | 2209 | ADDQ $8, SI |
| 2170 | MOVQ CX,(DI) | | 2210 | MOVQ CX, (DI) |
| 2171 | ADDQ $8,DI | | 2211 | ADDQ $8, DI |
| | | |
| 2173 | MOVQ (SI),CX | | 2213 | MOVQ (SI), CX |
| 2174 | ADDQ $8,SI | | 2214 | ADDQ $8, SI |
| 2175 | MOVQ CX,(DI) | | 2215 | MOVQ CX, (DI) |
| 2176 | ADDQ $8,DI | | 2216 | ADDQ $8, DI |
| | | |
| 2178 | MOVQ (SI),CX | | 2218 | MOVQ (SI), CX |
| 2179 | ADDQ $8,SI | | 2219 | ADDQ $8, SI |
| 2180 | MOVQ CX,(DI) | | 2220 | MOVQ CX, (DI) |
| 2181 | ADDQ $8,DI | | 2221 | ADDQ $8, DI |
| | | |
| 2183 | MOVQ (SI),CX | | 2223 | MOVQ (SI), CX |
| 2184 | ADDQ $8,SI | | 2224 | ADDQ $8, SI |
| 2185 | MOVQ CX,(DI) | | 2225 | MOVQ CX, (DI) |
| 2186 | ADDQ $8,DI | | 2226 | ADDQ $8, DI |
| | | |
| 2188 | MOVQ (SI),CX | | 2228 | MOVQ (SI), CX |
| 2189 | ADDQ $8,SI | | 2229 | ADDQ $8, SI |
| 2190 | MOVQ CX,(DI) | | 2230 | MOVQ CX, (DI) |
| 2191 | ADDQ $8,DI | | 2231 | ADDQ $8, DI |
| | | |
| 2193 | MOVQ (SI),CX | | 2233 | MOVQ (SI), CX |
| 2194 | ADDQ $8,SI | | 2234 | ADDQ $8, SI |
| 2195 | MOVQ CX,(DI) | | 2235 | MOVQ CX, (DI) |
| 2196 | ADDQ $8,DI | | 2236 | ADDQ $8, DI |
| | | |
| 2198 | MOVQ (SI),CX | | 2238 | MOVQ (SI), CX |
| 2199 | ADDQ $8,SI | | 2239 | ADDQ $8, SI |
| 2200 | MOVQ CX,(DI) | | 2240 | MOVQ CX, (DI) |
| 2201 | ADDQ $8,DI | | 2241 | ADDQ $8, DI |
| | | |
| RET | | RET |
| | | |
| TEXT runtime·fastrand1(SB), NOSPLIT, $0-4 | | TEXT runtime·fastrand1(SB), NOSPLIT, $0-4 |
| get_tls(CX) | | get_tls(CX) |
| 2207 | MOVQ g(CX), AX | | 2247 | MOVQ g(CX), AX |
| 2208 | MOVQ g_m(AX), AX | | 2248 | MOVQ g_m(AX), AX |
| 2209 | MOVL m_fastrand(AX), DX | | 2249 | MOVL m_fastrand(AX), DX |
| 2210 | ADDL DX, DX | | 2250 | ADDL DX, DX |
| 2211 | MOVL DX, BX | | 2251 | MOVL DX, BX |
| 2212 | XORL $0x88888eef, DX | | 2252 | XORL $0x88888eef, DX |
| 2213 | CMOVLMI BX, DX | | 2253 | CMOVLMI BX, DX |
| 2214 | MOVL DX, m_fastrand(AX) | | 2254 | MOVL DX, m_fastrand(AX) |
| 2215 | MOVL DX, ret+0(FP) | | 2255 | MOVL DX, ret+0(FP) |
| RET | | RET |
| | | |
| TEXT runtime·return0(SB), NOSPLIT, $0 | | TEXT runtime·return0(SB), NOSPLIT, $0 |
| 2219 | MOVL $0, AX | | 2259 | MOVL $0, AX |
| RET | | RET |
| 2221 |
| | | |
| | | |
| // Called from cgo wrappers, this function returns g->m->curg.stack.hi. | | // Called from cgo wrappers, this function returns g->m->curg.stack.hi. |
| // Must obey the gcc calling convention. | | // Must obey the gcc calling convention. |
| 2225 | TEXT _cgo_topofstack(SB),NOSPLIT,$0 | | 2264 | TEXT _cgo_topofstack(SB), NOSPLIT, $0 |
| get_tls(CX) | | get_tls(CX) |
| 2227 | MOVQ g(CX), AX | | 2266 | MOVQ g(CX), AX |
| 2228 | MOVQ g_m(AX), AX | | 2267 | MOVQ g_m(AX), AX |
| 2229 | MOVQ m_curg(AX), AX | | 2268 | MOVQ m_curg(AX), AX |
| 2230 | MOVQ (g_stack+stack_hi)(AX), AX | | 2269 | MOVQ (g_stack+stack_hi)(AX), AX |
| RET | | RET |
| | | |
| // The top-most function running on a goroutine | | // The top-most function running on a goroutine |
| // returns to goexit+PCQuantum. | | // returns to goexit+PCQuantum. |
| 2235 | TEXT runtime·goexit(SB),NOSPLIT,$0-0 | | 2274 | TEXT runtime·goexit(SB), NOSPLIT, $0-0 |
| 2236 | BYTE $0x90 // NOP | | 2275 | BYTE $0x90 // NOP |
| 2237 | CALL runtime·goexit1(SB) // does not return | | 2276 | CALL runtime·goexit1(SB) // does not return |