Do not confuse segmentless adresses and unknown forward references
[nasm/perl-rewrite.git] / test / convergence.asm
blobd037886e386b65e9c08a0894997949b9ff8163f1
1 ;Testname=O0; Arguments=-O0 -fbin -oconvergence.bin; Files=stdout stderr convergence.bin
2 ;Testname=O1; Arguments=-O1 -fbin -oconvergence.bin; Files=stdout stderr convergence.bin
3 ;Testname=Ox; Arguments=-Ox -fbin -oconvergence.bin; Files=stdout stderr convergence.bin
5 BITS 32
7 ; Simple
8 jmp foo
9 times 124 nop
10 foo:
12 ; Must start short to converge optimally
13 jmp car
14 times 127 nop
15 car:
17 ; Always near
18 jmp cdr
19 times 128 nop
20 cdr:
23 ; Simple
24 add eax, quux2 - quux1
25 quux1:
26 times 127 nop
27 quux2:
29 ; Must start short
30 corge1:
31 add eax, corge2 - corge1
32 times 127 - 3 nop
33 corge2:
36 ; Simple
37 lea eax, [bolug2-bolug1]
38 bolug1:
39 times 127 nop
40 bolug2:
42 ; Must start short
43 calog1:
44 lea eax, [calog2-calog1]
45 times 127 - 3 nop
46 calog2:
49 ; Do not confuse forward references and segmentless addresses!
50 jmp 12345