Add more unary operation tests.

This commit is contained in:
Eric Anholt 2006-08-31 14:46:28 -07:00 committed by Damien Lespiau
parent e3cc73bec4
commit 863cd6a5b7
19 changed files with 58 additions and 5 deletions

View File

@ -1,2 +1,10 @@
*.out
mov
frc
rndd
rnde
rnde-intsrc
rndu
rndz
lzd
not

View File

@ -2,11 +2,38 @@ check_SCRIPTS = run-test.sh
TESTS_ENVIRONMENT = top_builddir=${top_builddir}
TESTS = \
mov
mov \
frc \
rndd \
rndu \
rnde-intsrc \
rndz \
lzd \
not
# Tests that are expected to fail because they contain some inccorect code.
XFAIL_TESTS = \
rnde-intsrc
TESTDATA = \
mov.expected \
mov.g4a
mov.g4a \
frc.expected \
frc.g4a \
rndd.expected \
rndd.g4a \
rndu.expected \
rndu.g4a \
rnde.expected \
rnde.g4a \
rnde-intsrc.expected \
rnde-intsrc.g4a \
rndz.expected \
rndz.g4a \
lzd.expected \
lzd.g4a \
not.expected \
not.g4a
EXTRA_DIST = \
${TESTDATA} \

View File

@ -0,0 +1 @@
{ 0x00000001, 0x20000021, 0x00000020, 0x00000000 },

1
assembler/test/frc.g4a Normal file
View File

@ -0,0 +1 @@
mov (1) g0<1>UD g1<0,1,0>UD { align1 };

View File

@ -0,0 +1 @@
{ 0x0000004a, 0x20000021, 0x00000020, 0x00000000 },

1
assembler/test/lzd.g4a Normal file
View File

@ -0,0 +1 @@
lzd (1) g0<1>UD g1<0,1,0>UD { align1 };

View File

@ -0,0 +1 @@
{ 0x00000004, 0x20000021, 0x00000020, 0x00000000 },

1
assembler/test/not.g4a Normal file
View File

@ -0,0 +1 @@
not (1) g0<1>UD g1<0,1,0>UD { align1 };

View File

@ -0,0 +1 @@
{ 0x00000045, 0x200003a1, 0x00000020, 0x00000000 },

1
assembler/test/rndd.g4a Normal file
View File

@ -0,0 +1 @@
rndd (1) g0<1>UD g1<0,1,0>F { align1 };

View File

@ -0,0 +1 @@
{ 0x00000046, 0x20000021, 0x00000020, 0x00000000 },

View File

@ -0,0 +1 @@
rnde (1) g0<1>UD g1<0,1,0>UD { align1 };

View File

@ -0,0 +1 @@
{ 0x00000046, 0x200003a1, 0x00000020, 0x00000000 },

1
assembler/test/rnde.g4a Normal file
View File

@ -0,0 +1 @@
rnde (1) g0<1>UD g1<0,1,0>F { align1 };

View File

@ -0,0 +1 @@
{ 0x00000044, 0x200003a1, 0x00000020, 0x00000000 },

1
assembler/test/rndu.g4a Normal file
View File

@ -0,0 +1 @@
rndu (1) g0<1>UD g1<0,1,0>F { align1 };

View File

@ -0,0 +1 @@
{ 0x00000047, 0x200003a1, 0x00000020, 0x00000000 },

1
assembler/test/rndz.g4a Normal file
View File

@ -0,0 +1 @@
rndz (1) g0<1>UD g1<0,1,0>F { align1 };

View File

@ -1,9 +1,11 @@
#!/bin/sh
TESTDIR=${srcdir-`pwd`}
SRCDIR=${srcdir-`pwd`}
BUILDDIR=${top_builddir-`pwd`}
${BUILDDIR}/src/gen4asm -o TEST.out $TESTDIR/TEST.g4a
if cmp TEST.out ${TESTDIR}/TEST.expected; then : ; else
${BUILDDIR}/src/gen4asm -o TEST.out $SRCDIR/TEST.g4a
if cmp TEST.out ${SRCDIR}/TEST.expected 2> /dev/null; then : ; else
echo "Output comparison for TEST"
diff -u ${SRCDIR}/TEST.expected TEST.out
exit 1;
fi