• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file
2# for details. All rights reserved. Use of this source code is governed by a
3# BSD-style license that can be found in the LICENSE file.
4
5.class public LTest;
6
7.super Ljava/lang/Object;
8
9.method static constantEqTrue()I
10    .locals 1
11
12    const v0, 0
13    if-eqz v0, :equals
14    const v0, 1
15    return v0
16    :equals
17    const v0, 2
18    return v0
19.end method
20
21.method static constantEqFalse()I
22    .locals 1
23
24    const v0, 1
25    if-eqz v0, :equals
26    const v0, 1
27    return v0
28    :equals
29    const v0, 2
30    return v0
31.end method
32
33.method static constantNeTrue()I
34    .locals 1
35
36    const v0, 1
37    if-nez v0, :equals
38    const v0, 1
39    return v0
40    :equals
41    const v0, 2
42    return v0
43.end method
44
45.method static constantNeFalse()I
46    .locals 1
47
48    const v0, 0
49    if-nez v0, :equals
50    const v0, 1
51    return v0
52    :equals
53    const v0, 2
54    return v0
55.end method
56
57.method static constantLtzTrue()I
58    .locals 1
59
60    const v0, -1
61    if-ltz v0, :equals
62    const v0, 1
63    return v0
64    :equals
65    const v0, 2
66    return v0
67.end method
68
69.method static constantLtzFalse()I
70    .locals 1
71
72    const v0, 0
73    if-ltz v0, :equals
74    const v0, 1
75    return v0
76    :equals
77    const v0, 2
78    return v0
79.end method
80
81.method static constantLezTrue()I
82    .locals 1
83
84    const v0, 0
85    if-lez v0, :equals
86    const v0, 1
87    return v0
88    :equals
89    const v0, 2
90    return v0
91.end method
92
93.method static constantLezFalse()I
94    .locals 1
95
96    const v0, 1
97    if-lez v0, :equals
98    const v0, 1
99    return v0
100    :equals
101    const v0, 2
102    return v0
103.end method
104
105.method static constantGtzTrue()I
106    .locals 1
107
108    const v0, 1
109    if-gtz v0, :equals
110    const v0, 1
111    return v0
112    :equals
113    const v0, 2
114    return v0
115.end method
116
117.method static constantGtzFalse()I
118    .locals 1
119
120    const v0, 0
121    if-gtz v0, :equals
122    const v0, 1
123    return v0
124    :equals
125    const v0, 2
126    return v0
127.end method
128
129.method static constantGezTrue()I
130    .locals 1
131
132    const v0, 0
133    if-gez v0, :equals
134    const v0, 1
135    return v0
136    :equals
137    const v0, 2
138    return v0
139.end method
140
141.method static constantGezFalse()I
142    .locals 1
143
144    const v0, -1
145    if-gez v0, :equals
146    const v0, 1
147    return v0
148    :equals
149    const v0, 2
150    return v0
151.end method
152
153.method static cmpConstantLong()I
154    .locals 4
155
156    const-wide v0, 0
157    const-wide v2, 0
158    cmp-long v0, v0, v2
159    if-eqz v0, :equals
160    const v0, 1
161    return v0
162    :equals
163    const v0, 2
164    return v0
165.end method
166
167.method public static main([Ljava/lang/String;)V
168    .locals 3
169
170    sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
171
172    invoke-static {}, LTest;->constantEqTrue()I
173    move-result v1
174    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
175
176    invoke-static {}, LTest;->constantEqFalse()I
177    move-result v1
178    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
179
180    invoke-static {}, LTest;->constantNeTrue()I
181    move-result v1
182    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
183
184    invoke-static {}, LTest;->constantNeFalse()I
185    move-result v1
186    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
187
188    invoke-static {}, LTest;->constantLtzTrue()I
189    move-result v1
190    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
191
192    invoke-static {}, LTest;->constantLtzFalse()I
193    move-result v1
194    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
195
196    invoke-static {}, LTest;->constantLezTrue()I
197    move-result v1
198    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
199
200    invoke-static {}, LTest;->constantLezFalse()I
201    move-result v1
202    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
203
204    invoke-static {}, LTest;->constantGtzTrue()I
205    move-result v1
206    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
207
208    invoke-static {}, LTest;->constantGtzFalse()I
209    move-result v1
210    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
211
212    invoke-static {}, LTest;->constantGezTrue()I
213    move-result v1
214    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
215
216    invoke-static {}, LTest;->constantGezFalse()I
217    move-result v1
218    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
219
220    invoke-static {}, LTest;->cmpConstantLong()I
221    move-result v1
222    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(I)V
223
224    return-void
225.end method
226