1# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13# 14# The following comment until the empty line must be a valid YAML document 15# containing exact copies of ISA specification assertions relevant to this test. 16#--- 17#- title: Integer truncations and extensions. 18# description: 'Perform specified integer extension or truncations of accumulator. 19# Truncations discard all but N lowest-order bits, where N is the bit size of destination 20# type. 21# 22#' 23# exceptions: 24# - x_none 25# instructions: 26# - sig: i64toi32 27# acc: inout:i64->i32 28# format: 29# - op_none 30# verification: 31# - acc_type 32 33## runner-option: verifier-failure 34## runner-option: bugid: 964, 1653 35## runner-option: tags: verifier 36 37# Test description: 38# Check `i64toi32` with incorrect accumulator type. 39# Load different values (objects, strings, types, 64-bit floating point values, 32-bit integer values) and invokes `i64tof64`. 40# Return 0 to indicate that negative test failed, because this line is unreachable and code will not be executed after verification error. 41# 42 43 44# header 45.function i32 main() { 46# 47 ldai 0 48 i64toi32 49 ldai 0 50 return 51} 52