stubbi/math

Active release

An unsigned 64-bit minimum routine for the System V AMD64 ABI.

Version
0.6.0
License
MIT
Formats
Source archive
Release targets
  • x86_64-linux

Use this package

Install Asm before you fetch a file. Run asm doctor to check the required host tools.

Source archive · x86_64-linux
asm fetch stubbi/math@0.6.0 --target x86_64-linux --kind source

Fetch downloads and checks bytes. It does not execute the package.

Inspect release files

Readme

Source snapshot: README.md at commit 6d7c7df53b1ae17a44c13b038cf95cc798fffa94. This is source documentation, not artifact verification.

Unsigned integer helpers

This project supplies asm_u64_min for seven targets. The function returns the smaller of two unsigned 64-bit integers. Every 64-bit input value is permitted. One manifest declares the implementations under targets/<target>/.

asm.toml
LICENSE
targets/
  x86_64-linux/
  aarch64-linux/
  riscv64-linux/
  aarch64-macos/
  x86_64-macos/
  x86_64-windows/
  aarch64-windows/

Each target contains src/min.s, src/main.s, assembly tests, and its interface instructions. The root manifest selects the example and primary test for each target. An ABI defines register, stack, call, and data-layout rules. The target instructions specify the applicable ABI and preserved registers.

Run with Asm

Use Asm 0.6.0 or later. Earlier binaries do not support this manifest extension.

Native execution requires Linux x86-64, Linux AArch64, or Apple Silicon with macOS 15 or later. Linux builds require GNU Binutils. macOS builds require Apple's Command Line Tools. The following commands require an installed Asm CLI.

  1. Open this project directory.
  2. Run the native example.
asm run

Expected output:

min(12, 37) = 12
  1. Run the native assembly tests.
asm test

The test exits with status zero. Asm reports Passed targets/<native-target>/tests/main.s. These tests are not a formal proof. This project makes no performance claim.

Build another Linux target

Cross builds produce files without executing them. Linux hosts require the matching GNU cross assembler and linker in /usr/bin. macOS requires Homebrew LLVM and LLD for Linux cross builds. Asm uses /opt/homebrew/opt/llvm/bin/clang and /opt/homebrew/opt/lld/bin/ld.lld.

  1. Check the targets available from this CLI.
asm targets
  1. Build the RISC-V64 Linux example.
asm build --target riscv64-linux

Asm reports Built build/riscv64-linux/app.

  1. Build its assembly test without execution.
asm test --target riscv64-linux --no-run

Native run and test commands execute only the host target. Use the target instructions for deliberate execution through QEMU or a matching machine. Windows and Intel macOS implementations use direct build commands.

Callable interfaces

Include the selected targets/<target>/src/min.s once in each linked program. Assembly include paths resolve from the project root. Independent consumers must retain the MIT license when they copy source. Historical published versions retain their original source paths.

TargetInputsResultInstructions
Linux x86-64, System V AMD64rdi, rsiraxx86_64-linux
Linux AArch64, AAPCS64x0, x1x0aarch64-linux
Linux RISC-V64, RV64I/LP64a0, a1a0riscv64-linux
Apple Silicon macOS, Apple arm64x0, x1x0aarch64-macos
Intel macOS, System V AMD64rdi, rsiraxx86_64-macos
Windows x86-64, Microsoft x64rcx, rdxraxx86_64-windows
Windows AArch64, Microsoft ARM64x0, x1x0aarch64-windows

macOS assembly uses _asm_u64_min as its symbol name. The other targets use asm_u64_min. An object for one target is not interchangeable with another target's object.

Qualification and license

From the repository root, run the package checks:

python3 -m unittest discover -s tests/packages -p 'test_math_*.py' -v
python3 -m unittest discover -s tests/packages -p test_macos_reference_io.py -v

The tests preserve unsigned-boundary, register, stack, and output-failure checks for each applicable target. Missing tools or runtimes produce explicit skips. Cross-assembly, emulated execution, and native execution establish separate results. Detailed target instructions retain the earlier evidence and its limits. The retained RISC-V digests describe the source before this relocation.

The implementations come from repository commit 48bc44d5490b332dfa87fa60ffa91296d9423cbe. Only project-relative assembly include paths changed. The root manifest declares version 0.6.0. Its source archive contains all seven implementations. The registry artifact remains declared for Linux x86-64 only. Earlier published versions, records, and qualification digests remain unchanged.

The project license is MIT. See LICENSE.

Files

1 release files shown.

Source archive

math-0.6.0-x86_64-linux-source.tar.gz
Architecture
x86-64 (x86_64)
Target
x86_64-linux
Format
source
Size
23495 bytes

SHA-2564d41475059a5a42d3c28b9994acd2008c387e894e423ae11d6dc466b296c8d0b

Download source archive

Fetch this file
asm fetch stubbi/math@0.6.0 --target x86_64-linux --kind source

Declared dependencies

No package dependencies declared.

No feature options declared.

Direct declarations from this checked source archive. They do not describe resolved transitive dependencies or executable contents.

Release evidence

Metadata
Validated
Artifacts
Validated
Provenance
Not run
Formal proof
Not run
Agent review
Not run

A digest identifies bytes. A matching digest does not establish publisher identity or general software safety.

The registry record does not declare ABI or required CPU features. Read package documentation.

Versions

Download activity

stubbi/math@0.6.0 · Exact version · Asm completed transfers

Download activity is unavailable. Missing observations do not establish zero downloads.

These observations are stale. The latest activity may be missing.

Transfers do not measure people, installations, suitability, or safety. Unreported delivery sources are outside this metric.