X7ROOT File Manager
Current Path:
/opt/golang/1.22.0/src/runtime
opt
/
golang
/
1.22.0
/
src
/
runtime
/
๐
..
๐
HACKING.md
(13.85 KB)
๐
Makefile
(178 B)
๐
abi_test.go
(2.83 KB)
๐
alg.go
(10.99 KB)
๐
align_runtime_test.go
(1.82 KB)
๐
align_test.go
(5.37 KB)
๐
arena.go
(31.66 KB)
๐
arena_test.go
(13.39 KB)
๐
asan
๐
asan.go
(1.55 KB)
๐
asan0.go
(760 B)
๐
asan_amd64.s
(2.45 KB)
๐
asan_arm64.s
(2.14 KB)
๐
asan_loong64.s
(2.12 KB)
๐
asan_ppc64le.s
(2.75 KB)
๐
asan_riscv64.s
(1.92 KB)
๐
asm.s
(719 B)
๐
asm_386.s
(42.54 KB)
๐
asm_amd64.h
(631 B)
๐
asm_amd64.s
(60.09 KB)
๐
asm_arm.s
(31.58 KB)
๐
asm_arm64.s
(43.33 KB)
๐
asm_loong64.s
(27.58 KB)
๐
asm_mips64x.s
(24.34 KB)
๐
asm_mipsx.s
(25.82 KB)
๐
asm_ppc64x.h
(1.93 KB)
๐
asm_ppc64x.s
(45.19 KB)
๐
asm_riscv64.s
(26.97 KB)
๐
asm_s390x.s
(27.55 KB)
๐
asm_wasm.s
(11.82 KB)
๐
atomic_arm64.s
(259 B)
๐
atomic_loong64.s
(245 B)
๐
atomic_mips64x.s
(300 B)
๐
atomic_mipsx.s
(262 B)
๐
atomic_pointer.go
(3.66 KB)
๐
atomic_ppc64x.s
(437 B)
๐
atomic_riscv64.s
(275 B)
๐
auxv_none.go
(298 B)
๐
callers_test.go
(12.13 KB)
๐
cgo
๐
cgo.go
(2.5 KB)
๐
cgo_mmap.go
(2.42 KB)
๐
cgo_ppc64x.go
(418 B)
๐
cgo_sigaction.go
(3.28 KB)
๐
cgocall.go
(23.23 KB)
๐
cgocallback.go
(317 B)
๐
cgocheck.go
(7.97 KB)
๐
chan.go
(23.74 KB)
๐
chan_test.go
(23.44 KB)
๐
chanbarrier_test.go
(1.4 KB)
๐
checkptr.go
(3.29 KB)
๐
checkptr_test.go
(2.86 KB)
๐
closure_test.go
(937 B)
๐
compiler.go
(410 B)
๐
complex.go
(1.59 KB)
๐
complex_test.go
(1.05 KB)
๐
conv_wasm_test.go
(2.96 KB)
๐
coro.go
(4.92 KB)
๐
coverage
๐
covercounter.go
(749 B)
๐
covermeta.go
(2.4 KB)
๐
cpuflags.go
(810 B)
๐
cpuflags_amd64.go
(533 B)
๐
cpuflags_arm64.go
(312 B)
๐
cpuprof.go
(7.94 KB)
๐
cputicks.go
(437 B)
๐
crash_cgo_test.go
(23.35 KB)
๐
crash_test.go
(23.12 KB)
๐
crash_unix_test.go
(9.19 KB)
๐
create_file_nounix.go
(305 B)
๐
create_file_unix.go
(368 B)
๐
debug
๐
debug.go
(3.53 KB)
๐
debug_test.go
(7.99 KB)
๐
debugcall.go
(6.75 KB)
๐
debuglog.go
(18.24 KB)
๐
debuglog_off.go
(357 B)
๐
debuglog_on.go
(1.09 KB)
๐
debuglog_test.go
(4.9 KB)
๐
defer_test.go
(11.4 KB)
๐
defs1_linux.go
(845 B)
๐
defs1_netbsd_386.go
(2.91 KB)
๐
defs1_netbsd_amd64.go
(3.14 KB)
๐
defs1_netbsd_arm.go
(3.03 KB)
๐
defs1_netbsd_arm64.go
(3.25 KB)
๐
defs1_solaris_amd64.go
(4.01 KB)
๐
defs2_linux.go
(3.22 KB)
๐
defs3_linux.go
(1.09 KB)
๐
defs_aix.go
(4.17 KB)
๐
defs_aix_ppc64.go
(3.63 KB)
๐
defs_arm_linux.go
(2.67 KB)
๐
defs_darwin.go
(4.18 KB)
๐
defs_darwin_amd64.go
(6.34 KB)
๐
defs_darwin_arm64.go
(4.17 KB)
๐
defs_dragonfly.go
(2.73 KB)
๐
defs_dragonfly_amd64.go
(3.41 KB)
๐
defs_freebsd.go
(3.96 KB)
๐
defs_freebsd_386.go
(4.52 KB)
๐
defs_freebsd_amd64.go
(4.79 KB)
๐
defs_freebsd_arm.go
(3.92 KB)
๐
defs_freebsd_arm64.go
(4.18 KB)
๐
defs_freebsd_riscv64.go
(4.19 KB)
๐
defs_illumos_amd64.go
(285 B)
๐
defs_linux.go
(2.92 KB)
๐
defs_linux_386.go
(4.2 KB)
๐
defs_linux_amd64.go
(4.7 KB)
๐
defs_linux_arm.go
(3.89 KB)
๐
defs_linux_arm64.go
(3.62 KB)
๐
defs_linux_loong64.go
(3.43 KB)
๐
defs_linux_mips64x.go
(3.6 KB)
๐
defs_linux_mipsx.go
(3.6 KB)
๐
defs_linux_ppc64.go
(3.69 KB)
๐
defs_linux_ppc64le.go
(3.69 KB)
๐
defs_linux_riscv64.go
(3.81 KB)
๐
defs_linux_s390x.go
(3.16 KB)
๐
defs_netbsd.go
(2.83 KB)
๐
defs_netbsd_386.go
(855 B)
๐
defs_netbsd_amd64.go
(1.01 KB)
๐
defs_netbsd_arm.go
(764 B)
๐
defs_openbsd.go
(3.06 KB)
๐
defs_openbsd_386.go
(2.91 KB)
๐
defs_openbsd_amd64.go
(3.11 KB)
๐
defs_openbsd_arm.go
(3.03 KB)
๐
defs_openbsd_arm64.go
(2.78 KB)
๐
defs_openbsd_mips64.go
(2.75 KB)
๐
defs_openbsd_ppc64.go
(3 KB)
๐
defs_openbsd_riscv64.go
(2.89 KB)
๐
defs_plan9_386.go
(1.63 KB)
๐
defs_plan9_amd64.go
(1.82 KB)
๐
defs_plan9_arm.go
(1.73 KB)
๐
defs_solaris.go
(3.32 KB)
๐
defs_solaris_amd64.go
(1004 B)
๐
defs_windows.go
(2.25 KB)
๐
defs_windows_386.go
(2.28 KB)
๐
defs_windows_amd64.go
(3.19 KB)
๐
defs_windows_arm.go
(2.57 KB)
๐
defs_windows_arm64.go
(3.07 KB)
๐
duff_386.s
(8.24 KB)
๐
duff_amd64.s
(5.64 KB)
๐
duff_arm.s
(7.11 KB)
๐
duff_arm64.s
(5.27 KB)
๐
duff_loong64.s
(11.9 KB)
๐
duff_mips64x.s
(11.28 KB)
๐
duff_ppc64x.s
(7.06 KB)
๐
duff_riscv64.s
(11.4 KB)
๐
duff_s390x.s
(507 B)
๐
ehooks_test.go
(2.04 KB)
๐
env_plan9.go
(3 KB)
๐
env_posix.go
(1.56 KB)
๐
env_test.go
(1.16 KB)
๐
error.go
(9.29 KB)
๐
example_test.go
(1.55 KB)
๐
exithook.go
(2.32 KB)
๐
export_aix_test.go
(207 B)
๐
export_arm_test.go
(226 B)
๐
export_darwin_test.go
(207 B)
๐
export_debug_amd64_test.go
(3.6 KB)
๐
export_debug_arm64_test.go
(3.49 KB)
๐
export_debug_ppc64le_test.go
(3.5 KB)
๐
export_debug_test.go
(5.07 KB)
๐
export_debuglog_test.go
(1.27 KB)
๐
export_linux_test.go
(378 B)
๐
export_mmap_test.go
(429 B)
๐
export_pipe2_test.go
(310 B)
๐
export_pipe_test.go
(219 B)
๐
export_test.go
(50.52 KB)
๐
export_unix_test.go
(2.27 KB)
๐
export_windows_test.go
(903 B)
๐
extern.go
(18.58 KB)
๐
fastlog2.go
(1.22 KB)
๐
fastlog2_test.go
(784 B)
๐
fastlog2table.go
(904 B)
๐
fds_nonunix.go
(256 B)
๐
fds_test.go
(1.43 KB)
๐
fds_unix.go
(1.27 KB)
๐
float.go
(1.35 KB)
๐
float_test.go
(699 B)
๐
funcdata.h
(2.53 KB)
๐
gc_test.go
(20.32 KB)
๐
gcinfo_test.go
(5.95 KB)
๐
go_tls.h
(366 B)
๐
hash32.go
(1.58 KB)
๐
hash64.go
(1.95 KB)
๐
hash_test.go
(17.24 KB)
๐
heap_test.go
(529 B)
๐
heapdump.go
(17.88 KB)
๐
histogram.go
(7.3 KB)
๐
histogram_test.go
(3.51 KB)
๐
iface.go
(20.92 KB)
๐
iface_test.go
(7.45 KB)
๐
import_test.go
(1.42 KB)
๐
importx_test.go
(763 B)
๐
internal
๐
lfstack.go
(2.03 KB)
๐
lfstack_test.go
(2.74 KB)
๐
libfuzzer.go
(6.34 KB)
๐
libfuzzer_amd64.s
(5.03 KB)
๐
libfuzzer_arm64.s
(3.15 KB)
๐
lock_futex.go
(5.4 KB)
๐
lock_js.go
(7.28 KB)
๐
lock_sema.go
(6.75 KB)
๐
lock_wasip1.go
(2.01 KB)
๐
lockrank.go
(18.19 KB)
๐
lockrank_off.go
(1.17 KB)
๐
lockrank_on.go
(10.27 KB)
๐
lockrank_test.go
(856 B)
๐
malloc.go
(58.5 KB)
๐
malloc_test.go
(10.64 KB)
๐
map.go
(52.17 KB)
๐
map_benchmark_test.go
(10.59 KB)
๐
map_fast32.go
(12.74 KB)
๐
map_fast64.go
(12.92 KB)
๐
map_faststr.go
(14.32 KB)
๐
map_test.go
(31.75 KB)
๐
mbarrier.go
(13.78 KB)
๐
mbitmap.go
(22.54 KB)
๐
mbitmap_allocheaders.go
(44.67 KB)
๐
mbitmap_noallocheaders.go
(28.95 KB)
๐
mcache.go
(10 KB)
๐
mcentral.go
(8.05 KB)
๐
mcheckmark.go
(2.85 KB)
๐
mem.go
(6.72 KB)
๐
mem_aix.go
(2.01 KB)
๐
mem_bsd.go
(2.21 KB)
๐
mem_darwin.go
(1.96 KB)
๐
mem_js.go
(457 B)
๐
mem_linux.go
(4.98 KB)
๐
mem_plan9.go
(447 B)
๐
mem_sbrk.go
(4.19 KB)
๐
mem_wasip1.go
(392 B)
๐
mem_wasm.go
(488 B)
๐
mem_windows.go
(3.88 KB)
๐
memclr_386.s
(2.38 KB)
๐
memclr_amd64.s
(4.91 KB)
๐
memclr_arm.s
(2.6 KB)
๐
memclr_arm64.s
(3.62 KB)
๐
memclr_loong64.s
(843 B)
๐
memclr_mips64x.s
(1.72 KB)
๐
memclr_mipsx.s
(1.32 KB)
๐
memclr_plan9_386.s
(983 B)
๐
memclr_plan9_amd64.s
(511 B)
๐
memclr_ppc64x.s
(4.44 KB)
๐
memclr_riscv64.s
(1.71 KB)
๐
memclr_s390x.s
(1.96 KB)
๐
memclr_wasm.s
(485 B)
๐
memmove_386.s
(4.42 KB)
๐
memmove_amd64.s
(12.48 KB)
๐
memmove_arm.s
(5.9 KB)
๐
memmove_arm64.s
(5.96 KB)
๐
memmove_linux_amd64_test.go
(1.53 KB)
๐
memmove_loong64.s
(1.87 KB)
๐
memmove_mips64x.s
(1.83 KB)
๐
memmove_mipsx.s
(4.4 KB)
๐
memmove_plan9_386.s
(3.06 KB)
๐
memmove_plan9_amd64.s
(3.04 KB)
๐
memmove_ppc64x.s
(4.91 KB)
๐
memmove_riscv64.s
(5.46 KB)
๐
memmove_s390x.s
(2.92 KB)
๐
memmove_test.go
(21.23 KB)
๐
memmove_wasm.s
(479 B)
๐
metrics
๐
metrics.go
(26.01 KB)
๐
metrics_test.go
(42.46 KB)
๐
mfinal.go
(18.91 KB)
๐
mfinal_test.go
(5.57 KB)
๐
mfixalloc.go
(3.13 KB)
๐
mgc.go
(59.29 KB)
๐
mgclimit.go
(17.28 KB)
๐
mgclimit_test.go
(9.02 KB)
๐
mgcmark.go
(53.07 KB)
๐
mgcpacer.go
(55.36 KB)
๐
mgcpacer_test.go
(39.26 KB)
๐
mgcscavenge.go
(52.32 KB)
๐
mgcscavenge_test.go
(25.2 KB)
๐
mgcstack.go
(10.58 KB)
๐
mgcsweep.go
(32.26 KB)
๐
mgcwork.go
(12.89 KB)
๐
mheap.go
(72.64 KB)
๐
minmax.go
(1.46 KB)
๐
minmax_test.go
(3.31 KB)
๐
mkduff.go
(8.04 KB)
๐
mkfastlog2table.go
(3.08 KB)
๐
mklockrank.go
(9 KB)
๐
mkpreempt.go
(15.33 KB)
๐
mksizeclasses.go
(9.52 KB)
๐
mmap.go
(844 B)
๐
mpagealloc.go
(39.23 KB)
๐
mpagealloc_32bit.go
(4.56 KB)
๐
mpagealloc_64bit.go
(9.34 KB)
๐
mpagealloc_test.go
(32.59 KB)
๐
mpagecache.go
(5.59 KB)
๐
mpagecache_test.go
(10.79 KB)
๐
mpallocbits.go
(12.58 KB)
๐
mpallocbits_test.go
(13.69 KB)
๐
mprof.go
(47.4 KB)
๐
mranges.go
(14.46 KB)
๐
mranges_test.go
(5.68 KB)
๐
msan
๐
msan.go
(1.5 KB)
๐
msan0.go
(725 B)
๐
msan_amd64.s
(2.3 KB)
๐
msan_arm64.s
(1.98 KB)
๐
msan_loong64.s
(1.96 KB)
๐
msize_allocheaders.go
(1.32 KB)
๐
msize_noallocheaders.go
(915 B)
๐
mspanset.go
(13.12 KB)
๐
mstats.go
(33.81 KB)
๐
mwbbuf.go
(8.13 KB)
๐
nbpipe_pipe.go
(405 B)
๐
nbpipe_pipe2.go
(344 B)
๐
nbpipe_pipe_test.go
(706 B)
๐
nbpipe_test.go
(1.99 KB)
๐
net_plan9.go
(645 B)
๐
netpoll.go
(20.55 KB)
๐
netpoll_aix.go
(5.06 KB)
๐
netpoll_epoll.go
(4.4 KB)
๐
netpoll_fake.go
(664 B)
๐
netpoll_kqueue.go
(5.62 KB)
๐
netpoll_os_test.go
(520 B)
๐
netpoll_solaris.go
(11.2 KB)
๐
netpoll_stub.go
(1.48 KB)
๐
netpoll_wasip1.go
(6.08 KB)
๐
netpoll_windows.go
(4.01 KB)
๐
nonwindows_stub.go
(729 B)
๐
norace_linux_test.go
(915 B)
๐
norace_test.go
(983 B)
๐
numcpu_freebsd_test.go
(381 B)
๐
os2_aix.go
(20.88 KB)
๐
os2_freebsd.go
(302 B)
๐
os2_openbsd.go
(296 B)
๐
os2_plan9.go
(1.48 KB)
๐
os2_solaris.go
(320 B)
๐
os3_plan9.go
(3.94 KB)
๐
os3_solaris.go
(17.59 KB)
๐
os_aix.go
(8.89 KB)
๐
os_android.go
(463 B)
๐
os_darwin.go
(11.92 KB)
๐
os_darwin_arm64.go
(329 B)
๐
os_dragonfly.go
(7.14 KB)
๐
os_freebsd.go
(11.64 KB)
๐
os_freebsd2.go
(603 B)
๐
os_freebsd_amd64.go
(658 B)
๐
os_freebsd_arm.go
(1.45 KB)
๐
os_freebsd_arm64.go
(320 B)
๐
os_freebsd_noauxv.go
(241 B)
๐
os_freebsd_riscv64.go
(198 B)
๐
os_illumos.go
(3.93 KB)
๐
os_js.go
(767 B)
๐
os_linux.go
(25.71 KB)
๐
os_linux_arm.go
(1.51 KB)
๐
os_linux_arm64.go
(478 B)
๐
os_linux_be64.go
(806 B)
๐
os_linux_generic.go
(870 B)
๐
os_linux_loong64.go
(263 B)
๐
os_linux_mips64x.go
(996 B)
๐
os_linux_mipsx.go
(987 B)
๐
os_linux_noauxv.go
(337 B)
๐
os_linux_novdso.go
(347 B)
๐
os_linux_ppc64x.go
(526 B)
๐
os_linux_riscv64.go
(198 B)
๐
os_linux_s390x.go
(825 B)
๐
os_linux_x86.go
(234 B)
๐
os_netbsd.go
(10.12 KB)
๐
os_netbsd_386.go
(617 B)
๐
os_netbsd_amd64.go
(614 B)
๐
os_netbsd_arm.go
(1.07 KB)
๐
os_netbsd_arm64.go
(769 B)
๐
os_nonopenbsd.go
(437 B)
๐
os_only_solaris.go
(357 B)
๐
os_openbsd.go
(6.23 KB)
๐
os_openbsd_arm.go
(662 B)
๐
os_openbsd_arm64.go
(329 B)
๐
os_openbsd_libc.go
(1.49 KB)
๐
os_openbsd_mips64.go
(329 B)
๐
os_openbsd_syscall.go
(1.36 KB)
๐
os_openbsd_syscall1.go
(441 B)
๐
os_openbsd_syscall2.go
(2.51 KB)
๐
os_plan9.go
(10.18 KB)
๐
os_plan9_arm.go
(375 B)
๐
os_solaris.go
(6.62 KB)
๐
os_unix.go
(436 B)
๐
os_unix_nonlinux.go
(374 B)
๐
os_wasip1.go
(7 KB)
๐
os_wasm.go
(3.15 KB)
๐
os_windows.go
(41.39 KB)
๐
os_windows_arm.go
(511 B)
๐
os_windows_arm64.go
(339 B)
๐
pagetrace_off.go
(550 B)
๐
pagetrace_on.go
(10.36 KB)
๐
panic.go
(41.85 KB)
๐
panic32.go
(4.8 KB)
๐
panic_test.go
(1.71 KB)
๐
panicnil_test.go
(1.25 KB)
๐
pinner.go
(10.98 KB)
๐
pinner_test.go
(11.04 KB)
๐
plugin.go
(4.37 KB)
๐
pprof
๐
preempt.go
(15.03 KB)
๐
preempt_386.s
(824 B)
๐
preempt_amd64.s
(1.67 KB)
๐
preempt_arm.s
(1.49 KB)
๐
preempt_arm64.s
(1.97 KB)
๐
preempt_loong64.s
(2.41 KB)
๐
preempt_mips64x.s
(2.72 KB)
๐
preempt_mipsx.s
(2.68 KB)
๐
preempt_nonwindows.go
(290 B)
๐
preempt_ppc64x.s
(2.72 KB)
๐
preempt_riscv64.s
(2.26 KB)
๐
preempt_s390x.s
(1.01 KB)
๐
preempt_wasm.s
(176 B)
๐
print.go
(5.92 KB)
๐
proc.go
(204.28 KB)
๐
proc_runtime_test.go
(1.38 KB)
๐
proc_test.go
(25.85 KB)
๐
profbuf.go
(18.26 KB)
๐
profbuf_test.go
(8.54 KB)
๐
proflabel.go
(1.52 KB)
๐
race
๐
race.go
(18.81 KB)
๐
race0.go
(2.79 KB)
๐
race_amd64.s
(13.94 KB)
๐
race_arm64.s
(14.21 KB)
๐
race_ppc64le.s
(15.93 KB)
๐
race_s390x.s
(11.99 KB)
๐
rand.go
(7.11 KB)
๐
rand_test.go
(1.95 KB)
๐
rdebug.go
(550 B)
๐
retry.go
(760 B)
๐
rt0_aix_ppc64.s
(4.09 KB)
๐
rt0_android_386.s
(822 B)
๐
rt0_android_amd64.s
(754 B)
๐
rt0_android_arm.s
(843 B)
๐
rt0_android_arm64.s
(941 B)
๐
rt0_darwin_amd64.s
(399 B)
๐
rt0_darwin_arm64.s
(1.69 KB)
๐
rt0_dragonfly_amd64.s
(448 B)
๐
rt0_freebsd_386.s
(454 B)
๐
rt0_freebsd_amd64.s
(442 B)
๐
rt0_freebsd_arm.s
(298 B)
๐
rt0_freebsd_arm64.s
(1.88 KB)
๐
rt0_freebsd_riscv64.s
(2.72 KB)
๐
rt0_illumos_amd64.s
(311 B)
๐
rt0_ios_amd64.s
(425 B)
๐
rt0_ios_arm64.s
(425 B)
๐
rt0_js_wasm.s
(1.53 KB)
๐
rt0_linux_386.s
(450 B)
๐
rt0_linux_amd64.s
(307 B)
๐
rt0_linux_arm.s
(1007 B)
๐
rt0_linux_arm64.s
(1.81 KB)
๐
rt0_linux_loong64.s
(2.01 KB)
๐
rt0_linux_mips64x.s
(1014 B)
๐
rt0_linux_mipsx.s
(797 B)
๐
rt0_linux_ppc64.s
(847 B)
๐
rt0_linux_ppc64le.s
(2.89 KB)
๐
rt0_linux_riscv64.s
(2.65 KB)
๐
rt0_linux_s390x.s
(676 B)
๐
rt0_netbsd_386.s
(452 B)
๐
rt0_netbsd_amd64.s
(309 B)
๐
rt0_netbsd_arm.s
(296 B)
๐
rt0_netbsd_arm64.s
(1.8 KB)
๐
rt0_openbsd_386.s
(454 B)
๐
rt0_openbsd_amd64.s
(311 B)
๐
rt0_openbsd_arm.s
(298 B)
๐
rt0_openbsd_arm64.s
(1.96 KB)
๐
rt0_openbsd_mips64.s
(976 B)
๐
rt0_openbsd_ppc64.s
(370 B)
๐
rt0_openbsd_riscv64.s
(372 B)
๐
rt0_plan9_386.s
(523 B)
๐
rt0_plan9_amd64.s
(481 B)
๐
rt0_plan9_arm.s
(397 B)
๐
rt0_solaris_amd64.s
(311 B)
๐
rt0_wasip1_wasm.s
(387 B)
๐
rt0_windows_386.s
(1.28 KB)
๐
rt0_windows_amd64.s
(1.14 KB)
๐
rt0_windows_arm.s
(386 B)
๐
rt0_windows_arm64.s
(733 B)
๐
runtime-gdb.py
(15.44 KB)
๐
runtime-gdb_test.go
(24.04 KB)
๐
runtime-gdb_unix_test.go
(9.4 KB)
๐
runtime-lldb_test.go
(4.95 KB)
๐
runtime-seh_windows_test.go
(4.7 KB)
๐
runtime.go
(7.1 KB)
๐
runtime1.go
(16.66 KB)
๐
runtime2.go
(46.16 KB)
๐
runtime_boring.go
(606 B)
๐
runtime_linux_test.go
(1.77 KB)
๐
runtime_mmap_test.go
(1.77 KB)
๐
runtime_test.go
(11.81 KB)
๐
runtime_unix_test.go
(1.22 KB)
๐
rwmutex.go
(5 KB)
๐
rwmutex_test.go
(4.21 KB)
๐
security_aix.go
(449 B)
๐
security_issetugid.go
(502 B)
๐
security_linux.go
(335 B)
๐
security_nonunix.go
(256 B)
๐
security_test.go
(4.09 KB)
๐
security_unix.go
(818 B)
๐
select.go
(14.82 KB)
๐
sema.go
(18.43 KB)
๐
sema_test.go
(4.21 KB)
๐
semasleep_test.go
(3.46 KB)
๐
sigaction.go
(489 B)
๐
signal_386.go
(1.72 KB)
๐
signal_aix_ppc64.go
(3.54 KB)
๐
signal_amd64.go
(2.73 KB)
๐
signal_arm.go
(2.54 KB)
๐
signal_arm64.go
(3.83 KB)
๐
signal_darwin.go
(2.13 KB)
๐
signal_darwin_amd64.go
(4 KB)
๐
signal_darwin_arm64.go
(3.6 KB)
๐
signal_dragonfly.go
(2.17 KB)
๐
signal_dragonfly_amd64.go
(2.01 KB)
๐
signal_freebsd.go
(2.2 KB)
๐
signal_freebsd_386.go
(1.55 KB)
๐
signal_freebsd_amd64.go
(2.03 KB)
๐
signal_freebsd_arm.go
(2.18 KB)
๐
signal_freebsd_arm64.go
(3.24 KB)
๐
signal_freebsd_riscv64.go
(3.08 KB)
๐
signal_linux_386.go
(1.59 KB)
๐
signal_linux_amd64.go
(2.05 KB)
๐
signal_linux_arm.go
(2.12 KB)
๐
signal_linux_arm64.go
(2.95 KB)
๐
signal_linux_loong64.go
(3.22 KB)
๐
signal_linux_mips64x.go
(3.35 KB)
๐
signal_linux_mipsx.go
(3.67 KB)
๐
signal_linux_ppc64x.go
(3.5 KB)
๐
signal_linux_riscv64.go
(2.92 KB)
๐
signal_linux_s390x.go
(4.49 KB)
๐
signal_loong64.go
(3.01 KB)
๐
signal_mips64x.go
(3.18 KB)
๐
signal_mipsx.go
(3.06 KB)
๐
signal_netbsd.go
(2.18 KB)
๐
signal_netbsd_386.go
(1.76 KB)
๐
signal_netbsd_amd64.go
(2.33 KB)
๐
signal_netbsd_arm.go
(2.3 KB)
๐
signal_netbsd_arm64.go
(3.4 KB)
๐
signal_openbsd.go
(2.18 KB)
๐
signal_openbsd_386.go
(1.58 KB)
๐
signal_openbsd_amd64.go
(2.04 KB)
๐
signal_openbsd_arm.go
(2.12 KB)
๐
signal_openbsd_arm64.go
(3.39 KB)
๐
signal_openbsd_mips64.go
(3.28 KB)
๐
signal_openbsd_ppc64.go
(3.53 KB)
๐
signal_openbsd_riscv64.go
(3.12 KB)
๐
signal_plan9.go
(1.93 KB)
๐
signal_ppc64x.go
(3.71 KB)
๐
signal_riscv64.go
(2.91 KB)
๐
signal_solaris.go
(4.5 KB)
๐
signal_solaris_amd64.go
(2.47 KB)
๐
signal_unix.go
(44.11 KB)
๐
signal_windows.go
(14.48 KB)
๐
signal_windows_test.go
(8.98 KB)
๐
sigqueue.go
(7.62 KB)
๐
sigqueue_note.go
(648 B)
๐
sigqueue_plan9.go
(3.25 KB)
๐
sigtab_aix.go
(11.3 KB)
๐
sigtab_linux_generic.go
(3.52 KB)
๐
sigtab_linux_mipsx.go
(5.95 KB)
๐
sizeclasses.go
(9.17 KB)
๐
sizeof_test.go
(1003 B)
๐
slice.go
(11.23 KB)
๐
slice_test.go
(10.32 KB)
๐
softfloat64.go
(11.54 KB)
๐
softfloat64_test.go
(4.04 KB)
๐
stack.go
(40.02 KB)
๐
stack_test.go
(23.14 KB)
๐
start_line_amd64_test.go
(647 B)
๐
start_line_test.go
(2.58 KB)
๐
stkframe.go
(9.88 KB)
๐
string.go
(13.35 KB)
๐
string_test.go
(13.33 KB)
๐
stubs.go
(17.39 KB)
๐
stubs2.go
(1.15 KB)
๐
stubs3.go
(324 B)
๐
stubs_386.go
(708 B)
๐
stubs_amd64.go
(1.38 KB)
๐
stubs_arm.go
(689 B)
๐
stubs_arm64.go
(700 B)
๐
stubs_linux.go
(650 B)
๐
stubs_loong64.go
(638 B)
๐
stubs_mips64x.go
(522 B)
๐
stubs_mipsx.go
(441 B)
๐
stubs_nonlinux.go
(298 B)
๐
stubs_ppc64.go
(302 B)
๐
stubs_ppc64x.go
(688 B)
๐
stubs_riscv64.go
(695 B)
๐
stubs_s390x.go
(414 B)
๐
symtab.go
(34.76 KB)
๐
symtab_test.go
(7.48 KB)
๐
symtabinl.go
(3.81 KB)
๐
symtabinl_test.go
(2.97 KB)
๐
sys_aix_ppc64.s
(7.42 KB)
๐
sys_arm.go
(521 B)
๐
sys_arm64.go
(469 B)
๐
sys_darwin.go
(22.56 KB)
๐
sys_darwin_amd64.s
(19.65 KB)
๐
sys_darwin_arm64.go
(1.74 KB)
๐
sys_darwin_arm64.s
(18.28 KB)
๐
sys_dragonfly_amd64.s
(8.31 KB)
๐
sys_freebsd_386.s
(9.41 KB)
๐
sys_freebsd_amd64.s
(12.67 KB)
๐
sys_freebsd_arm.s
(10.38 KB)
๐
sys_freebsd_arm64.s
(9.49 KB)
๐
sys_freebsd_riscv64.s
(8.92 KB)
๐
sys_libc.go
(1.84 KB)
๐
sys_linux_386.s
(17.89 KB)
๐
sys_linux_amd64.s
(15.74 KB)
๐
sys_linux_arm.s
(13.5 KB)
๐
sys_linux_arm64.s
(16.71 KB)
๐
sys_linux_loong64.s
(14.16 KB)
๐
sys_linux_mips64x.s
(11.96 KB)
๐
sys_linux_mipsx.s
(9.69 KB)
๐
sys_linux_ppc64x.s
(18.09 KB)
๐
sys_linux_riscv64.s
(11.48 KB)
๐
sys_linux_s390x.s
(12.49 KB)
๐
sys_loong64.go
(489 B)
๐
sys_mips64x.go
(500 B)
๐
sys_mipsx.go
(496 B)
๐
sys_netbsd_386.s
(9.61 KB)
๐
sys_netbsd_amd64.s
(9.78 KB)
๐
sys_netbsd_arm.s
(10.58 KB)
๐
sys_netbsd_arm64.s
(9.47 KB)
๐
sys_nonppc64x.go
(245 B)
๐
sys_openbsd.go
(2.59 KB)
๐
sys_openbsd1.go
(1.23 KB)
๐
sys_openbsd2.go
(8.67 KB)
๐
sys_openbsd3.go
(3.37 KB)
๐
sys_openbsd_386.s
(20.4 KB)
๐
sys_openbsd_amd64.s
(15.54 KB)
๐
sys_openbsd_arm.s
(18.46 KB)
๐
sys_openbsd_arm64.s
(15.05 KB)
๐
sys_openbsd_mips64.s
(8.81 KB)
๐
sys_openbsd_ppc64.s
(15.3 KB)
๐
sys_openbsd_riscv64.s
(16.8 KB)
๐
sys_plan9_386.s
(4.48 KB)
๐
sys_plan9_amd64.s
(4.56 KB)
๐
sys_plan9_arm.s
(7.03 KB)
๐
sys_ppc64x.go
(532 B)
๐
sys_riscv64.go
(469 B)
๐
sys_s390x.go
(469 B)
๐
sys_solaris_amd64.s
(6.42 KB)
๐
sys_wasm.go
(758 B)
๐
sys_wasm.s
(1.43 KB)
๐
sys_windows_386.s
(6.46 KB)
๐
sys_windows_amd64.s
(8.41 KB)
๐
sys_windows_arm.s
(7.72 KB)
๐
sys_windows_arm64.s
(6.8 KB)
๐
sys_x86.go
(552 B)
๐
syscall2_solaris.go
(1.85 KB)
๐
syscall_aix.go
(6.33 KB)
๐
syscall_solaris.go
(8.38 KB)
๐
syscall_unix_test.go
(635 B)
๐
syscall_windows.go
(16.57 KB)
๐
syscall_windows_test.go
(32.45 KB)
๐
tagptr.go
(496 B)
๐
tagptr_32bit.go
(927 B)
๐
tagptr_64bit.go
(3.23 KB)
๐
test_amd64.go
(196 B)
๐
test_amd64.s
(316 B)
๐
test_stubs.go
(218 B)
๐
testdata
๐
textflag.h
(1.47 KB)
๐
time.go
(30.57 KB)
๐
time_fake.go
(2.5 KB)
๐
time_linux_amd64.s
(2.02 KB)
๐
time_nofake.go
(709 B)
๐
time_test.go
(2.04 KB)
๐
time_windows.h
(753 B)
๐
time_windows_386.s
(1.71 KB)
๐
time_windows_amd64.s
(786 B)
๐
time_windows_arm.s
(1.97 KB)
๐
time_windows_arm64.s
(906 B)
๐
timeasm.go
(418 B)
๐
timestub.go
(532 B)
๐
timestub2.go
(363 B)
๐
tls_arm.s
(3.45 KB)
๐
tls_arm64.h
(1.1 KB)
๐
tls_arm64.s
(1.2 KB)
๐
tls_loong64.s
(589 B)
๐
tls_mips64x.s
(733 B)
๐
tls_mipsx.s
(710 B)
๐
tls_ppc64x.s
(1.52 KB)
๐
tls_riscv64.s
(615 B)
๐
tls_s390x.s
(1.55 KB)
๐
tls_stub.go
(260 B)
๐
tls_windows_amd64.go
(294 B)
๐
trace
๐
trace.go
(62.76 KB)
๐
trace2.go
(33.81 KB)
๐
trace2buf.go
(6.58 KB)
๐
trace2cpu.go
(8.87 KB)
๐
trace2event.go
(8.39 KB)
๐
trace2map.go
(4.36 KB)
๐
trace2region.go
(1.68 KB)
๐
trace2runtime.go
(24.2 KB)
๐
trace2stack.go
(9.45 KB)
๐
trace2status.go
(7.24 KB)
๐
trace2string.go
(2.59 KB)
๐
trace2time.go
(3.21 KB)
๐
trace_cgo_test.go
(4.47 KB)
๐
traceback.go
(54.61 KB)
๐
traceback_test.go
(22.95 KB)
๐
tracebackx_test.go
(509 B)
๐
type.go
(12.1 KB)
๐
typekind.go
(743 B)
๐
unsafe.go
(2.97 KB)
๐
unsafepoint_test.go
(3.27 KB)
๐
utf8.go
(3.39 KB)
๐
vdso_elf32.go
(2.76 KB)
๐
vdso_elf64.go
(2.84 KB)
๐
vdso_freebsd.go
(2.44 KB)
๐
vdso_freebsd_arm.go
(454 B)
๐
vdso_freebsd_arm64.go
(454 B)
๐
vdso_freebsd_riscv64.go
(429 B)
๐
vdso_freebsd_x86.go
(1.86 KB)
๐
vdso_in_none.go
(443 B)
๐
vdso_linux.go
(7.77 KB)
๐
vdso_linux_386.go
(669 B)
๐
vdso_linux_amd64.go
(685 B)
๐
vdso_linux_arm.go
(669 B)
๐
vdso_linux_arm64.go
(670 B)
๐
vdso_linux_loong64.go
(793 B)
๐
vdso_linux_mips64x.go
(850 B)
๐
vdso_linux_ppc64x.go
(672 B)
๐
vdso_linux_riscv64.go
(666 B)
๐
vdso_linux_s390x.go
(659 B)
๐
vdso_test.go
(3.71 KB)
๐
vlop_386.s
(2.02 KB)
๐
vlop_arm.s
(7.06 KB)
๐
vlop_arm_test.go
(3.75 KB)
๐
vlrt.go
(6.71 KB)
๐
wincallback.go
(3.45 KB)
๐
write_err.go
(291 B)
๐
write_err_android.go
(4.65 KB)
๐
zcallback_windows.go
(155 B)
๐
zcallback_windows.s
(63.06 KB)
๐
zcallback_windows_arm.s
(89.32 KB)
๐
zcallback_windows_arm64.s
(89.32 KB)
Editing: race_ppc64le.s
// Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build race #include "go_asm.h" #include "go_tls.h" #include "funcdata.h" #include "textflag.h" #include "asm_ppc64x.h" #include "cgo/abi_ppc64x.h" // The following functions allow calling the clang-compiled race runtime directly // from Go code without going all the way through cgo. // First, it's much faster (up to 50% speedup for real Go programs). // Second, it eliminates race-related special cases from cgocall and scheduler. // Third, in long-term it will allow to remove cyclic runtime/race dependency on cmd/go. // A brief recap of the ppc64le calling convention. // Arguments are passed in R3, R4, R5 ... // SP must be 16-byte aligned. // Note that for ppc64x, LLVM follows the standard ABI and // expects arguments in registers, so these functions move // the arguments from storage to the registers expected // by the ABI. // When calling from Go to Clang tsan code: // R3 is the 1st argument and is usually the ThreadState* // R4-? are the 2nd, 3rd, 4th, etc. arguments // When calling racecalladdr: // R8 is the call target address // The race ctx is passed in R3 and loaded in // racecalladdr. // // The sequence used to get the race ctx: // MOVD runtimeยทtls_g(SB), R10 // Address of TLS variable // MOVD 0(R10), g // g = R30 // MOVD g_racectx(g), R3 // racectx == ThreadState // func runtimeยทRaceRead(addr uintptr) // Called from instrumented Go code TEXT runtimeยทraceread<ABIInternal>(SB), NOSPLIT, $0-8 MOVD R3, R4 // addr MOVD LR, R5 // caller of this? // void __tsan_read(ThreadState *thr, void *addr, void *pc); MOVD $__tsan_read(SB), R8 BR racecalladdr<>(SB) TEXT runtimeยทRaceRead(SB), NOSPLIT, $0-8 BR runtimeยทraceread(SB) // void runtimeยทracereadpc(void *addr, void *callpc, void *pc) TEXT runtimeยทracereadpc(SB), NOSPLIT, $0-24 MOVD addr+0(FP), R4 MOVD callpc+8(FP), R5 MOVD pc+16(FP), R6 // void __tsan_read_pc(ThreadState *thr, void *addr, void *callpc, void *pc); MOVD $__tsan_read_pc(SB), R8 BR racecalladdr<>(SB) // func runtimeยทRaceWrite(addr uintptr) // Called from instrumented Go code TEXT runtimeยทracewrite<ABIInternal>(SB), NOSPLIT, $0-8 MOVD R3, R4 // addr MOVD LR, R5 // caller has set LR via BL inst // void __tsan_write(ThreadState *thr, void *addr, void *pc); MOVD $__tsan_write(SB), R8 BR racecalladdr<>(SB) TEXT runtimeยทRaceWrite(SB), NOSPLIT, $0-8 JMP runtimeยทracewrite(SB) // void runtimeยทracewritepc(void *addr, void *callpc, void *pc) TEXT runtimeยทracewritepc(SB), NOSPLIT, $0-24 MOVD addr+0(FP), R4 MOVD callpc+8(FP), R5 MOVD pc+16(FP), R6 // void __tsan_write_pc(ThreadState *thr, void *addr, void *callpc, void *pc); MOVD $__tsan_write_pc(SB), R8 BR racecalladdr<>(SB) // func runtimeยทRaceReadRange(addr, size uintptr) // Called from instrumented Go code. TEXT runtimeยทracereadrange<ABIInternal>(SB), NOSPLIT, $0-16 MOVD R4, R5 // size MOVD R3, R4 // addr MOVD LR, R6 // void __tsan_read_range(ThreadState *thr, void *addr, uintptr size, void *pc); MOVD $__tsan_read_range(SB), R8 BR racecalladdr<>(SB) // void runtimeยทracereadrangepc1(void *addr, uintptr sz, void *pc) TEXT runtimeยทracereadrangepc1(SB), NOSPLIT, $0-24 MOVD addr+0(FP), R4 MOVD size+8(FP), R5 MOVD pc+16(FP), R6 ADD $4, R6 // tsan wants return addr // void __tsan_read_range(ThreadState *thr, void *addr, uintptr size, void *pc); MOVD $__tsan_read_range(SB), R8 BR racecalladdr<>(SB) TEXT runtimeยทRaceReadRange(SB), NOSPLIT, $0-16 BR runtimeยทracereadrange(SB) // func runtimeยทRaceWriteRange(addr, size uintptr) // Called from instrumented Go code. TEXT runtimeยทracewriterange<ABIInternal>(SB), NOSPLIT, $0-16 MOVD R4, R5 // size MOVD R3, R4 // addr MOVD LR, R6 // void __tsan_write_range(ThreadState *thr, void *addr, uintptr size, void *pc); MOVD $__tsan_write_range(SB), R8 BR racecalladdr<>(SB) TEXT runtimeยทRaceWriteRange(SB), NOSPLIT, $0-16 BR runtimeยทracewriterange(SB) // void runtimeยทracewriterangepc1(void *addr, uintptr sz, void *pc) // Called from instrumented Go code TEXT runtimeยทracewriterangepc1(SB), NOSPLIT, $0-24 MOVD addr+0(FP), R4 MOVD size+8(FP), R5 MOVD pc+16(FP), R6 ADD $4, R6 // add 4 to inst offset? // void __tsan_write_range(ThreadState *thr, void *addr, uintptr size, void *pc); MOVD $__tsan_write_range(SB), R8 BR racecalladdr<>(SB) // Call a __tsan function from Go code. // R8 = tsan function address // R3 = *ThreadState a.k.a. g_racectx from g // R4 = addr passed to __tsan function // // Otherwise, setup goroutine context and invoke racecall. Other arguments already set. TEXT racecalladdr<>(SB), NOSPLIT, $0-0 MOVD runtimeยทtls_g(SB), R10 MOVD 0(R10), g MOVD g_racectx(g), R3 // goroutine context // Check that addr is within [arenastart, arenaend) or within [racedatastart, racedataend). MOVD runtimeยทracearenastart(SB), R9 CMP R4, R9 BLT data MOVD runtimeยทracearenaend(SB), R9 CMP R4, R9 BLT call data: MOVD runtimeยทracedatastart(SB), R9 CMP R4, R9 BLT ret MOVD runtimeยทracedataend(SB), R9 CMP R4, R9 BGT ret call: // Careful!! racecall will save LR on its // stack, which is OK as long as racecalladdr // doesn't change in a way that generates a stack. // racecall should return to the caller of // recalladdr. BR racecall<>(SB) ret: RET // func runtimeยทracefuncenter(pc uintptr) // Called from instrumented Go code. TEXT runtimeยทracefuncenter(SB), NOSPLIT, $0-8 MOVD callpc+0(FP), R8 BR racefuncenter<>(SB) // Common code for racefuncenter // R11 = caller's return address TEXT racefuncenter<>(SB), NOSPLIT, $0-0 MOVD runtimeยทtls_g(SB), R10 MOVD 0(R10), g MOVD g_racectx(g), R3 // goroutine racectx aka *ThreadState MOVD R8, R4 // caller pc set by caller in R8 // void __tsan_func_enter(ThreadState *thr, void *pc); MOVD $__tsan_func_enter(SB), R8 BR racecall<>(SB) RET // func runtimeยทracefuncexit() // Called from Go instrumented code. TEXT runtimeยทracefuncexit(SB), NOSPLIT, $0-0 MOVD runtimeยทtls_g(SB), R10 MOVD 0(R10), g MOVD g_racectx(g), R3 // goroutine racectx aka *ThreadState // void __tsan_func_exit(ThreadState *thr); MOVD $__tsan_func_exit(SB), R8 BR racecall<>(SB) // Atomic operations for sync/atomic package. // Some use the __tsan versions instead // R6 = addr of arguments passed to this function // R3, R4, R5 set in racecallatomic // Load atomic in tsan TEXT syncโatomicยทLoadInt32(SB), NOSPLIT, $0-12 GO_ARGS // void __tsan_go_atomic32_load(ThreadState *thr, uptr cpc, uptr pc, u8 *a); MOVD $__tsan_go_atomic32_load(SB), R8 ADD $32, R1, R6 // addr of caller's 1st arg BR racecallatomic<>(SB) RET TEXT syncโatomicยทLoadInt64(SB), NOSPLIT, $0-16 GO_ARGS // void __tsan_go_atomic64_load(ThreadState *thr, uptr cpc, uptr pc, u8 *a); MOVD $__tsan_go_atomic64_load(SB), R8 ADD $32, R1, R6 // addr of caller's 1st arg BR racecallatomic<>(SB) RET TEXT syncโatomicยทLoadUint32(SB), NOSPLIT, $0-12 GO_ARGS BR syncโatomicยทLoadInt32(SB) TEXT syncโatomicยทLoadUint64(SB), NOSPLIT, $0-16 GO_ARGS BR syncโatomicยทLoadInt64(SB) TEXT syncโatomicยทLoadUintptr(SB), NOSPLIT, $0-16 GO_ARGS BR syncโatomicยทLoadInt64(SB) TEXT syncโatomicยทLoadPointer(SB), NOSPLIT, $0-16 GO_ARGS BR syncโatomicยทLoadInt64(SB) // Store atomic in tsan TEXT syncโatomicยทStoreInt32(SB), NOSPLIT, $0-12 GO_ARGS // void __tsan_go_atomic32_store(ThreadState *thr, uptr cpc, uptr pc, u8 *a); MOVD $__tsan_go_atomic32_store(SB), R8 ADD $32, R1, R6 // addr of caller's 1st arg BR racecallatomic<>(SB) TEXT syncโatomicยทStoreInt64(SB), NOSPLIT, $0-16 GO_ARGS // void __tsan_go_atomic64_store(ThreadState *thr, uptr cpc, uptr pc, u8 *a); MOVD $__tsan_go_atomic64_store(SB), R8 ADD $32, R1, R6 // addr of caller's 1st arg BR racecallatomic<>(SB) TEXT syncโatomicยทStoreUint32(SB), NOSPLIT, $0-12 GO_ARGS BR syncโatomicยทStoreInt32(SB) TEXT syncโatomicยทStoreUint64(SB), NOSPLIT, $0-16 GO_ARGS BR syncโatomicยทStoreInt64(SB) TEXT syncโatomicยทStoreUintptr(SB), NOSPLIT, $0-16 GO_ARGS BR syncโatomicยทStoreInt64(SB) // Swap in tsan TEXT syncโatomicยทSwapInt32(SB), NOSPLIT, $0-20 GO_ARGS // void __tsan_go_atomic32_exchange(ThreadState *thr, uptr cpc, uptr pc, u8 *a); MOVD $__tsan_go_atomic32_exchange(SB), R8 ADD $32, R1, R6 // addr of caller's 1st arg BR racecallatomic<>(SB) TEXT syncโatomicยทSwapInt64(SB), NOSPLIT, $0-24 GO_ARGS // void __tsan_go_atomic64_exchange(ThreadState *thr, uptr cpc, uptr pc, u8 *a) MOVD $__tsan_go_atomic64_exchange(SB), R8 ADD $32, R1, R6 // addr of caller's 1st arg BR racecallatomic<>(SB) TEXT syncโatomicยทSwapUint32(SB), NOSPLIT, $0-20 GO_ARGS BR syncโatomicยทSwapInt32(SB) TEXT syncโatomicยทSwapUint64(SB), NOSPLIT, $0-24 GO_ARGS BR syncโatomicยทSwapInt64(SB) TEXT syncโatomicยทSwapUintptr(SB), NOSPLIT, $0-24 GO_ARGS BR syncโatomicยทSwapInt64(SB) // Add atomic in tsan TEXT syncโatomicยทAddInt32(SB), NOSPLIT, $0-20 GO_ARGS // void __tsan_go_atomic32_fetch_add(ThreadState *thr, uptr cpc, uptr pc, u8 *a); MOVD $__tsan_go_atomic32_fetch_add(SB), R8 ADD $64, R1, R6 // addr of caller's 1st arg BL racecallatomic<>(SB) // The tsan fetch_add result is not as expected by Go, // so the 'add' must be added to the result. MOVW add+8(FP), R3 // The tsa fetch_add does not return the MOVW ret+16(FP), R4 // result as expected by go, so fix it. ADD R3, R4, R3 MOVW R3, ret+16(FP) RET TEXT syncโatomicยทAddInt64(SB), NOSPLIT, $0-24 GO_ARGS // void __tsan_go_atomic64_fetch_add(ThreadState *thr, uptr cpc, uptr pc, u8 *a); MOVD $__tsan_go_atomic64_fetch_add(SB), R8 ADD $64, R1, R6 // addr of caller's 1st arg BL racecallatomic<>(SB) // The tsan fetch_add result is not as expected by Go, // so the 'add' must be added to the result. MOVD add+8(FP), R3 MOVD ret+16(FP), R4 ADD R3, R4, R3 MOVD R3, ret+16(FP) RET TEXT syncโatomicยทAddUint32(SB), NOSPLIT, $0-20 GO_ARGS BR syncโatomicยทAddInt32(SB) TEXT syncโatomicยทAddUint64(SB), NOSPLIT, $0-24 GO_ARGS BR syncโatomicยทAddInt64(SB) TEXT syncโatomicยทAddUintptr(SB), NOSPLIT, $0-24 GO_ARGS BR syncโatomicยทAddInt64(SB) // CompareAndSwap in tsan TEXT syncโatomicยทCompareAndSwapInt32(SB), NOSPLIT, $0-17 GO_ARGS // void __tsan_go_atomic32_compare_exchange( // ThreadState *thr, uptr cpc, uptr pc, u8 *a) MOVD $__tsan_go_atomic32_compare_exchange(SB), R8 ADD $32, R1, R6 // addr of caller's 1st arg BR racecallatomic<>(SB) TEXT syncโatomicยทCompareAndSwapInt64(SB), NOSPLIT, $0-25 GO_ARGS // void __tsan_go_atomic32_compare_exchange( // ThreadState *thr, uptr cpc, uptr pc, u8 *a) MOVD $__tsan_go_atomic64_compare_exchange(SB), R8 ADD $32, R1, R6 // addr of caller's 1st arg BR racecallatomic<>(SB) TEXT syncโatomicยทCompareAndSwapUint32(SB), NOSPLIT, $0-17 GO_ARGS BR syncโatomicยทCompareAndSwapInt32(SB) TEXT syncโatomicยทCompareAndSwapUint64(SB), NOSPLIT, $0-25 GO_ARGS BR syncโatomicยทCompareAndSwapInt64(SB) TEXT syncโatomicยทCompareAndSwapUintptr(SB), NOSPLIT, $0-25 GO_ARGS BR syncโatomicยทCompareAndSwapInt64(SB) // Common function used to call tsan's atomic functions // R3 = *ThreadState // R4 = TODO: What's this supposed to be? // R5 = caller pc // R6 = addr of incoming arg list // R8 contains addr of target function. TEXT racecallatomic<>(SB), NOSPLIT, $0-0 // Trigger SIGSEGV early if address passed to atomic function is bad. MOVD (R6), R7 // 1st arg is addr MOVB (R7), R9 // segv here if addr is bad // Check that addr is within [arenastart, arenaend) or within [racedatastart, racedataend). MOVD runtimeยทracearenastart(SB), R9 CMP R7, R9 BLT racecallatomic_data MOVD runtimeยทracearenaend(SB), R9 CMP R7, R9 BLT racecallatomic_ok racecallatomic_data: MOVD runtimeยทracedatastart(SB), R9 CMP R7, R9 BLT racecallatomic_ignore MOVD runtimeยทracedataend(SB), R9 CMP R7, R9 BGE racecallatomic_ignore racecallatomic_ok: // Addr is within the good range, call the atomic function. MOVD runtimeยทtls_g(SB), R10 MOVD 0(R10), g MOVD g_racectx(g), R3 // goroutine racectx aka *ThreadState MOVD R8, R5 // pc is the function called MOVD (R1), R4 // caller pc from stack BL racecall<>(SB) // BL needed to maintain stack consistency RET // racecallatomic_ignore: // Addr is outside the good range. // Call __tsan_go_ignore_sync_begin to ignore synchronization during the atomic op. // An attempt to synchronize on the address would cause crash. MOVD R8, R15 // save the original function MOVD R6, R17 // save the original arg list addr MOVD $__tsan_go_ignore_sync_begin(SB), R8 // func addr to call MOVD runtimeยทtls_g(SB), R10 MOVD 0(R10), g MOVD g_racectx(g), R3 // goroutine context BL racecall<>(SB) MOVD R15, R8 // restore the original function MOVD R17, R6 // restore arg list addr // Call the atomic function. // racecall will call LLVM race code which might clobber r30 (g) MOVD runtimeยทtls_g(SB), R10 MOVD 0(R10), g MOVD g_racectx(g), R3 MOVD R8, R4 // pc being called same TODO as above MOVD (R1), R5 // caller pc from latest LR BL racecall<>(SB) // Call __tsan_go_ignore_sync_end. MOVD $__tsan_go_ignore_sync_end(SB), R8 MOVD g_racectx(g), R3 // goroutine context g should still be good? BL racecall<>(SB) RET // void runtimeยทracecall(void(*f)(...), ...) // Calls C function f from race runtime and passes up to 4 arguments to it. // The arguments are never heap-object-preserving pointers, so we pretend there are no arguments. TEXT runtimeยทracecall(SB), NOSPLIT, $0-0 MOVD fn+0(FP), R8 MOVD arg0+8(FP), R3 MOVD arg1+16(FP), R4 MOVD arg2+24(FP), R5 MOVD arg3+32(FP), R6 JMP racecall<>(SB) // Finds g0 and sets its stack // Arguments were loaded for call from Go to C TEXT racecall<>(SB), NOSPLIT, $0-0 // Set the LR slot for the ppc64 ABI MOVD LR, R10 MOVD R10, 0(R1) // Go expectation MOVD R10, 16(R1) // C ABI // Get info from the current goroutine MOVD runtimeยทtls_g(SB), R10 // g offset in TLS MOVD 0(R10), g MOVD g_m(g), R7 // m for g MOVD R1, R16 // callee-saved, preserved across C call MOVD m_g0(R7), R10 // g0 for m CMP R10, g // same g0? BEQ call // already on g0 MOVD (g_sched+gobuf_sp)(R10), R1 // switch R1 call: // prepare frame for C ABI SUB $32, R1 // create frame for callee saving LR, CR, R2 etc. RLDCR $0, R1, $~15, R1 // align SP to 16 bytes MOVD R8, CTR // R8 = caller addr MOVD R8, R12 // expected by PPC64 ABI BL (CTR) XOR R0, R0 // clear R0 on return from Clang MOVD R16, R1 // restore R1; R16 nonvol in Clang MOVD runtimeยทtls_g(SB), R10 // find correct g MOVD 0(R10), g MOVD 16(R1), R10 // LR was saved away, restore for return MOVD R10, LR RET // C->Go callback thunk that allows to call runtimeยทracesymbolize from C code. // Direct Go->C race call has only switched SP, finish g->g0 switch by setting correct g. // The overall effect of Go->C->Go call chain is similar to that of mcall. // RARG0 contains command code. RARG1 contains command-specific context. // See racecallback for command codes. TEXT runtimeยทracecallbackthunk(SB), NOSPLIT|NOFRAME, $0 // Handle command raceGetProcCmd (0) here. // First, code below assumes that we are on curg, while raceGetProcCmd // can be executed on g0. Second, it is called frequently, so will // benefit from this fast path. MOVD $0, R0 // clear R0 since we came from C code CMP R3, $0 BNE rest // Inline raceGetProdCmd without clobbering callee-save registers. MOVD runtimeยทtls_g(SB), R10 MOVD 0(R10), R11 MOVD g_m(R11), R3 MOVD m_p(R3), R3 MOVD p_raceprocctx(R3), R3 MOVD R3, (R4) RET rest: // Save registers according to the host PPC64 ABI // and reserve 16B for argument storage. STACK_AND_SAVE_HOST_TO_GO_ABI(16) // Load g, and switch to g0 if not already on it. MOVD runtimeยทtls_g(SB), R10 MOVD 0(R10), g MOVD g_m(g), R7 MOVD m_g0(R7), R8 CMP g, R8 BEQ noswitch MOVD R8, g // set g = m->g0 noswitch: BL runtimeยทracecallback<ABIInternal>(SB) UNSTACK_AND_RESTORE_GO_TO_HOST_ABI(16) RET // tls_g, g value for each thread in TLS GLOBL runtimeยทtls_g+0(SB), TLSBSS+DUPOK, $8
Upload File
Create Folder