mirror of
https://gitee.com/openharmony/arkcompiler_runtime_core
synced 2024-11-23 14:50:51 +00:00
c658ccf319
Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/I5G96F Test: Test262 suit, ark unittest, rk3568 XTS, ark previewer demo Signed-off-by: huangyu <huangyu76@huawei.com> Change-Id: I3f63d129a07deaa27a390f556dcaa5651c098185
112 lines
2.3 KiB
Plaintext
112 lines
2.3 KiB
Plaintext
# 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.
|
|
#
|
|
# This is an auxiliary file with some basics classes that can be used in checked tests with inter-file communication
|
|
# It is written in pure PandaAssembly i.e. some features are not available e.g. inheritance (it is available only with
|
|
# java extension).
|
|
# The file would be AOT compiled as well.
|
|
#
|
|
|
|
.record A {
|
|
i32 data
|
|
}
|
|
|
|
#! CHECKER ExternalAOT
|
|
#! RUN_PAOC options: ""
|
|
.function i32 A.getConst() <static> {
|
|
ldai 1
|
|
return
|
|
}
|
|
|
|
.function i32 A.getConst_virt(A a0) {
|
|
ldai 2
|
|
return
|
|
}
|
|
|
|
.function i32 A.getParam(i32 a0) <static> {
|
|
lda a0
|
|
return
|
|
}
|
|
|
|
.function i32 A.getParam_virt(A a0, i32 a1) {
|
|
lda a1
|
|
return
|
|
}
|
|
|
|
.function void A.getVoid() <static> {
|
|
return.void
|
|
}
|
|
|
|
.function void A.getVoid_virt(A a0) {
|
|
return.void
|
|
}
|
|
|
|
.function i32 A.getObj(A a0) <static> {
|
|
ldobj a0, A.data
|
|
return
|
|
}
|
|
|
|
.function i32 A.getObj_virt(A a0) {
|
|
ldobj a0, A.data
|
|
return
|
|
}
|
|
|
|
.function void A.setObj(A a0, i32 a1) <static> {
|
|
lda a1
|
|
stobj a0, A.data
|
|
return.void
|
|
}
|
|
|
|
.function void A.setObjConst_virt(A a0) {
|
|
ldai 0x9
|
|
stobj a0, A.data
|
|
return.void
|
|
}
|
|
|
|
.function void A.setObj_virt(A a0, i32 a1) {
|
|
lda a1
|
|
stobj a0, A.data
|
|
return.void
|
|
}
|
|
|
|
.function i32 A.getObj_wrong_virt(A a0, A a1) {
|
|
ldobj a1, A.data
|
|
return
|
|
}
|
|
|
|
.function void A.setObj_wrong_virt(A a0, i32 a1, A a2) {
|
|
lda a1
|
|
stobj a2, A.data
|
|
return.void
|
|
}
|
|
|
|
.function void A.setObj_multiple(A a0, i32 a1, i32 a2) <static> {
|
|
lda a1
|
|
stobj a0, A.data
|
|
lda a2
|
|
stobj a0, A.data
|
|
return.void
|
|
}
|
|
|
|
.function i32 A.complexMethod(A a0) {
|
|
ldobj a0, A.data
|
|
sta v0
|
|
ldai 42
|
|
jne v0, label_1
|
|
mul v0, v0
|
|
return
|
|
label_1:
|
|
movi v1, 42
|
|
add v0, v1
|
|
return
|
|
} |