# 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. .record Test { i32 n u32[] a } .function i32 main() { movi v1, 2 newarr v0, v1, u32[] ldai 0x6 movi v3, 0 ldai 6 starr v0, v3 movi v3, 1 ldai 7 starr v0, v3 lda.obj v0 ststatic.obj Test.a ldai 50 ststatic Test.n ldstatic.obj Test.a sta.obj v4 lda v3 ldarr v4 sta v4 ldstatic Test.n add2 v4 addi -57 return }