• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2016, VIXL authors
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are met:
6//
7//   * Redistributions of source code must retain the above copyright notice,
8//     this list of conditions and the following disclaimer.
9//   * Redistributions in binary form must reproduce the above copyright notice,
10//     this list of conditions and the following disclaimer in the documentation
11//     and/or other materials provided with the distribution.
12//   * Neither the name of ARM Limited nor the names of its contributors may be
13//     used to endorse or promote products derived from this software without
14//     specific prior written permission.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND
17// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
20// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
27{
28  "mnemonics": [
29    "Adc",  // ADC{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
30    "Adcs", // ADCS{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
31    "Add",  // ADD{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
32    "Adds", // ADDS{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
33    "And",  // AND{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
34    "Ands", // ANDS{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
35    "Bic",  // BIC{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
36    "Bics", // BICS{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
37    "Eor",  // EOR{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
38    "Eors", // EORS{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
39    "Orr",  // ORR{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
40    "Orrs", // ORRS{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
41    "Rsb",  // RSB{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
42    "Rsbs", // RSBS{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
43    "Rsc",  // RSC{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
44    "Rscs", // RSCS{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
45    "Sbc",  // SBC{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
46    "Sbcs", // SBCS{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
47    "Sub",  // SUB{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
48    "Subs"  // SUBS{<c>}{<q>} {<Rd>}, <Rn>, <Rm>, <shift> <Rs> ; A1
49  ],
50  "description": {
51    "operands": [
52      {
53        "name": "cond",
54        "type": "Condition"
55      },
56      {
57        "name": "rd",
58        "type": "AllRegisters"
59      },
60      {
61        "name": "rn",
62        "type": "AllRegisters"
63      },
64      {
65        "name": "op",
66        "wrapper": "Operand",
67        "operands": [
68          {
69            "name": "rm",
70            "type": "AllRegisters"
71          },
72          {
73            "name": "shift",
74            "type": "Shift"
75          },
76          {
77            "name": "rs",
78            "type": "AllRegisters"
79          }
80        ]
81      }
82    ],
83    "inputs": [
84      {
85        "name": "apsr",
86        "type": "NZCV"
87      },
88      {
89        "name": "rd",
90        "type": "Register"
91      },
92      {
93        "name": "rn",
94        "type": "Register"
95      },
96      {
97        "name": "rm",
98        "type": "Register"
99      },
100      {
101        "name": "rs",
102        "type": "RegisterShift"
103      }
104    ]
105  },
106  "test-files": [
107    {
108      "type": "assembler",
109      "test-cases": [
110        {
111          "name": "Operands",
112          "operands": [
113            "cond", "rd", "rn", "rm", "shift", "rs"
114          ],
115          "operand-limit": 1000,
116          "operand-filter": "(rd != 'r15') and (rn != 'r15') and (rm != 'r15') and (rs != 'r15')"
117        }
118      ]
119    },
120    {
121      "type": "assembler-negative",
122      "test-cases": [
123        {
124          "name": "Operands",
125          "operands": [
126            "cond", "rd", "rn", "rm", "shift", "rs"
127          ],
128          "operand-limit": 1000,
129          "operand-filter": "(rd == 'r15') or (rn == 'r15') or (rm == 'r15') or (rs == 'r15')"
130        }
131      ]
132    },
133    {
134      "type": "simulator",
135      "test-cases": [
136        {
137          "name": "Condition",
138          "operands": [
139            "cond"
140          ],
141          "inputs": [
142            "apsr"
143          ]
144        },
145        // Test combinations of registers values with rd == rn.
146        {
147          "name": "RdIsRn",
148          "operands": [
149            "rd", "rn", "rm"
150          ],
151          "inputs": [
152            "rd", "rn", "rm"
153          ],
154          "operand-filter": "rd == rn and rn != rm",
155          "operand-limit": 10,
156          "input-filter": "rd == rn",
157          "input-limit": 200
158        },
159        // Test combinations of registers values with rd == rm.
160        {
161          "name": "RdIsRm",
162          "operands": [
163            "rd", "rn", "rm"
164          ],
165          "inputs": [
166            "rd", "rn", "rm"
167          ],
168          "operand-filter": "rd == rm and rn != rm",
169          "operand-limit": 10,
170          "input-filter": "rd == rm",
171          "input-limit": 200
172        },
173        // Test combinations of registers values.
174        {
175          "name": "RdIsNotRnIsNotRm",
176          "operands": [
177            "rd", "rn", "rm"
178          ],
179          "inputs": [
180            "rd", "rn", "rm"
181          ],
182          "operand-filter": "rd != rn != rm",
183          "operand-limit": 10,
184          "input-limit": 200
185        },
186        // Test combinations of shift types and register values.
187        {
188          "name": "ShiftTypes",
189          "operands": [
190            "rm", "shift", "rs"
191          ],
192          "inputs": [
193            "rm", "rs"
194          ],
195          "operand-filter": "rm == 'r1' and rs == 'r2'"
196        }
197      ]
198    }
199  ]
200}
201