This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # with quotes | |
| while read line ; do grep -Fr "$line" asm/non_matchings/code ; done < <(find asm/non_matchings/code/z_sub_s/ -type f -exec basename {} .s \;) | grep -v 'glabel' | awk -F':|\\s+' '/%lo/ { next } /%hi/ { type="hilo" } /jal/ { type="jal" } { filefunc=gensub(/.*\/(.*)\/(.*)\.s/,"\\1,\\2","g",$1) ; gsub(/%hi\(|\)/,"") ; print filefunc","$NF","type } ' | awk -F, 'BEGIN { printf "digraph {\ncompound=true;\n\n" } { arr[$1] = arr[$1]" \""$2"\"" ; print "\""$2"\" -> \""$3"\"" } END { print "" ; for (file in arr) { print "subgraph cluster_"file" {" ; print arr[file]";" ; printf " style = filled;\n label = \"%s\";\n}\n\n" , file } print "}" }' | |
| # without quotes | |
| # while read line ; do grep -Fr "$line" asm/non_matchings/code ; done < <(find asm/non_matchings/code/z_sub_s/ -type f -exec basename {} .s \;) | grep -v 'glabel' | awk -F':|\\s+' '/%lo/ { next } /%hi/ { type="hilo" } /jal/ { type="jal" } { filefunc=gensub(/.*\/(.*)\/(.*)\.s/,"\\1,\\2","g",$1) ; gsub(/%hi\(|\)/,"") ; print filefunc","$NF |
NewerOlder