Checked in jasmin tests.
[cacao.git] / tests / regression / jasmin / test_store_load_conflict.j
1 .class public test_store_load_conflict
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 checkI(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 3
28
29         ldc 35
30         istore 1
31         ldc 777
32         istore 2
33
34         aload 0
35         ifnull force_basic_block_boundary
36
37         ; --------------------------------------------------
38
39         iload 1   ; loads 35
40         ldc 42
41         istore 1  ; stores 42
42         ldc 100
43         iadd      ; 35 + 100 = 135
44         istore 2
45
46         ; --------------------------------------------------
47
48 force_basic_block_boundary:
49
50         iload 1
51         invokestatic test_store_load_conflict/checkI(I)V
52         ; OUTPUT: 42
53
54         iload 2
55         invokestatic test_store_load_conflict/checkI(I)V
56         ; OUTPUT: 135
57
58         return
59 .end method