CoolFace
Datasetpublic

murodbek/mceval_asm

McEval-C and Assembly This dataset pairs the C-language tasks from McEval 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 50 programs. Each optimization level is stored as a separate Hugging Face split, with 50 rows per split. These are compiler configurations, not… See the full description on the dataset page: https://huggingface.co/datasets/murodbek/mceval_asm.

sourceHugging Facecc-by-sa-4.0updated 24d agoView on Hugging Face
0likes54downloads
Dataset Card

McEval-C and Assembly

This dataset pairs the C-language tasks from McEval 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 50 programs. Each optimization level is stored as a separate Hugging Face split, with 50 rows per split.

These are compiler configurations, not predefined training, validation, or test sets. The same 50 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:

FieldDescription
task_nameMcEval-C task identifier
source_codeC implementation for the task
x86x86-64 Linux assembly in Intel syntax
arm_linuxAArch64 Linux assembly
riscvRISC-V RV64GC Linux assembly using the LP64D ABI
arm_appleAArch64 Apple Darwin assembly

Usage

Load every optimization level:

python
from datasets import load_dataset

dataset = load_dataset("murodbek/mceval_asm")
print(dataset)

example = dataset["O2"][0]
print(example)

Load only one optimization level:

python
from datasets import load_dataset

dataset = load_dataset("murodbek/mceval_asm", split="O2")

Dataset creation

The C subset was extracted from McEval. For each task, code.c was compiled to assembly with Clang 17.

The architecture-specific compiler options were:

text
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_code contains the task implementation. The separate test harness used to check functional correctness is not included in each row.
  • The assembly may reference C standard library or math library functions and is 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 are the C-language subset of McEval: Massively Multilingual Code Evaluation. McEval data is distributed under the Creative Commons Attribution-ShareAlike 4.0 International license.

If you use this dataset, please also cite the original McEval work and credit its authors.