supporting more instructions seen in stdlib
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user