1# Copyright (c) 2021 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 14definitions: [] 15tests: 16 - file-name: "ldai.64" 17 isa: 18 title: Load accumulator from immediate 19 description: > 20 Load immediate into accumulator. For short formats immediate is sign extended to operand size. 21 exceptions: 22 - x_none 23 verification: 24 - none 25 commands: 26 - file-name: "pos" 27 isa: 28 instructions: 29 - sig: ldai.64 imm:i64 30 acc: out:i64 31 format: [op_imm_64] 32 code-template: | 33 # test case1 - should put result to accumulator 34 ldai.64 %s 35 movi.64 v0, %s 36 cmp.64 v0 37 description: Check ldai.64 with various positive values. 38 tags: ['tsan'] 39 cases: 40 - values: 41 - "0x0" 42 - "0x0" 43 - values: 44 - "0" 45 - "0" 46 - values: 47 - "1" 48 - "1" 49 - values: 50 - "0x7FFFFFFFFFFFFFFF" 51 - "0x7FFFFFFFFFFFFFFF" 52 - values: 53 - "0x1234567890ABCDEF" 54 - "0x1234567890ABCDEF" 55 - values: 56 - "0x7FFFFFFFFFFFFFFF" 57 - "0x7FFFFFFFFFFFFFFF" 58 - values: 59 - "0x8000000000000000" 60 - "0x8000000000000000" 61 - values: 62 - "0.0" 63 - "0" 64 runner-options: [compile-failure] 65 description: Check ldai.64 with incorrect positive values (f64). 66 - values: 67 - "1.0" 68 - "1" 69 runner-options: [compile-failure] 70 description: Check ldai.64 with incorrect positive values (f64). 71 - file-name: "neg" 72 isa: 73 instructions: 74 - sig: ldai.64 imm:i64 75 acc: out:i64 76 format: [op_imm_64] 77 code-template: | 78 # test case1 - should put result to accumulator 79 ldai.64 %s 80 movi.64 v0, %s 81 cmp.64 v0 82 description: Check ldai.64 with various negative values. 83 cases: 84 - values: 85 - "-0x0" 86 - "0x0" 87 - values: 88 - "-0" 89 - "0" 90 - values: 91 - "-1" 92 - "-1" 93 - values: 94 - "-0x7FFFFFFFFFFFFFFF" 95 - "-9223372036854775807" 96 runner-options: [compile-failure] 97 - values: 98 - "-0x1234567890ABCDEF" 99 - "-0x1234567890ABCDEF" 100 - values: 101 - "-0x8000000000000000" 102 - "0x8000000000000000" 103 - values: 104 - "-0.0" 105 - "0" 106 runner-options: [compile-failure] 107 description: Check ldai.64 with incorrect negative values (f64). 108 - values: 109 - "-1.0" 110 - "-1" 111 runner-options: [compile-failure] 112 description: Check ldai.64 with incorrect negative values (f64). 113