• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: nop
17    isa:
18      title: No operation
19      description: Perform an operation without behavior.
20      exceptions:
21        - x_none
22      verification:
23        - none
24
25    commands:
26      - file-name: op_none
27        isa:
28          instructions:
29            - sig: nop
30              acc: none
31              format: [op_none]
32        description: Check 'nop' doesn't affect register values.
33        check-type: no-check
34        code-template: |
35          #
36          %s
37              nop
38          %s
39              ldai 0
40              return
41          err:
42              ldai 1
43        tags: ['tsan']
44        cases:
45          - values:
46              - '#{[*0..255].map do |i| "    movi v#{i}, #{i}\n" end .join}'
47              - '#{[*0..255].map do |i| "    ldai #{i}\n    nop\n    jne v#{i}, err\n" end .join}'
48