Separate assembly source by build flavour.

This commit is contained in:
David Brown 2016-07-19 20:38:41 +01:00
parent 359aa1c43f
commit 0349189479
8 changed files with 20 additions and 12 deletions

View file

@ -4,7 +4,7 @@
echo --- Confidence test $(basename $PWD) ---
if which cygpath >/dev/null
if which cygpath >/dev/null 2>/dev/null
then export PATH="$(cygpath "$1")/bin":$PATH
else export PATH="$1/bin":$PATH
fi
@ -19,6 +19,8 @@ rm -f *.o *.obj *.exe *.sym *.c *.h result
# corresponding assembly file will overwrite the previous. I
# cannot see any way to overcome this short of using -S
# on the voc command and calling 'as' explicitly.
if [ $COMPILER=gcc ]
# NOTE 2: The cygwin 64 bit build has relocation errors with
# these assembly generation options.
if [ $COMPILER=gcc -a $FLAVOUR!=cygwin.LP64.gcc ]
then export CFLAGS="-gstabs -g1 -Wa,-acdhln=new.asm"
fi

View file

@ -6,10 +6,16 @@ else printf "FAILED: $PWD\n\n"; exit 1
fi
# Compare generated code
if [ -f old.s -a -f new.asm ]
then
egrep '^[0-9 ]{4} ([0-9a-f]{4}| ) [0-9A-F]{2}[0-9A-F ]{6}' new.asm|cut -c 11- >new.s
if ! diff -b old.s new.s
then echo "--- Generated code changed ---"
if [ -f new.asm ]
then egrep '^[0-9 ]{4} ([0-9a-f]{4}| ) [0-9A-F]{2}[0-9A-F ]{6}' new.asm|cut -c 11- >new.$FLAVOUR.s
if [ -f old.$FLAVOUR.s ]
then
if ! diff -b old.$FLAVOUR.s new.$FLAVOUR.s
then echo "--- Generated code changed ---"
fi
else
cp new.$FLAVOUR.s old.$FLAVOUR.s
fi
fi