aboutsummaryrefslogtreecommitdiffstats
path: root/test/gourdinl/compare_pp.sh
diff options
context:
space:
mode:
authorLéo Gourdin <leo.gourdin@univ-grenoble-alpes.fr>2021-06-09 23:54:07 +0200
committerLéo Gourdin <leo.gourdin@univ-grenoble-alpes.fr>2021-06-09 23:54:07 +0200
commitd703ae1ad5e1fcdc63e07b2a50a3e8576a11e61e (patch)
tree4b0e6ab85ab13e32c75f41945fd1792ee3902794 /test/gourdinl/compare_pp.sh
parentf41baaa9cc0a9b715a7348568d5ccbb0cf76254f (diff)
downloadcompcert-kvx-d703ae1ad5e1fcdc63e07b2a50a3e8576a11e61e.tar.gz
compcert-kvx-d703ae1ad5e1fcdc63e07b2a50a3e8576a11e61e.zip
push afadl test example
Diffstat (limited to 'test/gourdinl/compare_pp.sh')
-rwxr-xr-xtest/gourdinl/compare_pp.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/gourdinl/compare_pp.sh b/test/gourdinl/compare_pp.sh
new file mode 100755
index 00000000..09183cf9
--- /dev/null
+++ b/test/gourdinl/compare_pp.sh
@@ -0,0 +1,16 @@
+ffname=$(basename $1)
+fname=${ffname%.*}
+nopp=$fname.nopp.s
+pp=$fname.pp.s
+
+../../ccomp -fno-coalesce-mem -fno-postpass -S $1 -o $nopp
+../../ccomp -fno-coalesce-mem -fpostpass= list -S $1 -o $pp
+sed -i '1,2d' $nopp
+sed -i '1,2d' $pp
+if cmp -s $nopp $pp; then
+ echo "same!"
+else
+ echo "differents!"
+ diff -y $nopp $pp
+fi
+