* configure.ac: New switch for disabling -O2 (--disable-optimizations).
[cacao.git] / tests / regression / jasmin / test_many_swap.j
1 .class public test_many_swap
2 .super java/lang/Object
3
4 ; ======================================================================
5
6 .method public <init>()V
7    aload_0
8    invokenonvirtual java/lang/Object/<init>()V
9    return
10 .end method
11
12 ; ======================================================================
13
14 .method public static check(I)V
15         .limit locals 1
16         .limit stack 10
17         getstatic java/lang/System/out Ljava/io/PrintStream;
18         iload_0
19         invokevirtual java/io/PrintStream/println(I)V
20         return
21 .end method
22
23 ; ======================================================================
24
25 .method public static main([Ljava/lang/String;)V
26         .limit stack 2
27         .limit locals 2
28
29         ldc 42
30         ldc -1
31
32         ; 31 times
33
34         swap
35         swap
36         swap
37         swap
38         swap
39         swap
40         swap
41         swap
42         swap
43         swap
44
45         swap
46         swap
47         swap
48         swap
49         swap
50         swap
51         swap
52         swap
53         swap
54         swap
55
56         swap
57         swap
58         swap
59         swap
60         swap
61         swap
62         swap
63         swap
64         swap
65         swap
66
67         swap
68
69         invokestatic test_many_swap/check(I)V
70         ; OUTPUT: 42
71         invokestatic test_many_swap/check(I)V
72         ; OUTPUT: -1
73
74         return
75 .end method