Debian Codegraph @

script/stdlibopcodes

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`. -e
2
3 eval $(goscip-shell system . . go. env)
4
5 workdir=$(mktempscip-shell system . . mktemp. -d)
6
7 # Provide stub "go_asm.h".
8 include=${workdir}/include
9 mkdirscip-shell system . . mkdir. -p ${include}
10 echoscip-shell system . . echo. '#define get_tls ' > ${include}/go_asm.h
11
12 # Preprocess all assembly files.
13 asm=${workdir}/all.s
14 findscip-shell system . . find. ${GOROOT}/src -name '*_amd64.s' | grepscip-shell system . . grep. -v testdata | while read s; do
15 gccscip-shell system . . gcc. -E -I${GOROOT}/pkg/include -I${include} ${s} >>${asm}
16 done
17
18 # Extract instructions.
19 awkscip-shell system . . awk. '/^[[:space:]]+[A-Z0-9]+[[:space:]]+/ { print $1 }scip-shell filesystem . . `/^[[:space:]]+[A-Z0-9]+[[:space:]]+/ { print $1 }`.' ${asm} | \
20 sort | uniqscip-shell system . . uniq. | \
21 grep -Ev '(TEXT|FUNCDATA|PCDATA|BYTE|WORD)'
22
23 # Clean.
24 rmscip-shell system . . rm. -rf ${workdir}