diff options
| author | Andrew Chambers <[email protected]> | 2021-10-07 20:08:34 +1300 |
|---|---|---|
| committer | Andrew Chambers <[email protected]> | 2021-10-07 20:08:34 +1300 |
| commit | 0e32e456f40a4069c626f941e02d4fc305a5388a (patch) | |
| tree | 4a3b62bbd2e653f2f4a0666fc313d77fbfc2a73b /test | |
| parent | b039ab0b7b10e89913931c4d8c53d3c3c667615e (diff) | |
More instructions
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.sh | 13 |
1 files changed, 11 insertions, 2 deletions
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" |
