blob: ea63372475b97721bf6e03d4906c37680ff47df5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# $1: c file to examine
# $2: write file
cfile="$1"
writefile="$2"
dirwritefile=$(dirname $writefile)
asmdir=$dirwritefile/../asm/gcc
if [ ! -f $cfile ]; then
>&2 echo "ERROR: $cfile not found"
shift; continue
fi
mkdir -p $dirwritefile
mkdir -p $asmdir
tmpbin=/tmp/k1-$(basename $1)-bin
k1-gcc -O0 $1 -S -o $asmdir/$(basename $1).s
k1-gcc -O0 $1 -o $tmpbin
(k1-cluster -- $tmpbin; echo $? > $2)
|