1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* 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.
*/
/*!*
# AARCHMRS dataset as Rust code
This Rust library provides functionality for synthesizing ARM64 instruction
encodings. It was derived from the Arm Limited's [AARCHMRS
dataset](https://developer.arm.com/Architectures/A-Profile%20Architecture#Downloads).
The crate's module structure follows the dataset tree structure. For each
instruction variant described in the dataset, a corresponding Rust function is
generated.
The source code of this crate is generated by tools at the same repository at
<https://github.com/monoid/harm>.
As with the original dataset, this code is licensed under BSD-3-Clause license.
## Features
As of 2025-06, the dataset contains descriptions for A64, A32 and T32 instructions sets.
They are guarded by respective feature flags (`A64`, `A32` and `T32`), and `a64` is default.
The `meta` flag generates additional information for each instructions.
## Regenerating dataset
To regenerate the code, use the `aarchmrs-generate` binary. The dataset URL and
MD5 checksum are pinned in the `aarchmrs-gen` crate.
```shell
cargo run -p aarchmrs-generate -- \
--doc-file ./aarchmrs-instructions/README.md \
./aarchmrs-instructions/src
```
Please, run `cargo fmt` afterwards.
*/