diff options
author | Victor van den Elzen <victor.vde@gmail.com> | 2009-02-23 05:16:35 +0100 |
---|---|---|
committer | Victor van den Elzen <victor.vde@gmail.com> | 2009-02-23 05:16:35 +0100 |
commit | a5869fb66646dc08cbdd4b862031678c61720819 (patch) | |
tree | e9b9de51993e9453e0ae3f1e4672849e06127978 | |
parent | ccafc3c4b75d8c26c2d57c2a4d39bb49cd76231c (diff) | |
download | nasm-a5869fb66646dc08cbdd4b862031678c61720819.tar.gz |
Add test file for optimal convergence
Some edge cases where starting with a long form
converges suboptimally.
-rw-r--r-- | test/convergence.asm | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/convergence.asm b/test/convergence.asm new file mode 100644 index 00000000..54d6ae4a --- /dev/null +++ b/test/convergence.asm @@ -0,0 +1,34 @@ +;Testname=O0; Arguments=-O0 -fbin -oconvergence.bin; Files=stdout stderr convergence.bin +;Testname=O1; Arguments=-O1 -fbin -oconvergence.bin; Files=stdout stderr convergence.bin +;Testname=Ox; Arguments=-Ox -fbin -oconvergence.bin; Files=stdout stderr convergence.bin + +BITS 32 + +jmp foo +times 124 nop +foo: + +jmp bar +times 125 nop +bar: + +db 0 + +jmp baz +times 126 nop +baz: + +jmp car +times 127 nop +car: + +add eax, quux2 - quux1 +quux1: +times 127 nop +quux2: + +; currently fails - short add possible but converges to long form +corge1: +add eax, corge2 - corge1 +times 124 nop +corge2: |