* configure.ac: New switch for disabling -O2 (--disable-optimizations).
[cacao.git] / tests / regression / jasmin / test_verify_ok_jsr_through_variable.j
1 .class public test_verify_ok_jsr_through_variable
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 .method public static check(J)V
24         .limit locals 2
25         .limit stack 10
26         getstatic java/lang/System/out Ljava/io/PrintStream;
27         lload_0
28         invokevirtual java/io/PrintStream/println(J)V
29         return
30 .end method
31
32 ; ======================================================================
33
34 .method public static main([Ljava/lang/String;)V
35         .limit stack 2
36         .limit locals 6
37
38         ldc 35
39         istore 1
40
41         aload 0
42         ifnull force_basic_block_boundary
43
44         ; --------------------------------------------------
45
46         ldc 56
47         istore 3
48         jsr sbr_1
49         ; OUTPUT: 35
50         iload 3
51         invokestatic test_verify_ok_jsr_through_variable/check(I)V
52         ; OUTPUT: 56
53
54         ldc2_w 123456789123456789
55         lstore 2
56         jsr sbr_1
57         ; OUTPUT: 35
58         lload 2
59         invokestatic test_verify_ok_jsr_through_variable/check(J)V
60         ; OUTPUT: 123456789123456789
61
62         ; --------------------------------------------------
63
64 force_basic_block_boundary:
65
66         return
67         
68 sbr_1:
69         astore 5
70         iload 1
71         invokestatic test_verify_ok_jsr_through_variable/check(I)V
72         ret 5
73
74 .end method