mirror of
https://gitee.com/openharmony/arkcompiler_runtime_core
synced 2025-04-09 05:51:19 +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
147 lines
3.0 KiB
Plaintext
147 lines
3.0 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.
|
|
|
|
#! CHECKER Check method parameters
|
|
#! RUN force_jit: true, options: "--compiler-inlining=false", entry: "_GLOBAL::main"
|
|
#! EVENT /Compilation,.*main.*/
|
|
#! EVENT /Compilation,.*foo_f32.*/
|
|
#! EVENT /Compilation,.*foo_f64.*/
|
|
#! EVENT /Compilation,.*foo_u1.*/
|
|
#! EVENT /Compilation,.*foo_u8.*/
|
|
#! EVENT /Compilation,.*foo_u16.*/
|
|
#! EVENT /Compilation,.*foo_u32.*/
|
|
#! EVENT /Compilation,.*foo_u64.*/
|
|
|
|
.function f32 foo_f32(f32 a0) {
|
|
fmovi v0, 1.0
|
|
lda a0
|
|
fcmpg v0
|
|
jnez exit_failure
|
|
fldai 1.0
|
|
return
|
|
exit_failure:
|
|
fldai 99.0
|
|
return
|
|
}
|
|
|
|
.function f64 foo_f64(f64 a0) {
|
|
fmovi.64 v0, 2.0
|
|
lda.64 a0
|
|
fcmpg.64 v0
|
|
jnez exit_failure
|
|
fldai.64 2.0
|
|
return.64
|
|
exit_failure:
|
|
fldai.64 98.0
|
|
return.64
|
|
}
|
|
|
|
.function u1 foo_u1(u1 a0) {
|
|
ldai 0
|
|
jne a0, exit_failure
|
|
ldai 0
|
|
return
|
|
exit_failure:
|
|
ldai 1
|
|
return
|
|
}
|
|
|
|
.function u8 foo_u8(u8 a0) {
|
|
ldai 0xff
|
|
jne a0, exit_failure
|
|
ldai 0xff
|
|
return
|
|
exit_failure:
|
|
ldai 0xf
|
|
return
|
|
}
|
|
|
|
.function u16 foo_u16(u16 a0) {
|
|
ldai 0xffff
|
|
jne a0, exit_failure
|
|
ldai 0xffff
|
|
return
|
|
exit_failure:
|
|
ldai 0xff
|
|
return
|
|
}
|
|
|
|
.function u32 foo_u32(u32 a0) {
|
|
ldai 0xffffff
|
|
jne a0, exit_failure
|
|
ldai 0xffffff
|
|
return
|
|
exit_failure:
|
|
ldai 0xffffff
|
|
return
|
|
}
|
|
|
|
.function u64 foo_u64(u64 a0) {
|
|
ldai.64 0xffffffffff
|
|
ucmp.64 a0
|
|
jnez exit_failure
|
|
ldai 0xffffffffff
|
|
return.64
|
|
exit_failure:
|
|
ldai 0xffffffff
|
|
return.64
|
|
}
|
|
|
|
.function u1 main() {
|
|
fmovi v1, 1.0
|
|
call.short foo_f32, v1, v1
|
|
fcmpg v1
|
|
jnez exit_failure_1
|
|
fmovi.64 v1, 2.0
|
|
call.short foo_f64, v1, v1
|
|
fcmpg.64 v1
|
|
jnez exit_failure_2
|
|
movi v1, 0
|
|
call.short foo_u1, v1, v1
|
|
jne v1, exit_failure_3
|
|
movi v1, 0xff
|
|
call.short foo_u8, v1, v1
|
|
jne v1, exit_failure_4
|
|
movi v1, 0xffff
|
|
call.short foo_u16, v1, v1
|
|
jne v1, exit_failure_5
|
|
movi v1, 0xffffff
|
|
call.short foo_u32, v1, v1
|
|
jne v1, exit_failure_6
|
|
movi.64 v1, 0xffffffffff
|
|
call.short foo_u64, v1, v1
|
|
jne v1, exit_failure_7
|
|
ldai 0
|
|
return
|
|
exit_failure_1:
|
|
ldai 1
|
|
return
|
|
exit_failure_2:
|
|
ldai 2
|
|
return
|
|
exit_failure_3:
|
|
ldai 3
|
|
return
|
|
exit_failure_4:
|
|
ldai 4
|
|
return
|
|
exit_failure_5:
|
|
ldai 5
|
|
return
|
|
exit_failure_6:
|
|
ldai 6
|
|
return
|
|
exit_failure_7:
|
|
ldai 7
|
|
return
|
|
} |