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: "lda.null"
17    isa:
18      title: Load null reference into accumulator
19      description: Load null reference into accumulator.
20      exceptions:
21        - x_none
22      verification:
23        - none
24    commands:
25      - file-name: "eq"
26        isa:
27          instructions:
28            - sig: lda.null
29              acc: out:ref
30              format: [op_none]
31        description: Check lda.null loads null reference into accumulator.
32        tags: ['tsan']
33        code-template: |
34          #
35              mov.null v0
36              lda.null
37              jne.obj v0, return_ne_num
38              ldai 0
39              return
40          return_ne_num:
41              ldai 1
42              return
43        check-type: none
44