supporting more instructions seen in stdlib

This commit is contained in:
Michael McLoughlin
2018-11-24 17:32:18 -08:00
parent 124587f55c
commit 0edbdb064f
8 changed files with 1186 additions and 17 deletions

View File

@@ -11,12 +11,14 @@ echo '#define get_tls ' > ${include}/go_asm.h
# Preprocess all assembly files.
asm=${workdir}/all.s
find ${GOROOT}/src -name '*_amd64.s' | while read s; do
find ${GOROOT}/src -name '*_amd64.s' | grep -v testdata | while read s; do
gcc -E -I${GOROOT}/pkg/include -I${include} ${s} >>${asm}
done
# Extract instructions.
awk '/^[[:space:]]+[A-Z0-9]+[[:space:]]+/ { print $1 }' ${asm} | sort | uniq
awk '/^[[:space:]]+[A-Z0-9]+[[:space:]]+/ { print $1 }' ${asm} | \
sort | uniq | \
grep -Ev '(TEXT|FUNCDATA|PCDATA|BYTE|WORD)'
# Clean.
rm -rf ${workdir}