• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: "movi.64"
17    isa:
18      title: Move immediate-to-register
19      description: >
20        Move integer immediate into a register. For short formats immediate is sign extended to operand size.
21      exceptions:
22        - x_none
23      verification:
24        - none
25    commands:
26      - file-name: "imm_64"
27        isa:
28          instructions:
29            - sig: movi.64 v:out:i64, imm:i64
30              acc: none
31              format: [op_v_8_imm_64]
32        code-template: |
33          #
34              ldai.64 %s
35              movi.64 v0, %s
36              cmp.64 v0
37        description: Check movi.64 with various values.
38        tags: ['tsan']
39        cases:
40          - values:
41              - 0
42              - 0
43          - values:
44              - 1
45              - 1
46          - values:
47              - -1
48              - -1
49          - values:
50              - 0xF
51              - 0xF
52          - values:
53              - -0xF
54              - -0xF
55          - values:
56              - 0x7F
57              - 0x7F
58          - values:
59              - -0x7F
60              - -0x7F
61          - values:
62              - 0xFF
63              - 0xFF
64          - values:
65              - -0xFF
66              - -0xFF
67          - values:
68              - 0x7FFF
69              - 0x7FFF
70          - values:
71              - -0x7FFF
72              - -0x7FFF
73          - values:
74              - 0xFFFF
75              - 0xFFFF
76          - values:
77              - -0xFFFF
78              - -0xFFFF
79          - values:
80              - 0x7FFFFFFF
81              - 0x7FFFFFFF
82          - values:
83              - -0x7FFFFFFF
84              - -0x7FFFFFFF
85          - values:
86              - 0xFFFFFFFF
87              - 0xFFFFFFFF
88          - values:
89              - -0xFFFFFFFF
90              - -0xFFFFFFFF
91          - values:
92              - 0x12345678
93              - 0x12345678
94          - values:
95              - -0x12345678
96              - -0x12345678
97          - values:
98              - 0xFEDCBA98
99              - 0xFEDCBA98
100          - values:
101              - -0xFEDCBA98
102              - -0xFEDCBA98
103          - values:
104              - 0x100000000
105              - 0x100000000
106          - values:
107              - -0x100000000
108              - -0x100000000
109          - values:
110              - 0x100000001
111              - 0x100000001
112          - values:
113              - -0x100000001
114              - -0x100000001
115          - values:
116              - 0xFEDCBA9876543210
117              - 0xFEDCBA9876543210
118          - values:
119              - -0xFEDCBA9876543210
120              - -0xFEDCBA9876543210
121          - values:
122              - 0
123              - 0.1
124            runner-options: [compile-failure]
125            case-check-type: no-check
126            description: Check movi.64 with incorrect value (f64 value).
127          - values:
128              - 0
129              - 1e1
130            runner-options: [compile-failure]
131            case-check-type: no-check
132            description: Check movi.64 with incorrect value (f64 value).
133          - values:
134              - 0
135              - e1
136            runner-options: [compile-failure]
137            case-check-type: no-check
138            description: Check movi.64 with incorrect value.
139
140      - file-name: "vd_8"
141        isa:
142          instructions:
143            - sig: movi.64 v:out:i64, imm:i64
144              acc: none
145              format: [op_v_8_imm_64]
146        code-template: |
147          #
148              ldai.64 1
149              movi.64 %s, 1
150              cmp.64 %s
151        description: Check mov.64 instruction with different register numbers (8 bit).
152        cases:
153          - values:
154              - v0
155              - v0
156          - values:
157              - v1
158              - v1
159          - values:
160              - v15
161              - v15
162          - values:
163              - v16
164              - v16
165          - values:
166              - v255
167              - v255
168          - values:
169              - v256
170              - v0
171            runner-options: [compile-failure]
172            case-check-type: no-check
173            description: Check movi.64 instruction with out-of-range register number.
174