# RISC-V branch-filtered resources

The registered 7z `0b` method reconstructs RISC-V JAL/AUIPC address transforms
inside the normal verified import workflow. Empty properties select offset zero;
four little-endian property bytes select a UInt32 initial address aligned to two
bytes. Other lengths and odd offsets are refused. Arithmetic wraps explicitly
at 32 bits. ARM64 retains its separate four-byte alignment rule.

```console
moon run app -- test corpus/riscv/wrap.7z
moon run app -- extract --contents-only corpus/riscv/lzma2.7z out riscv-import
moon run checks/riscv.mbtx -- wasm
moon run checks/riscv.mbtx -- native
```

Create `out` and use a new destination name. The checker compares both exported
members against the checked-in originals; no external packer is needed to run
it. Native mode executes the native CLI. Extracted instruction bytes are data;
no RISC-V program is executed or claimed to have run on RISC-V hardware.

Filtering runs over the whole solid folder before slicing members. The scalar
decoder preserves the SDK's lookahead/step rules, including two-byte instruction
alignment, unmatched-register pairs and marker-escape handling. Short inputs
pass through unchanged. Normal graph size/resource policies and all available
CRCs apply. There is no additional public API or performance claim.

## Independent evidence

`corpus/riscv/source/` holds 61,445 Apache-2.0 project-authored bytes generated by
`generate.mbtx`. They cover all 32 register fields, JAL immediates, AUIPC pairs,
marker-like instructions, unmatched registers, compressed instructions and an
odd tail. The first member is three bytes, splitting an instruction. Five
archives were independently packed, tested and unpacked with official 7-Zip
Extra 26.05; every original byte matched. These are structured instruction data,
not a copied executable or an external test suite.

| Case | Settings | Archive SHA-256 |
| --- | --- | --- |
| copy | default offset, Copy, solid | `19e3ec4379e38c5be92d483c2cf25a0d9142e6bc236f1cdea68a96898de6a613` |
| lzma2 | default offset, LZMA2, solid | `4bc6d23d95995c8fb38cf13b06ecfc399d12aae0dba905782551f36b9bebb5d9` |
| offset | offset 4096, Copy, solid | `cf823ca3269a6d96dac6db4adedc60363570b2bc966f4c1a2127a0f1d2148990` |
| wrap | offset 4294967294, LZMA, solid | `fc40f4da05d28f711e35af8ebe8fbe04272b8d4eb98955cd777801460f46fd40` |
| separate | default offset, LZMA2, two folders | `d042eedbcf3a40fff58ed662e9e5d01fef27930193e5877eac4bcfbdbeec3e99` |

```console
moon run corpus/riscv/generate.mbtx -- PATH_TO_7ZA26 NEW_DIRECTORY
```

The generator verifies the producer banner and independent extraction. The
decoder adapts Igor Pavlov's Public Domain 7-Zip 26.05 `Bra.c`; source notices
and licensing are recorded in [SOURCES.md](../SOURCES.md). Broader
[reader compatibility](compatibility.md) remains incomplete.
