diff options
| author | Andrew Chambers <[email protected]> | 2021-10-11 12:38:07 +1300 |
|---|---|---|
| committer | Andrew Chambers <[email protected]> | 2021-10-11 12:38:07 +1300 |
| commit | 9e3472e4899c83a6a078db0b8881eead671fb7da (patch) | |
| tree | 95c4d4333dc10c81dc16d4c9bb7d733f96302ab3 /test | |
| parent | 0958ee6c9006195ba69f9a61e782b688861891e3 (diff) | |
Tweak tests.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.sh | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/test/test.sh b/test/test.sh index 574bfad..9946f7f 100644 --- a/test/test.sh +++ b/test/test.sh @@ -31,27 +31,32 @@ t () { } -t "lea (%rsp), %rax" -t "lea (%rbp), %rax" -t "lea (%rax), %rax" -t "lea 2147483647(%rsp), %rax" -t "lea 2147483647(%rbp), %rax" -t "lea 2147483647(%rax), %rax" - -t "lea (%r9, %r10), %rax" -t "lea (%rsp, %rax), %rax" -t "lea (%rbp, %rax), %rax" -t "lea (%rax, %rax), %rax" -t "lea 2147483647(%rsp, %rax), %rax" -t "lea 2147483647(%rbp, %rax), %rax" -t "lea 2147483647(%rax, %rax), %rax" - -t "lea (%rsp, %rax, 4), %rax" -t "lea (%rbp, %rax, 4), %rax" -t "lea (%rax, %rax, 4), %rax" -t "lea 2147483647(%rsp, %rax, 4), %rax" -t "lea 2147483647(%rbp, %rax, 4), %rax" -t "lea 2147483647(%rax, %rax, 4), %rax" + +for r in a b +do + t "lea (%rsp), %r${r}x" + t "lea (%rbp), %r${r}x" + t "lea (%r${r}x), %r${r}x" + t "lea 2147483647(%rsp), %r${r}x" + t "lea 2147483647(%rbp), %r${r}x" + t "lea 2147483647(%r${r}x), %r${r}x" + + t "lea (%r9, %r10), %r${r}x" + t "lea (%rsp, %r${r}x), %r${r}x" + t "lea (%rbp, %r${r}x), %r${r}x" + t "lea (%r${r}x, %r${r}x), %r${r}x" + t "lea 2147483647(%rsp, %r${r}x), %r${r}x" + t "lea 2147483647(%rbp, %r${r}x), %r${r}x" + t "lea 2147483647(%r${r}x, %r${r}x), %r${r}x" + + t "lea (%rsp, %r${r}x, 4), %r${r}x" + t "lea (%rbp, %r${r}x, 4), %r${r}x" + t "lea (%r${r}x, %r${r}x, 4), %r${r}x" + t "lea 2147483647(%rsp, %r${r}x, 4), %r${r}x" + t "lea 2147483647(%rbp, %r${r}x, 4), %r${r}x" + t "lea 2147483647(%r${r}x, %r${r}x, 4), %r${r}x" +done + t "ret" t "cltd" @@ -172,14 +177,6 @@ do t "xchg (%r${r}x), %${r}l" done - -for r in a b - do - t "leaq (%r${r}x), %r${r}x" - t "leal (%r${r}x), %e${r}x" - t "leaw (%r${r}x), %${r}x" -done - for op in mov add and cmp or sub xor test do # rip relative |
