From 6526cddc058df5a1a84d7f4081e3f4a499642733 Mon Sep 17 00:00:00 2001 From: Andrew Chambers Date: Fri, 8 Oct 2021 01:36:55 +1300 Subject: More tests. --- test/test.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/test.sh b/test/test.sh index 8d790d8..9c5e1d8 100644 --- a/test/test.sh +++ b/test/test.sh @@ -30,12 +30,26 @@ t () { echo -n "." } + for op in mov add and or sub xor do + # Special case a register variants. t "${op}b \$127, %al" - t "${op}w \$32767, %ax" # clang disagrees - t "${op}l \$2147483647, %eax" # clang disagrees - t "${op}q \$2147483647, %rax" # clang disagrees + t "${op}w \$32767, %ax" + t "${op}l \$2147483647, %eax" + t "${op}q \$2147483647, %rax" + + # immediate variants. + t "${op}b \$127, (%rbx)" + t "${op}w \$32767, (%rbx)" + t "${op}l \$2147483647, (%rbx)" + t "${op}q \$2147483647, (%rbx)" + t "${op}b \$127, %bl" + t "${op}w \$32767, %bx" + t "${op}l \$2147483647, %ebx" + t "${op}q \$2147483647, %rbx" + + # r rm variants t "${op}b (%rax), %al" t "${op}w (%rax), %ax" t "${op}l (%rax), %eax" -- cgit v1.2.3