1# Copyright 2021 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15.class public LMain; 16 17.super Ljava/lang/Object; 18 19.method public static main([Ljava/lang/String;)V 20 .registers 1 21 invoke-static {}, LMain;->softFail()I 22 return-void 23.end method 24 25.method public static softFail()I 26 .registers 1 27 sget v0, LMain;->test:I 28 if-eqz v0, :Lzero 29 # BecausenonExistentMethod does not exist, the verifier will 30 # consider this instructions as always throwing, and will not 31 # look at the return-void below. 32 invoke-static {}, LMain;->nonExistentMethod()V 33 # Normally, this should hard-fail the verification, but it is 34 # skipped due to the throwing instruction above. 35 return-void 36:Lzero 37 return v0 38.end method 39 40.field public static test:I 41