# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #Assert that operation isinstance works fine .record Asm{ i32 asm1 i64 asm2 } .record Asm2{ i32 asm1 i64 asm2 f64 asm3 } .function i32 main(){ newobj v0, Asm lda.obj v0 isinstance Asm jeqz exit_failure newobj v0, Asm2 lda.obj v0 isinstance Asm jnez exit_failure ldai 0 return exit_failure: ldai 1 return }