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: "mov.null" 17 isa: 18 title: Move null reference into register 19 description: Move null reference into a register. 20 exceptions: 21 - x_none 22 verification: 23 - none 24 commands: 25 - file-name: "op_vd_8" 26 isa: 27 instructions: 28 - sig: mov.null v:out:ref 29 acc: none 30 format: [op_v_8] 31 code-template: | 32 # 33 mov.null %s 34 lda.null 35 jne.obj %s, return_ne_num 36 ldai 0 37 return 38 return_ne_num: 39 ldai 1 40 return 41 description: Check mov.null moves null reference to register. 42 tags: ['tsan'] 43 cases: 44 - values: 45 - v0 46 - v0 47 - values: 48 - v1 49 - v1 50 - values: 51 - v15 52 - v15 53 - values: 54 - v16 55 - v16 56 - values: 57 - v127 58 - v127 59 - values: 60 - v128 61 - v128 62 - values: 63 - v255 64 - v255 65 - values: 66 - v256 67 - v0 68 runner-options: [compile-failure] 69 case-check-type: no-check 70 description: Check mov.null with incorrect register number. 71 - values: 72 - 123 73 - v0 74 runner-options: [compile-failure] 75 case-check-type: no-check 76 description: Check mov.null with incorrect register number. 77 - values: 78 - a0 79 - v0 80 runner-options: [compile-failure] 81 case-check-type: no-check 82 description: Check mov.null with incorrect register number. 83