SShortSingh.
Back to feed

Developer builds x86-64 JIT compiler to run scalar loops directly in native machine code

0
·1 views

A developer working on V.E.L.O.C.I.T.Y.-OS, a bare-metal operating system project, has detailed Part 6 of a 12-part build series focused on compiling scalar code directly into raw x86-64 machine instructions at runtime. The motivation was to eliminate closure dispatch overhead that slowed down simple scalar loops, even as vector operations were already outperforming native Rust. The implementation introduces a scalar detector that identifies eligible AST blocks and an x86-64 emitter that writes machine code bytes into executable memory pages. Variable slots are mapped directly to preserved CPU registers R12 through R15, with support capped at four scalar variables per compiled block. The broader project aims to build a self-healing OS running entirely within the CPU's L3 cache, with future parts covering classic compiler passes, Ring 0 kernel transition, and bare-metal driver development.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Standard AI Agent Monitoring Scores Are Misleading, New Benchmark Reveals

A developer building a benchmark for AI agent monitoring found that the standard scoring method is easily gamed, with a random coin flip achieving an F1 score of 0.88 under conventional evaluation. The flaw stems from rewarding early detections on normal steps, making trigger-happy monitors appear highly accurate. After revising the metric to count only the first detection on an actual drift step as a true positive, the coin flip score dropped to 0.19, exposing how poorly existing monitors perform. A new dataset of 513 trajectories — covering five hidden drift types including tool-call misuse and goal shift — was created to test monitors against complete, labeled agent runs. Results showed that even the best-performing verifier missed 87.2% of adversarial traces, suggesting current AI agent monitors are far less reliable than standard benchmarks imply.

0
ProgrammingDEV Community ·

Dev Builds Bare-Metal GUI for Custom OS Using UEFI Framebuffer and Double Buffering

A developer working on V.E.L.O.C.I.T.Y.-OS, a bare-metal operating system designed to run inside a CPU's L3 cache, has implemented a graphical user interface after previously relying solely on a text-based serial terminal. The new GUI layer, called Synaptic Canvas, is built on top of the UEFI Graphics Output Protocol framebuffer and uses a double-buffering technique to eliminate screen flicker. Three swappable interface modes were created, including a glassmorphic shell overlay, a Matrix-style rain animation, and a spatial node-based workspace where files and execution blocks appear as floating interactive objects on a 2D plane. All three interfaces are implemented in Rust's no_std environment, meaning they operate without standard float libraries. This marks Part 10 of a planned 12-part series, with upcoming installments set to cover multi-agent scheduling and eventual self-optimization via a local language model.

0
ProgrammingDEV Community ·

The Number 1 Is the Universal Tipping Point for Epidemics, Brains, and Reactors

A single mathematical threshold — the number one — governs whether vastly different systems grow or collapse, from nuclear chain reactions to disease outbreaks to self-sustaining chemical networks. The concept originates from branching process theory, first formalized by Galton and Watson in the 1870s to study the extinction of family surnames. In epidemiology, this threshold appears as R₀, the average number of people each infected person passes a disease to, with an outbreak growing only when R₀ exceeds one. The same logic explains why random networks suddenly form a single connected web once each node averages more than one link, a phenomenon proved by Erdős and Rényi in 1960. Across physics, biology, and chemistry, the behavior of complex systems pivots sharply on whether this average sits just above or just below one.

0
ProgrammingDEV Community ·

How Crypto Scam Site crookcrypto.xyz Drained Users of Nearly $2,900

A fraudulent platform called crookcrypto.xyz has been identified as a crypto scam that deceived at least one user out of $2,890.35 by posing as a legitimate decentralized finance utility. The site mimicked professional crypto exchange interfaces, complete with live-looking charts and dashboards, to build false trust with visitors. When users connected their wallets, they unknowingly signed malicious smart contracts that either granted the scammers full token access or immediately drained their funds. Victims attempting to withdraw were then pressured into paying fabricated 'verification fees' or 'taxes' in a repeating cycle designed to extract more money. Because blockchain transactions are irreversible and funds are quickly routed through mixing services, recovery is extremely difficult once the scam is complete.

Developer builds x86-64 JIT compiler to run scalar loops directly in native machine code · ShortSingh