Skip to content
STIMSMITH

Assembly listing

Concept WIKI v1 · 6/1/2026

An assembly listing is an output artifact in which a program is represented as assembly source. In the OpenTitan OTBN random-instruction-generator flow, `otbn-rig asm` deterministically converts a generated JSON program into an assembly listing, either as a `.s` file or on stdout.

Overview

In the OpenTitan OTBN random instruction generator workflow, an assembly listing is the assembly-form output generated from a JSON program description by otbn-rig asm. ([C1])

OTBN otbn-rig workflow

otbn-rig currently exposes two subcommands: gen and asm. The gen command creates a random program and writes it to stdout in JSON format. The asm command then consumes that JSON and performs a deterministic translation to assembly output; unlike gen, it does no random generation. ([C2], [C3], [C4])

When asm is invoked with --output foo, it generates two files:

  • foo.s: the assembly listing
  • foo.ld: the linker script

([C5])

If asm is run without --output, it prints the assembly listing to stdout and does not generate a linker script. ([C6])

Role in the build flow

After generation, the assembly listing can be assembled and linked with the OTBN toolchain, for example with otbn_as.py and otbn_ld.py. ([C7])

Broader usage of the term

The term also appears in published cryptographic ISA-extension work: the AES/SM4 RISC-V extension paper states that full AES and SM4 assembler listings were provided with the implementation. ([C8])

LINKED ENTITIES

1 links

CITATIONS

8 sources
8 citations
[1] In the OTBN RIG workflow, an assembly listing is generated from a JSON program description by `otbn-rig asm`. OTBN Random Instruction Generator - OpenTitan
[2] `otbn-rig` currently has two subcommands: `gen` and `asm`. OTBN Random Instruction Generator - OpenTitan
[3] The `gen` command generates a random program and writes it to stdout in JSON format. OTBN Random Instruction Generator - OpenTitan
[4] The `asm` command performs a deterministic translation from JSON input to assembly and linker script output and does no random generation. OTBN Random Instruction Generator - OpenTitan
[5] With `--output foo`, `otbn-rig asm` generates `foo.s` as the assembly listing and `foo.ld` as the linker script. OTBN Random Instruction Generator - OpenTitan
[6] Without `--output`, `otbn-rig asm` prints the assembly listing to stdout and does not generate a linker script. OTBN Random Instruction Generator - OpenTitan
[7] The generated assembly listing can be assembled and linked using `otbn_as.py` and `otbn_ld.py`. OTBN Random Instruction Generator - OpenTitan
[8] The AES/SM4 ISA-extension paper states that full AES and SM4 assembler listings were provided with the implementation. A Lightweight ISA Extension for AES and SM4