From 0e32e456f40a4069c626f941e02d4fc305a5388a Mon Sep 17 00:00:00 2001 From: Andrew Chambers Date: Thu, 7 Oct 2021 20:08:34 +1300 Subject: More instructions --- test/test.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/test.sh b/test/test.sh index 7588c98..bf085e4 100644 --- a/test/test.sh +++ b/test/test.sh @@ -24,6 +24,7 @@ t () { echo "" echo "want: $1 -> $want" echo "got: $1 -> $got" + objdump -d "$tmpo" exit 1 fi echo -n "." @@ -33,21 +34,29 @@ t () { for op in add and or sub xor do - + t "${op}b \$1, %al" + #t "${op}w \$1, %ax" # clang disagrees + #t "${op}l \$1, %eax" # clang disagrees + #t "${op}q \$1, %rax" # clang disagrees t "${op}b (%rax), %al" t "${op}w (%rax), %ax" t "${op}l (%rax), %eax" t "${op}q (%rax), %rax" t "${op}q (%rbp), %rax" + t "${op}q (%r8), %rax" + t "${op}q (%r13), %rax" t "${op}b %al, (%rax)" t "${op}w %ax, (%rax)" t "${op}l %eax, (%rax)" t "${op}q %rax, (%rax)" t "${op}q %rax, (%rbp)" + t "${op}q %rax, (%r8)" + t "${op}q %rax, (%r13)" t "${op}b %al, %al" t "${op}w %ax, %ax" t "${op}l %eax, %eax" t "${op}q %rax, %rax" + t "${op}q %r9, %r9" done t "xchg %al, %al" @@ -56,7 +65,7 @@ t "xchg %ax, %r9w" t "xchg %r9w, %ax" t "xchg %ax, %bx" t "xchg %bx, %ax" -#t "xchg %eax, %eax" # XXX We encode this as nop, but clang does not. +#t "xchg %eax, %eax" # clang disagrees t "xchg %eax, %r9d" t "xchg %r9d, %eax" t "xchg %eax, %ebx" -- cgit v1.2.3