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 14definitions: [] 15tests: 16 - file-name: fldai.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: fldai.64 imm:f64 30 acc: out:f64 31 format: [op_imm_64] 32 properties: [acc_write, float] 33 check-type: no-check 34 code-template: | 35 # test - check binary representation of FP literals - positive 36 fldai.64 %s 37 fmovi.64 v0, %s 38 fcmpg.64 v0 39 description: Check fldai.64 with various positive values (float and HEX literal). 40 tags: ['tsan', 'irtoc_ignore'] 41 cases: 42 - values: 43 - '0.0' 44 - '0x0' 45 - values: 46 - '0.1' 47 - '0x3FB999999999999A' 48 - values: 49 - '1.0' 50 - '0x3ff0000000000000' 51 - values: 52 - '12345678.90987654' 53 - '0x41678c29dd1db568' 54 - values: 55 - '3.141592653589793' 56 - '0x400921fb54442d18' 57 - values: 58 - '3.1415e3' 59 - '0x40a88b0000000000' 60 - values: 61 - '1.7976931348623157e308' 62 - '0x7FEFFFFFFFFFFFFF' 63 - values: 64 - '4.9e-324' 65 - '0x1' 66 - values: 67 - '1.7976931348623157e308' 68 - '0x7fefffffffffffff' 69 - values: 70 - '0x1234567890ABCDEF' 71 - '5.626349108908516e-221' 72 - values: 73 - '9223372036854775807' 74 - '0x43e0000000000000' 75 - values: 76 - '0.55' 77 - '0x3fe199999999999a' 78 79 - file-name: neg 80 isa: 81 instructions: 82 - sig: fldai.64 imm:f64 83 acc: out:f64 84 format: [op_imm_64] 85 properties: [acc_write, float] 86 check-type: no-check 87 tags: ['irtoc_ignore'] 88 code-template: | 89 # test - check binary representation of FP literals - negative 90 fldai.64 %s 91 fmovi.64 v0, %s 92 fcmpg.64 v0 93 description: Check fldai.64 with various negative values (float and HEX literal). 94 cases: 95 - values: 96 - '-0' 97 - '0x8000000000000000' 98 - values: 99 - '-1' 100 - '0xbff0000000000000' 101 - values: 102 - '-0x7FFFFFFFFFFFFFFF' 103 - '0xc3e0000000000000' 104 - values: 105 - '-0.0' 106 - '0x8000000000000000' 107 - values: 108 - '-0.1' 109 - '0xbfb999999999999a' 110 - values: 111 - '-1.0' 112 - '0xbff0000000000000' 113 - values: 114 - '-12345678.90987654' 115 - '0xc1678c29dd1db568' 116 - values: 117 - '-3.141592653589793' 118 - '0xc00921fb54442d18' 119 - values: 120 - '-4.9e-324' 121 - '0x8000000000000001' 122 - values: 123 - '-1.7976931348623157e308' 124 - '0xffefffffffffffff' 125 - values: 126 - '-0.55' 127 - '0xbfe199999999999a' 128 129 - file-name: err 130 isa: 131 instructions: 132 - sig: fldai.64 imm:f64 133 acc: out:f64 134 format: [op_imm_64] 135 properties: [acc_write, float] 136 code-template: | 137 # 138 fldai.64 %s 139 check-type: none 140 runner-options: [compile-failure] 141 description: Check fldai.64 with incorrect literal. 142 cases: 143 - values: 144 - '1e' 145 - values: 146 - 'e1' 147 ignore: true 148 bugid: ['932'] 149 - values: 150 - '-1e' 151 - values: 152 - '-e1' 153 ignore: true 154 bugid: ['932'] 155 - values: 156 - '1e1e1' 157 - values: 158 - '-1e1e1' 159 160 - file-name: range 161 isa: 162 instructions: 163 - sig: fldai.64 imm:f64 164 acc: out:f64 165 format: [op_imm_64] 166 properties: [acc_write, float] 167 check-type: no-check 168 tags: ['irtoc_ignore'] 169 code-template: | 170 # test - check binary representation of FP literals - positive 171 fldai.64 %s 172 fmovi.64 v0, %s 173 fcmpg.64 v0 174 description: Check fldai.64 with out-of-range positive/negative values. 175 cases: 176 - values: 177 - '4.9e-324' 178 - '0x0000000000000001' 179 - values: 180 - '4.9e-325' 181 - '0x0000000000000000' 182 - values: 183 - '-4.9e-324' 184 - '0x8000000000000001' 185 - values: 186 - '-4.9e-325' 187 - '0x8000000000000000' 188 - values: 189 - '1.7976931348623157e308' 190 - '0x7fefffffffffffff' 191 - values: 192 - '1.7976931348623157e309' 193 - '0x7ff0000000000000' 194 - values: 195 - '-1.7976931348623157e308' 196 - '0xffefffffffffffff' 197 - values: 198 - '-1.7976931348623157e309' 199 - '0xfff0000000000000' 200