Datasets:
task_name stringlengths 3 18 | source_code stringlengths 217 74k | x86 stringlengths 1.07k 266k | arm_linux stringlengths 1.12k 270k | riscv stringlengths 1.31k 272k | arm_apple stringlengths 936 266k |
|---|---|---|---|---|---|
ackermann | /* Ackermann.c: calculate the Ackermann function (as far as that is possible),
* and discuss its properties.
Compile: cc -o ackermann ackermann.c
( Use the flag -D_SHORT_STRINGS if your compiler cannot handle multiline
strings.)
For usage information, give the command ackermann -h or see USAGE define... | .text
.intel_syntax noprefix
.file "ackermann.c"
.globl ack # -- Begin function ack
.p2align 4, 0x90
.type ack,@function
ack: # @ack
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register ... | .text
.file "ackermann.c"
.globl ack // -- Begin function ack
.p2align 2
.type ack,@function
ack: // @ack
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] // 16-byte Folded Spill
add x29, sp, #16
... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "ackermann.c"
.globl ack # -- Begin function ack
.p2align 1
.type ack,@function
ack: # @ack
.cfi_startproc
# %bb.0:
addi sp, sp, -32
.cfi_def_cfa_o... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _ack ; -- Begin function ack
.p2align 2
_ack: ; @ack
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Folded Spill
add x29, sp, #3... |
aes | #include "libmin.h"
#define BLK_SIZE 16
#define ROUNDS 10
uint8_t sbox[256] = {
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b,
0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26,
0x36, ... | .text
.intel_syntax noprefix
.file "aes.c"
.globl add_round_key # -- Begin function add_round_key
.p2align 4, 0x90
.type add_round_key,@function
add_round_key: # @add_round_key
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp... | .text
.file "aes.c"
.globl add_round_key // -- Begin function add_round_key
.p2align 2
.type add_round_key,@function
add_round_key: // @add_round_key
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str x1, [sp, #16]
str wzr, [sp, #1... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "aes.c"
.globl add_round_key # -- Begin function add_round_key
.p2align 1
.type add_round_key,@function
add_round_key: # @add_round_key
.cfi_startproc
# %bb.0:
addi sp,... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _add_round_key ; -- Begin function add_round_key
.p2align 2
_add_round_key: ; @add_round_key
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str x1, [sp,... |
anagram | "/*\n * Anagram program by Raymond Chen,\n * inspired by a similar program by Brian Scearce\n *\n (...TRUNCATED) | "\t.text\n\t.intel_syntax noprefix\n\t.file\t\"anagram.c\"\n\t.globl\tFatal (...TRUNCATED) | "\t.text\n\t.file\t\"anagram.c\"\n\t.globl\tFatal // -- Begin function Fat(...TRUNCATED) | "\t.text\n\t.attribute\t4, 16\n\t.attribute\t5, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifence(...TRUNCATED) | "\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 15, 0\n\t.globl\t_Fata(...TRUNCATED) |
audio-codec | "/**\n * @file\n * @author [sunzhenliang](https://github.com/HiSunzhenliang)\n * @brief A-law algori(...TRUNCATED) | "\t.text\n\t.intel_syntax noprefix\n\t.file\t\"audio-codec.c\"\n\t.globl\tencode (...TRUNCATED) | "\t.text\n\t.file\t\"audio-codec.c\"\n\t.globl\tencode // -- Begin function(...TRUNCATED) | "\t.text\n\t.attribute\t4, 16\n\t.attribute\t5, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifence(...TRUNCATED) | "\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 15, 0\n\t.globl\t_enco(...TRUNCATED) |
avl-tree | "/* A balanced binary search tree(AVLTree) implementation\n * Written by Coleman\n * Released under (...TRUNCATED) | "\t.text\n\t.intel_syntax noprefix\n\t.file\t\"avl-tree.c\"\n\t.globl\tprintTree (...TRUNCATED) | "\t.text\n\t.file\t\"avl-tree.c\"\n\t.globl\tprintTree // -- Begin function pr(...TRUNCATED) | "\t.text\n\t.attribute\t4, 16\n\t.attribute\t5, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifence(...TRUNCATED) | "\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 15, 0\n\t.globl\t_prin(...TRUNCATED) |
banner | "/*\n * Copyright (c) 1980, 1993, 1994\n *\tThe Regents of the University of California. All rights(...TRUNCATED) | "\t.text\n\t.intel_syntax noprefix\n\t.file\t\"banner.c\"\n\t.globl\tmain (...TRUNCATED) | "\t.text\n\t.file\t\"banner.c\"\n\t.globl\tmain // -- Begin function main(...TRUNCATED) | "\t.text\n\t.attribute\t4, 16\n\t.attribute\t5, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifence(...TRUNCATED) | "\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 15, 0\n\t.globl\t_main(...TRUNCATED) |
bit-kernels | "#include \"libmin.h\"\n\n#define NUM_ELEMENTS 100 // Total numbers to test\n#define TABLE_SIZE 25(...TRUNCATED) | "\t.text\n\t.intel_syntax noprefix\n\t.file\t\"bit-kernels.c\"\n\t.globl\tcount_bits_naive (...TRUNCATED) | "\t.text\n\t.file\t\"bit-kernels.c\"\n\t.globl\tcount_bits_naive // -- Begin function(...TRUNCATED) | "\t.text\n\t.attribute\t4, 16\n\t.attribute\t5, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifence(...TRUNCATED) | "\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 15, 0\n\t.globl\t_coun(...TRUNCATED) |
blake2b | "/**\n * @addtogroup hash Hash algorithms\n * @{\n * @file\n * @author [Daniel Murrow](https://githu(...TRUNCATED) | "\t.text\n\t.intel_syntax noprefix\n\t.file\t\"blake2b.c\"\n\t.globl\tblake2b (...TRUNCATED) | "\t.text\n\t.file\t\"blake2b.c\"\n\t.globl\tblake2b // -- Begin function bla(...TRUNCATED) | "\t.text\n\t.attribute\t4, 16\n\t.attribute\t5, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifence(...TRUNCATED) | "\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 15, 0\n\t.globl\t_blak(...TRUNCATED) |
bloom-filter | "#include \"libmin.h\"\n#include \"tinybloom.h\"\n\n#define NUM_ITEMS 512 /* 2048 */\n#define NUM_BU(...TRUNCATED) | "\t.text\n\t.intel_syntax noprefix\n\t.file\t\"bloom-filter.c\"\n\t.globl\tbad_search (...TRUNCATED) | "\t.text\n\t.file\t\"bloom-filter.c\"\n\t.globl\tbad_search // -- Begin functio(...TRUNCATED) | "\t.text\n\t.attribute\t4, 16\n\t.attribute\t5, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifence(...TRUNCATED) | "\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 15, 0\n\t.globl\t_bad_(...TRUNCATED) |
boyer-moore-search | "/* C Program for Bad Character Heuristic of Boyer\nMoore String Matching Algorithm */\n// SOURCE: h(...TRUNCATED) | "\t.text\n\t.intel_syntax noprefix\n\t.file\t\"boyer-moore-search.c\"\n\t.globl\tbadCharHeuristic (...TRUNCATED) | "\t.text\n\t.file\t\"boyer-moore-search.c\"\n\t.globl\tbadCharHeuristic // -- Begin f(...TRUNCATED) | "\t.text\n\t.attribute\t4, 16\n\t.attribute\t5, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifence(...TRUNCATED) | "\t.section\t__TEXT,__text,regular,pure_instructions\n\t.build_version macos, 15, 0\n\t.globl\t_badC(...TRUNCATED) |
BringUpBench C and Assembly
This dataset pairs C programs from BringUpBench 1.9 with assembly generated by Clang 17 for four CPU targets and seven optimization levels. It is intended for research on compilation, decompilation, assembly understanding, and cross-architecture code translation.
Dataset structure
The dataset contains 108 programs. Each optimization level is stored as a separate Hugging Face split, with 108 rows per split.
These are compiler configurations, not predefined training, validation, or test sets. The same 108 tasks appear in every split, so users should split by task_name before training to avoid data leakage across optimization levels.
Each row has the following fields:
| Field | Description |
|---|---|
task_name |
BringUpBench program name |
source_code |
C source code from the program's primary translation unit |
x86 |
x86-64 Linux assembly in Intel syntax |
arm_linux |
AArch64 Linux assembly |
riscv |
RISC-V RV64GC Linux assembly using the LP64D ABI |
arm_apple |
AArch64 Apple Darwin assembly |
Usage
Load every optimization level:
from datasets import load_dataset
dataset = load_dataset("murodbek/bringup_asm")
print(dataset)
example = dataset["O2"][0]
print(example)
Load only one optimization level:
from datasets import load_dataset
dataset = load_dataset("murodbek/bringup_asm", split="O2")
Dataset creation
For each BringUpBench program, the primary source file (<task_name>/<task_name>.c) was compiled to assembly with Clang 17. BringUpBench headers were made available during compilation, and TARGET_HOST and TARGET_PERFHOOKS were defined.
The architecture-specific compiler options were:
x86: -target x86_64-unknown-linux-gnu -masm=intel
arm_linux: -target aarch64-linux-gnu
riscv: -target riscv64-unknown-linux-gnu -march=rv64gc -mabi=lp64d
arm_apple: -target arm64-apple-darwin
Linux-targeted and Apple-targeted outputs were generated separately, joined on task_name and source_code, and sorted by task name.
Important notes
source_codecontains the primary C translation unit, not every header or support file used by the original benchmark.- The assembly may reference BringUpBench runtime functions or external symbols. A row is therefore not necessarily a standalone, linkable program by itself.
- Results represent one compiler family and version: Clang 17. Assembly produced by other compilers or versions may differ substantially.
- Architecture columns should not be assumed to have identical instruction-by-instruction behavior or formatting, even though they originate from the same C source.
- Because the same programs occur at every optimization level, random row-level splitting across the full dataset can leak the same source program into both training and evaluation sets.
Source and license
The source programs come from toddmaustin/bringup-bench, version 1.9. BringUpBench states that portions developed by its benchmark team are copyright 2021–2024 and distributed under the Apache License 2.0. Some programs were adapted from other projects; users should retain and review any notices associated with those individual sources.
If you use this dataset, please also credit the original BringUpBench project and its contributors.
- Downloads last month
- 30