1b8021494Sopenharmony_ci// Copyright 2016, VIXL authors
2b8021494Sopenharmony_ci// All rights reserved.
3b8021494Sopenharmony_ci//
4b8021494Sopenharmony_ci// Redistribution and use in source and binary forms, with or without
5b8021494Sopenharmony_ci// modification, are permitted provided that the following conditions are met:
6b8021494Sopenharmony_ci//
7b8021494Sopenharmony_ci//   * Redistributions of source code must retain the above copyright notice,
8b8021494Sopenharmony_ci//     this list of conditions and the following disclaimer.
9b8021494Sopenharmony_ci//   * Redistributions in binary form must reproduce the above copyright notice,
10b8021494Sopenharmony_ci//     this list of conditions and the following disclaimer in the documentation
11b8021494Sopenharmony_ci//     and/or other materials provided with the distribution.
12b8021494Sopenharmony_ci//   * Neither the name of ARM Limited nor the names of its contributors may be
13b8021494Sopenharmony_ci//     used to endorse or promote products derived from this software without
14b8021494Sopenharmony_ci//     specific prior written permission.
15b8021494Sopenharmony_ci//
16b8021494Sopenharmony_ci// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND
17b8021494Sopenharmony_ci// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18b8021494Sopenharmony_ci// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19b8021494Sopenharmony_ci// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
20b8021494Sopenharmony_ci// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21b8021494Sopenharmony_ci// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22b8021494Sopenharmony_ci// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23b8021494Sopenharmony_ci// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24b8021494Sopenharmony_ci// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25b8021494Sopenharmony_ci// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26b8021494Sopenharmony_ci
27b8021494Sopenharmony_ci{
28b8021494Sopenharmony_ci  "mnemonics": [
29b8021494Sopenharmony_ci    "Vabd",  // VABD{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; T1
30b8021494Sopenharmony_ci             // VABD{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; A1
31b8021494Sopenharmony_ci    "Vadd",  // VADD{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; A1
32b8021494Sopenharmony_ci             // VADD{<c>}{<q>}.F64 {<Dd>}, <Dn>, <Dm> ; A2
33b8021494Sopenharmony_ci             // VADD{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; T1
34b8021494Sopenharmony_ci             // VADD{<c>}{<q>}.F64 {<Dd>}, <Dn>, <Dm> ; T2
35b8021494Sopenharmony_ci    "Vceq",  // VCEQ{<c>}{<q>}.<dt> {<Dd>}, <Dn>, <Dm> ; A2
36b8021494Sopenharmony_ci             // VCEQ{<c>}{<q>}.<dt> {<Dd>}, <Dn>, <Dm> ; T2
37b8021494Sopenharmony_ci    "Vcge",  // VCGE{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; A2
38b8021494Sopenharmony_ci             // VCGE{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; T2
39b8021494Sopenharmony_ci    "Vcgt",  // VCGT{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; A2
40b8021494Sopenharmony_ci             // VCGT{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; T2
41b8021494Sopenharmony_ci    "Vcle",  // VCLE{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; A2
42b8021494Sopenharmony_ci             // VCLE{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; T2
43b8021494Sopenharmony_ci    "Vclt",  // VCLT{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; A2
44b8021494Sopenharmony_ci             // VCLT{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; T2
45b8021494Sopenharmony_ci    "Vmax",  // VMAX{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; A1
46b8021494Sopenharmony_ci             // VMAX{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; T1
47b8021494Sopenharmony_ci    "Vmin",  // VMIN{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; A1
48b8021494Sopenharmony_ci             // VMIN{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; T1
49b8021494Sopenharmony_ci    "Vpadd", // VPADD{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; A1
50b8021494Sopenharmony_ci             // VPADD{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; T1
51b8021494Sopenharmony_ci    "Vpmax", // VPMAX{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; A1
52b8021494Sopenharmony_ci             // VPMAX{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; T1
53b8021494Sopenharmony_ci    "Vpmin", // VPMIN{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; A1
54b8021494Sopenharmony_ci             // VPMIN{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; T1
55b8021494Sopenharmony_ci    "Vsub"   // VSUB{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; A1
56b8021494Sopenharmony_ci             // VSUB{<c>}{<q>}.F64 {<Dd>}, <Dn>, <Dm> ; A2
57b8021494Sopenharmony_ci             // VSUB{<c>}{<q>}.F32 {<Dd>}, <Dn>, <Dm> ; T1
58b8021494Sopenharmony_ci             // VSUB{<c>}{<q>}.F64 {<Dd>}, <Dn>, <Dm> ; T2
59b8021494Sopenharmony_ci  ],
60b8021494Sopenharmony_ci  "description": {
61b8021494Sopenharmony_ci    "operands": [
62b8021494Sopenharmony_ci      {
63b8021494Sopenharmony_ci        "name": "dt",
64b8021494Sopenharmony_ci        "type": "DataTypeFloat"
65b8021494Sopenharmony_ci      },
66b8021494Sopenharmony_ci      {
67b8021494Sopenharmony_ci        "name": "rd",
68b8021494Sopenharmony_ci        "type": "DRegister"
69b8021494Sopenharmony_ci      },
70b8021494Sopenharmony_ci      {
71b8021494Sopenharmony_ci        "name": "rn",
72b8021494Sopenharmony_ci        "type": "DRegister"
73b8021494Sopenharmony_ci      },
74b8021494Sopenharmony_ci      {
75b8021494Sopenharmony_ci        "name": "rm",
76b8021494Sopenharmony_ci        "type": "DRegister"
77b8021494Sopenharmony_ci      }
78b8021494Sopenharmony_ci    ],
79b8021494Sopenharmony_ci    "inputs": [
80b8021494Sopenharmony_ci      {
81b8021494Sopenharmony_ci        "name": "fpscr",
82b8021494Sopenharmony_ci        "type": "FPSCR"
83b8021494Sopenharmony_ci      },
84b8021494Sopenharmony_ci      {
85b8021494Sopenharmony_ci        "name": "rd",
86b8021494Sopenharmony_ci        "type": "DRegisterF64"
87b8021494Sopenharmony_ci      },
88b8021494Sopenharmony_ci      {
89b8021494Sopenharmony_ci        "name": "rn",
90b8021494Sopenharmony_ci        "type": "DRegisterF64"
91b8021494Sopenharmony_ci      },
92b8021494Sopenharmony_ci      {
93b8021494Sopenharmony_ci        "name": "rm",
94b8021494Sopenharmony_ci        "type": "DRegisterF64"
95b8021494Sopenharmony_ci      }
96b8021494Sopenharmony_ci    ]
97b8021494Sopenharmony_ci  },
98b8021494Sopenharmony_ci  "test-files": [
99b8021494Sopenharmony_ci    {
100b8021494Sopenharmony_ci      "name": "not-f16",
101b8021494Sopenharmony_ci      "type": "assembler",
102b8021494Sopenharmony_ci      "mnemonics" : [
103b8021494Sopenharmony_ci        "Vadd",
104b8021494Sopenharmony_ci        "Vsub"
105b8021494Sopenharmony_ci      ],
106b8021494Sopenharmony_ci      "test-cases": [
107b8021494Sopenharmony_ci        {
108b8021494Sopenharmony_ci          "name": "Floats",
109b8021494Sopenharmony_ci          "operands": [
110b8021494Sopenharmony_ci            "cond", "dt", "rd", "rn", "rm"
111b8021494Sopenharmony_ci          ],
112b8021494Sopenharmony_ci          "operand-filter": "dt in ['F32', 'F64']",
113b8021494Sopenharmony_ci          "operand-limit": 100
114b8021494Sopenharmony_ci        }
115b8021494Sopenharmony_ci      ]
116b8021494Sopenharmony_ci    },
117b8021494Sopenharmony_ci    {
118b8021494Sopenharmony_ci      "name": "f32-only",
119b8021494Sopenharmony_ci      "type": "assembler",
120b8021494Sopenharmony_ci      "mnemonics" : [
121b8021494Sopenharmony_ci        "Vceq",
122b8021494Sopenharmony_ci        "Vpadd",
123b8021494Sopenharmony_ci        "Vabd",
124b8021494Sopenharmony_ci        "Vcge",
125b8021494Sopenharmony_ci        "Vcgt",
126b8021494Sopenharmony_ci        "Vcle",
127b8021494Sopenharmony_ci        "Vclt",
128b8021494Sopenharmony_ci        "Vmax",
129b8021494Sopenharmony_ci        "Vmin",
130b8021494Sopenharmony_ci        "Vpmax",
131b8021494Sopenharmony_ci        "Vpmin"
132b8021494Sopenharmony_ci      ],
133b8021494Sopenharmony_ci      "test-cases": [
134b8021494Sopenharmony_ci        {
135b8021494Sopenharmony_ci          "name": "Floats",
136b8021494Sopenharmony_ci          "operands": [
137b8021494Sopenharmony_ci            "cond", "dt", "rd", "rn", "rm"
138b8021494Sopenharmony_ci          ],
139b8021494Sopenharmony_ci          "operand-filter": "dt == 'F32'",
140b8021494Sopenharmony_ci          "operand-limit": 100
141b8021494Sopenharmony_ci        }
142b8021494Sopenharmony_ci      ]
143b8021494Sopenharmony_ci    },
144b8021494Sopenharmony_ci    // TODO: Add f32 test for VADD and VSUB.
145b8021494Sopenharmony_ci    {
146b8021494Sopenharmony_ci      "name": "f64",
147b8021494Sopenharmony_ci      "type": "simulator",
148b8021494Sopenharmony_ci      "mnemonics" : [
149b8021494Sopenharmony_ci        "Vadd",
150b8021494Sopenharmony_ci        "Vsub"
151b8021494Sopenharmony_ci      ],
152b8021494Sopenharmony_ci      "test-cases": [
153b8021494Sopenharmony_ci        {
154b8021494Sopenharmony_ci          "name": "Floats",
155b8021494Sopenharmony_ci          "operands": [
156b8021494Sopenharmony_ci            "cond", "dt", "rd", "rn", "rm"
157b8021494Sopenharmony_ci          ],
158b8021494Sopenharmony_ci          "operand-filter": "dt == 'F64' and rn != rm",
159b8021494Sopenharmony_ci          "operand-limit": 100,
160b8021494Sopenharmony_ci          "inputs": [
161b8021494Sopenharmony_ci            "rd", "rn", "rm"
162b8021494Sopenharmony_ci          ],
163b8021494Sopenharmony_ci          "input-limit": 100
164b8021494Sopenharmony_ci        },
165b8021494Sopenharmony_ci        {
166b8021494Sopenharmony_ci          "name": "FloatsSameRegisters",
167b8021494Sopenharmony_ci          "operands": [
168b8021494Sopenharmony_ci            "cond", "dt", "rd", "rn", "rm"
169b8021494Sopenharmony_ci          ],
170b8021494Sopenharmony_ci          "operand-filter": "dt == 'F64' and rn == rm",
171b8021494Sopenharmony_ci          "operand-limit": 100,
172b8021494Sopenharmony_ci          "inputs": [
173b8021494Sopenharmony_ci            "rd", "rn", "rm"
174b8021494Sopenharmony_ci          ],
175b8021494Sopenharmony_ci          "input-filter": "rn == rm",
176b8021494Sopenharmony_ci          "input-limit": 100
177b8021494Sopenharmony_ci        }
178b8021494Sopenharmony_ci      ]
179b8021494Sopenharmony_ci    }
180b8021494Sopenharmony_ci  ]
181b8021494Sopenharmony_ci}
182