mirror of
https://gitee.com/openharmony/arkcompiler_runtime_core
synced 2025-04-12 07:34:13 +00:00

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
80 lines
2.2 KiB
Plaintext
80 lines
2.2 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.
|
|
|
|
|
|
.record Object <external>
|
|
.record panda.Object <external>
|
|
.function void Object.monitorEnter(panda.Object a0) <external>
|
|
.function void Object.monitorExit(panda.Object a0) <external>
|
|
|
|
.record Obj {
|
|
i32 data
|
|
}
|
|
|
|
#! CHECKER Check monitors for inlined functions: lse isn't applied
|
|
#! RUN force_jit: true, options: "", entry: "_GLOBAL::main"
|
|
#! EVENT /Inline,_GLOBAL::main,_GLOBAL::foo,.*STATIC,SUCCESS/
|
|
#! METHOD "_GLOBAL::main"
|
|
#! PASS_AFTER "LSE"
|
|
#! INST "CallStatic.Inlined"
|
|
#! INST "Monitor"
|
|
#! INST "LoadObject"
|
|
#! INST "Monitor"
|
|
|
|
.function i32 foo(Obj a0) {
|
|
call Object.monitorEnter, a0
|
|
ldobj a0, Obj.data
|
|
sta v0
|
|
call Object.monitorExit, a0
|
|
lda v0
|
|
return
|
|
}
|
|
|
|
.function u1 main() {
|
|
newobj v0, Obj
|
|
ldai 0
|
|
stobj v0, Obj.data
|
|
call.short foo, v0
|
|
return
|
|
}
|
|
|
|
#! CHECKER Check monitors for inlined functions: lse is applied
|
|
#! RUN force_jit: true, options: "", entry: "_GLOBAL::main1"
|
|
#! EVENT /Inline,_GLOBAL::main1,_GLOBAL::foo,.*STATIC,SUCCESS/
|
|
#! METHOD "_GLOBAL::main1"
|
|
#! PASS_AFTER "Inline"
|
|
#! INST "CallStatic.Inlined"
|
|
#! INST "Monitor"
|
|
#! INST "LoadObject"
|
|
#! INST "Monitor"
|
|
#! PASS_AFTER "LICM"
|
|
#! INST_NOT "CallStatic.Inlined"
|
|
#! INST_NOT "Monitor"
|
|
#! INST "LoadObject"
|
|
#! PASS_AFTER "LSE"
|
|
#! INST_NOT "LoadObject"
|
|
|
|
# Inlined function removed on first BranchElimination, but the checker checks second BranchElimination, so LICM is used
|
|
|
|
.function u1 main1() {
|
|
newobj v0, Obj
|
|
ldai 0
|
|
stobj v0, Obj.data
|
|
jeqz lable
|
|
call.short foo, v0
|
|
return
|
|
lable:
|
|
ldobj v0, Obj.data
|
|
return
|
|
}
|