github.com/liangmanlin/routine@v1.1.0/g/go_arm64.s (about) 1 // Copyright 2022 TimAndy. All rights reserved. 2 // Licensed under the Apache-2.0 license that can be found in the LICENSE file. 3 4 #include "funcdata.h" 5 #include "go_asm.h" 6 #include "textflag.h" 7 8 TEXT ·getgp(SB), NOSPLIT, $0-8 9 MOVD g, R8 10 MOVD R8, ret+0(FP) 11 RET 12 13 TEXT ·getg0(SB), NOSPLIT, $0-16 14 NO_LOCAL_POINTERS 15 MOVD $0, ret_type+0(FP) 16 MOVD $0, ret_data+8(FP) 17 GO_RESULTS_INITIALIZED 18 //get runtime.g type 19 MOVD $type·runtime·g(SB), R8 20 //get runtime·g0 variable 21 MOVD $runtime·g0(SB), R9 22 //return interface{} 23 MOVD R8, ret_type+0(FP) 24 MOVD R9, ret_data+8(FP) 25 RET