mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-30 16:41:05 +08:00
Add test file for optimal convergence
Some edge cases where starting with a long form converges suboptimally.
This commit is contained in:
parent
ccafc3c4b7
commit
a5869fb666
34
test/convergence.asm
Normal file
34
test/convergence.asm
Normal file
@ -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:
|
Loading…
Reference in New Issue
Block a user