Lightweight Userspace Instruction Trapping and Emulation Engine for Missing Instruction Set Extensions (MOVBE, AES-NI, ADX, and BMI2) on Legacy x86 Microprocessors

Modern software compilers (such as GCC and LLVM) increasingly default to baseline architectures like x86-64-v2 that mandate hardware extensions, including Move Data After Swapping Bytes (MOVBE) and Advanced Encryption Standard New Instructions (AES-NI). On legacy processors, such as the 3rd Generation Intel Core architecture (Ivy Bridge 22nm), the physical omission of these instructions causes an Undefined Opcode (#UD) hardware exception. The Linux kernel delivers this exception as an Illegal Instruction signal (SIGILL, Signal 4), causing critical system binaries, such as the ChromeOS terminal (crosh) compiled in Rust, to terminate immediately. Conventional Dynamic Binary Translation (DBT) frameworks that rely on Just-In-Time (JIT) compilation (e.g., QEMU and Box64) incur substantial memory overhead (32 MB to 128 MB per process), making them impractical for resource-constrained systems. This paper presents a lightweight userspace instruction trapping and emulation engine implemented as a dynamic shared library (libaes_trap). By utilizing POSIX sigaction handlers with SA_SIGINFO flags and an alternate signal stack (sigaltstack), the engine intercepts SIGILL, decodes x86_64 machine code directly in user memory (including Operand-Size Prefixes, REX Prefixes, ModR/M Bytes, SIB Bytes, and displacement offsets), executes the intended semantics in software, and resumes execution seamlessly. Tested on an Intel Core i3 3110M processor (2.40 GHz) running ChromeOS M126 with Linux Kernel 6.6 LTS, the engine achieves 100% bitwise accuracy across 16-bit, 32-bit, and 64-bit operations, completely prevents SIGILL termination in crosh and Chromium WebApp renderers (YouTube, Gmail, Drive), requires approximately 1,800 CPU clock cycles (~0.75 microseconds) per trapped instruction, and consumes less than 64 KB of RAM per process without requiring application source code changes.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-30
DOI
https://doi.org/10.5281/zenodo.24688427
Primary Topic
Security and Verification in Computing
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Lightweight Userspace Instruction Trapping and Emulation Engine for Missing Instruction Set Extensions (MOVBE, AES-NI, ADX, and BMI2) on Legacy x86 Microprocessors

Mochamad Syaiful Anwar
Zenodo (CERN European Organization for Nuclear Research)
Security and Verification in Computing
preprint

Lightweight Userspace Instruction Trapping and Emulation Engine for Missing Instruction Set Extensions (MOVBE, AES-NI, ADX, and BMI2) on Legacy x86 Microprocessors

Mochamad Syaiful Anwar
preprint en

Abstract

Modern software compilers (such as GCC and LLVM) increasingly default to baseline architectures like x86-64-v2 that mandate hardware extensions, including Move Data After Swapping Bytes (MOVBE) and Advanced Encryption Standard New Instructions (AES-NI). On legacy processors, such as the 3rd Generation Intel Core architecture (Ivy Bridge 22nm), the physical omission of these instructions causes an Undefined Opcode (#UD) hardware exception. The Linux kernel delivers this exception as an Illegal Instruction signal (SIGILL, Signal 4), causing critical system binaries, such as the ChromeOS terminal (crosh) compiled in Rust, to terminate immediately. Conventional Dynamic Binary Translation (DBT) frameworks that rely on Just-In-Time (JIT) compilation (e.g., QEMU and Box64) incur substantial memory overhead (32 MB to 128 MB per process), making them impractical for resource-constrained systems. This paper presents a lightweight userspace instruction trapping and emulation engine implemented as a dynamic shared library (libaes_trap). By utilizing POSIX sigaction handlers with SA_SIGINFO flags and an alternate signal stack (sigaltstack), the engine intercepts SIGILL, decodes x86_64 machine code directly in user memory (including Operand-Size Prefixes, REX Prefixes, ModR/M Bytes, SIB Bytes, and displacement offsets), executes the intended semantics in software, and resumes execution seamlessly. Tested on an Intel Core i3 3110M processor (2.40 GHz) running ChromeOS M126 with Linux Kernel 6.6 LTS, the engine achieves 100% bitwise accuracy across 16-bit, 32-bit, and 64-bit operations, completely prevents SIGILL termination in crosh and Chromium WebApp renderers (YouTube, Gmail, Drive), requires approximately 1,800 CPU clock cycles (~0.75 microseconds) per trapped instruction, and consumes less than 64 KB of RAM per process without requiring application source code changes.

Zenodo (CERN European Organization for Nuclear Research)
Universitas Siber Asia (ID)
Security and Verification in Computing
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Lightweight Userspace Instruction Trapping and Emulation Engine for Missing Instruction Set Extensions (MOVBE, AES-NI, ADX, and BMI2) on Legacy x86 Microprocessors — Mochamad Syaiful Anwar · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS