blob: 7f827cb8f97aa01eae114d77f81dc24cda7c4a31 [file]
<!-- Copyright (c) 2010-2026 Arm Limited or its affiliates. All rights reserved. -->
<!-- This document is Non-confidential and licensed under the BSD 3-clause license. -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<!--FAVICON.ico-->
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-TileImage" content="../img/mstile-144x144.png">
<link rel="icon" href="../img/favicon.ico">
<title>Instruction.InstructionSet - ARM Machine Readable Schema - 2.9.6</title>
<!--CSS-->
<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../css/schema.css">
<link rel="stylesheet" type="text/css" href="../css/hljs-github.css">
</head>
<body>
<div class="container">
<div class="row heading">
<div class="col-md-6 pull-left"><a href="../index.html"><img src="../img/arm.svg" class="logo" /></a></div>
<div class="col-md-6 pull-left"><h1>AARCHMRS Schema <small>2.9.6</small></h1></div>
<!--Show the home button-->
<a href="../index.html"><div class="back-to-home">&nlarr; Home</div></a>
</div>
</div>
<div class="container">
<div class="row">
<h2>
<span class="title-namespace">Instruction.</span><span class=" title-type">InstructionSet</span>
<!-- if oneOf is set, then type is ignored -->
<span class="type">object</span>
</h2>
<div class="static-markdown"><p>An <a class="schema_link" href="../Instruction/InstructionSet_schema.html" title="Instruction.InstructionSet">InstructionSet</a> object is the root of a tree of instructions. It defines the following for an instruction set:</p>
<ul>
<li>The conditions under which it is available.</li>
<li>An implicit bit pattern width, which is the width of the encoding property.</li>
<li>A read_width, which is the width of an instruction within the bit pattern.</li>
<li>A root encoding, which is described in the encoding property.</li>
<li>A list of its direct children.</li>
<li>The default operation when an encoding is not specified in the instruction set.</li>
</ul></div>
</div>
<div class="row">
<div>
<!-- A simple object -->
<h3 class="type">object</h3>
<table class="table table-hover properties">
<thead>
<tr>
<th class="col-md-4">Properties</th>
<th class="col-md-4">Type</th>
<th class="col-md-4">Description</th>
</tr>
</thead>
<tbody>
<!-- properties -->
<tr id="/properties/_meta" class="property">
<th class="col-md-4">
<a href="#/properties/_meta">_meta</a>
</th>
<td class="col-md-4">
<a href="../Meta_schema.html" class="schema_link">Meta</a>
</td>
<td class="col-md-4">
<div><p>Metadata</p></div>
<div>
See
<a href="../Meta_schema.html" class="schema_link">Meta</a>
for more information.
</div>
</td>
</tr>
<tr id="/properties/_type" class="property">
<th class="col-md-4">
<a href="#/properties/_type">_type</a>
</th>
<td class="col-md-4">
</td>
<td class="col-md-4">
<dl>
<dt>Enum</dt>
<dd>
<code>Instruction.InstructionSet</code>
</dd>
</dl>
</td>
</tr>
<tr id="/properties/children" class="property">
<th class="col-md-4">
<a href="#/properties/children">children</a>
</th>
<td class="col-md-4">
<div><span class="type">array</span> [</div>
<div class="items-oneOf">
<a href="InstructionGroup_schema.html" class="schema_link">InstructionGroup</a>
</div>
<div class="items-oneOf">
<a href="Instruction_schema.html" class="schema_link">Instruction</a>
</div>
<div>]</div>
</td>
<td class="col-md-4">
<div><p>Defines children nodes.</p>
<p>Any child node that redefines the <code>operation_id</code> overwrites
the behavior that is defined by the <code>operation_id</code> of this <a class="schema_link" href="../Instruction/InstructionSet_schema.html" title="Instruction.InstructionSet">InstructionSet</a>.</p></div>
</td>
</tr>
<tr id="/properties/condition" class="property">
<th class="col-md-4">
<a href="#/properties/condition">condition</a>
</th>
<td class="col-md-4">
<a href="../Traits/HasCondition_schema.html#/definitions/condition" class="schema_link">Traits.HasCondition</a>
</td>
<td class="col-md-4">
<div>
See
<a href="../Traits/HasCondition_schema.html#/definitions/condition" class="schema_link">definitions.condition</a> in
<a href="../Traits/HasCondition_schema.html#/definitions/condition" class="schema_link">Traits.HasCondition</a>
for more information.
</div>
</td>
</tr>
<tr id="/properties/encoding" class="property">
<th class="col-md-4">
<a href="#/properties/encoding">encoding<sup>&loz;</sup></a>
</th>
<td class="col-md-4">
<a href="Encodeset/Encodeset_schema.html" class="schema_link">Encodeset.Encodeset</a>
</td>
<td class="col-md-4">
<div>
See
<a href="Encodeset/Encodeset_schema.html" class="schema_link">Encodeset.Encodeset</a>
for more information.
</div>
</td>
</tr>
<tr id="/properties/name" class="property">
<th class="col-md-4">
<a href="#/properties/name">name<sup>&loz;</sup></a>
</th>
<td class="col-md-4">
<a href="../AST/Identifier_schema.html#/definitions/c_identifier_regex" class="schema_link">AST.Identifier</a>
</td>
<td class="col-md-4">
<div><p>The name of the <code>InstructionSet</code>.</p></div>
<div>
See
<a href="../AST/Identifier_schema.html#/definitions/c_identifier_regex" class="schema_link">definitions.c_identifier_regex</a> in
<a href="../AST/Identifier_schema.html#/definitions/c_identifier_regex" class="schema_link">AST.Identifier</a>
for more information.
</div>
</td>
</tr>
<tr id="/properties/operation_id" class="property">
<th class="col-md-4">
<a href="#/properties/operation_id">operation_id</a>
</th>
<td class="col-md-4">
<ul class="inline list-type">
<li class="inline type">string</li>
<li class="inline type">null</li>
</ul>
</td>
<td class="col-md-4">
<div><p>The ID of an operation that describes the default behavior of unspecified encodings within the <a class="schema_link" href="../Instruction/InstructionSet_schema.html" title="Instruction.InstructionSet">InstructionSet</a>.</p></div>
<dl>
<dt>Pattern</dt>
<dd><code title="Regex">/^(?!__)[a-zA-Z_][a-zA-Z0-9_]*$/</code></dd>
</dl>
<div>
<b>Default</b>
<pre class="schema-json"><code class="language-json">null</code></pre>
</div>
</td>
</tr>
<tr id="/properties/read_width" class="property">
<th class="col-md-4">
<a href="#/properties/read_width">read_width<sup>&loz;</sup></a>
</th>
<td class="col-md-4">
<ul class="inline list-type">
<li class="inline type">integer</li>
</ul>
</td>
<td class="col-md-4">
<div><p>How many bits a decoder must read to determine the encoding. Must evenly divide the width of the encoding for this <a class="schema_link" href="../Instruction/InstructionSet_schema.html" title="Instruction.InstructionSet">InstructionSet</a>.</p></div>
<dl>
<dt>Minimum</dt>
<dd>1</dd>
</dl>
</td>
</tr>
<!-- patternProperties -->
<!-- object property attributes -->
<tr>
<td colspan="3">
<dl>
<dt>Additional Properties</dt>
<dd>Not Allowed</dd>
</dl>
</td>
</tr>
<tr>
<td colspan="3">
<dl>
<dt>&loz; Required</dt>
<dd>Properties marked with &loz; are required properties.</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<!-- array, and it has described items -->
</div>
<h5>Examples</h5>
<div>
<pre class="schema-json"><code class="language-json">{
&#34;_type&#34;: &#34;Instruction.InstructionSet&#34;,
&#34;name&#34;: &#34;QUILL&#34;,
&#34;read_width&#34;: 32,
&#34;encoding&#34;: {
&#34;_type&#34;: &#34;Instruction.Encodeset.Encodeset&#34;,
&#34;width&#34;: 32,
&#34;values&#34;: [
{
&#34;_type&#34;: &#34;Instruction.Encodeset.Field&#34;,
&#34;range&#34;: {
&#34;_type&#34;: &#34;Range&#34;,
&#34;start&#34;: 29,
&#34;width&#34;: 3
},
&#34;name&#34;: &#34;op&#34;,
&#34;value&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;xxx&#39;&#34;
},
&#34;should_be_mask&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;000&#39;&#34;
}
}
]
}
}</code></pre>
<pre class="schema-json"><code class="language-json">{
&#34;_type&#34;: &#34;Instruction.InstructionSet&#34;,
&#34;name&#34;: &#34;PEN&#34;,
&#34;read_width&#34;: 32,
&#34;encoding&#34;: {
&#34;_type&#34;: &#34;Instruction.Encodeset.Encodeset&#34;,
&#34;width&#34;: 32,
&#34;values&#34;: [
{
&#34;_type&#34;: &#34;Instruction.Encodeset.Field&#34;,
&#34;range&#34;: {
&#34;_type&#34;: &#34;Range&#34;,
&#34;start&#34;: 29,
&#34;width&#34;: 3
},
&#34;name&#34;: &#34;op&#34;,
&#34;value&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;xxx&#39;&#34;
},
&#34;should_be_mask&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;000&#39;&#34;
}
}
]
},
&#34;operation_id&#34;: &#34;NOP&#34;,
&#34;children&#34;: [
{
&#34;_type&#34;: &#34;Instruction.Instruction&#34;,
&#34;name&#34;: &#34;ADD&#34;,
&#34;encoding&#34;: {
&#34;_type&#34;: &#34;Instruction.Encodeset.Encodeset&#34;,
&#34;width&#34;: 32,
&#34;values&#34;: [
{
&#34;_type&#34;: &#34;Instruction.Encodeset.Bits&#34;,
&#34;range&#34;: {
&#34;_type&#34;: &#34;Range&#34;,
&#34;start&#34;: 29,
&#34;width&#34;: 3
},
&#34;value&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;011&#39;&#34;,
&#34;meaning&#34;: null
},
&#34;should_be_mask&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;000&#39;&#34;
}
},
{
&#34;_type&#34;: &#34;Instruction.Encodeset.Field&#34;,
&#34;range&#34;: {
&#34;_type&#34;: &#34;Range&#34;,
&#34;start&#34;: 10,
&#34;width&#34;: 5
},
&#34;name&#34;: &#34;Rn&#34;,
&#34;value&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;xxxxx&#39;&#34;
},
&#34;should_be_mask&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;00000&#39;&#34;
}
},
{
&#34;_type&#34;: &#34;Instruction.Encodeset.Field&#34;,
&#34;range&#34;: {
&#34;_type&#34;: &#34;Range&#34;,
&#34;start&#34;: 5,
&#34;width&#34;: 5
},
&#34;name&#34;: &#34;Rm&#34;,
&#34;value&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;xxxxx&#39;&#34;
},
&#34;should_be_mask&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;00000&#39;&#34;
}
},
{
&#34;_type&#34;: &#34;Instruction.Encodeset.Field&#34;,
&#34;range&#34;: {
&#34;_type&#34;: &#34;Range&#34;,
&#34;start&#34;: 0,
&#34;width&#34;: 5
},
&#34;name&#34;: &#34;Rd&#34;,
&#34;value&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;xxxxx&#39;&#34;
},
&#34;should_be_mask&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;00000&#39;&#34;
}
}
]
},
&#34;operation_id&#34;: &#34;add_sub_imm&#34;
},
{
&#34;_type&#34;: &#34;Instruction.InstructionGroup&#34;,
&#34;name&#34;: &#34;not_ADD&#34;,
&#34;encoding&#34;: {
&#34;_type&#34;: &#34;Instruction.Encodeset.Encodeset&#34;,
&#34;width&#34;: 32,
&#34;values&#34;: [
{
&#34;_type&#34;: &#34;Instruction.Encodeset.Bits&#34;,
&#34;range&#34;: {
&#34;_type&#34;: &#34;Range&#34;,
&#34;start&#34;: 29,
&#34;width&#34;: 3
},
&#34;value&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;111&#39;&#34;,
&#34;meaning&#34;: null
},
&#34;should_be_mask&#34;: {
&#34;_type&#34;: &#34;Values.Value&#34;,
&#34;value&#34;: &#34;&#39;000&#39;&#34;
}
}
]
}
}
]
}</code></pre>
</div>
</div>
<div class="row schema">
<h3>Schema <small><a href="http://json-schema.org/draft-04/schema#">http://json-schema.org/draft-04/schema#</a></small></h3>
<pre class="schema-json"><code class="language-json">{
"type": "object",
"info": [
"An $(~Instruction.InstructionSet) object is the root of a tree of instructions. It defines the following for an instruction set:",
[
"* The conditions under which it is available.",
"* An implicit bit pattern width, which is the width of the encoding property.",
"* A read_width, which is the width of an instruction within the bit pattern.",
"* A root encoding, which is described in the encoding property.",
"* A list of its direct children.",
"* The default operation when an encoding is not specified in the instruction set."
]
],
"examples": [
{
"_type": "Instruction.InstructionSet",
"name": "QUILL",
"read_width": 32,
"encoding": {
"_type": "Instruction.Encodeset.Encodeset",
"width": 32,
"values": [
{
"_type": "Instruction.Encodeset.Field",
"range": {
"_type": "Range",
"start": 29,
"width": 3
},
"name": "op",
"value": {
"_type": "Values.Value",
"value": "'xxx'"
},
"should_be_mask": {
"_type": "Values.Value",
"value": "'000'"
}
}
]
}
},
{
"_type": "Instruction.InstructionSet",
"name": "PEN",
"read_width": 32,
"encoding": {
"_type": "Instruction.Encodeset.Encodeset",
"width": 32,
"values": [
{
"_type": "Instruction.Encodeset.Field",
"range": {
"_type": "Range",
"start": 29,
"width": 3
},
"name": "op",
"value": {
"_type": "Values.Value",
"value": "'xxx'"
},
"should_be_mask": {
"_type": "Values.Value",
"value": "'000'"
}
}
]
},
"operation_id": "NOP",
"children": [
{
"_type": "Instruction.Instruction",
"name": "ADD",
"encoding": {
"_type": "Instruction.Encodeset.Encodeset",
"width": 32,
"values": [
{
"_type": "Instruction.Encodeset.Bits",
"range": {
"_type": "Range",
"start": 29,
"width": 3
},
"value": {
"_type": "Values.Value",
"value": "'011'",
"meaning": null
},
"should_be_mask": {
"_type": "Values.Value",
"value": "'000'"
}
},
{
"_type": "Instruction.Encodeset.Field",
"range": {
"_type": "Range",
"start": 10,
"width": 5
},
"name": "Rn",
"value": {
"_type": "Values.Value",
"value": "'xxxxx'"
},
"should_be_mask": {
"_type": "Values.Value",
"value": "'00000'"
}
},
{
"_type": "Instruction.Encodeset.Field",
"range": {
"_type": "Range",
"start": 5,
"width": 5
},
"name": "Rm",
"value": {
"_type": "Values.Value",
"value": "'xxxxx'"
},
"should_be_mask": {
"_type": "Values.Value",
"value": "'00000'"
}
},
{
"_type": "Instruction.Encodeset.Field",
"range": {
"_type": "Range",
"start": 0,
"width": 5
},
"name": "Rd",
"value": {
"_type": "Values.Value",
"value": "'xxxxx'"
},
"should_be_mask": {
"_type": "Values.Value",
"value": "'00000'"
}
}
]
},
"operation_id": "add_sub_imm"
},
{
"_type": "Instruction.InstructionGroup",
"name": "not_ADD",
"encoding": {
"_type": "Instruction.Encodeset.Encodeset",
"width": 32,
"values": [
{
"_type": "Instruction.Encodeset.Bits",
"range": {
"_type": "Range",
"start": 29,
"width": 3
},
"value": {
"_type": "Values.Value",
"value": "'111'",
"meaning": null
},
"should_be_mask": {
"_type": "Values.Value",
"value": "'000'"
}
}
]
}
}
]
}
],
"properties": {
"_meta": {
"$ref": "../Meta.json",
"info": [
"Metadata"
]
},
"_type": {
"enum": [
"Instruction.InstructionSet"
]
},
"name": {
"info": [
"The name of the `InstructionSet`."
],
"$ref": "../AST/Identifier.json#/definitions/c_identifier_regex"
},
"encoding": {
"$ref": "Encodeset/Encodeset.json"
},
"read_width": {
"info": [
"How many bits a decoder must read to determine the encoding. Must evenly divide the width of the encoding for this $(~Instruction.InstructionSet)."
],
"type": "integer",
"minimum": 1
},
"condition": {
"$ref": "../Traits/HasCondition.json#/definitions/condition"
},
"operation_id": {
"info": [
"The ID of an operation that describes the default behavior of unspecified encodings within the $(~Instruction.InstructionSet)."
],
"type": [
"string",
"null"
],
"pattern": "^(?!__)[a-zA-Z_][a-zA-Z0-9_]*$",
"default": null
},
"children": {
"type": "array",
"info": [
"Defines children nodes.",
[
"Any child node that redefines the `operation_id` overwrites",
"the behavior that is defined by the `operation_id` of this $(~Instruction.InstructionSet)."
]
],
"items": {
"oneOf": [
{
"$ref": "InstructionGroup.json"
},
{
"$ref": "Instruction.json"
}
]
}
}
},
"required": [
"encoding",
"read_width",
"name"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Instruction.InstructionSet"
}</code></pre>
</div>
</div>
<div class="container">
<div class="footer text-right">
Copyright &copy; 2025 ARM Limited or its affiliates. All rights reserved.
</div>
</div>
<script src="../js/highlight/highlight.js"></script>
<script src="../js/highlight/languages/json.min.js"></script>
<script src="../js/highlight/languages/django.min.js"></script> <!-- JINJA2 -->
<script src="../js/highlight/languages/yaml.min.js"></script>
<script src="../js/highlight/languages/isa.js"></script>
<script type="text/javascript">
window.onload = function() {
hljs.configure({
cssSelector: ".schema-json code, .includes code, pre code",
noHighlightRe: /^(no-?highlight|nohl)$/i,
});
hljs.highlightAll()
};
</script>
</body>
</html>