Repository navigation
Add std::native::sha256_compress - #1977
Merged
Merged
Conversation
sbillig
force-pushed
the
feat/native-sha256-compress
branch
from
November 10, 2026 19:00
ca56a92 to
835b889
Compare
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Takes fe-lang/sonatina#506 through argotorg#528: cold functions, native `sha256_compress`, jump threading on dominating conditions, `select` and if-conversion, unrolling of loops with constant trip counts, and native codegen work (padding and inactive payloads left unwritten, aggregates built in place, local object copies coalesced, carry chains through carry-in ops, i256 limb folds, division, overflow fusion, SP1 functions kept at four-byte alignment). The Cranelift fork pin moves to fe-lang/wasmtime b7772dbce. No snapshot changes.
sha256_compress(state, block) is one SHA-256 compression: the eight state words after the 64 rounds of sixteen message words, read big-endian. It lowers to Sonatina's native sha256_compress, which uses the x86-64 SHA extensions on a host that has them. The EVM has no such instruction, so it is a native-only builtin.
sbillig
force-pushed
the
feat/native-sha256-compress
branch
from
November 10, 2026 20:06
835b889 to
7b4c44e
Compare
sbillig
added a commit
to fe-lang/fevm
that referenced
this pull request
Nov 10, 2026
The SHA-256 precompile compresses each block with `std::native::sha256_compress`, which argotorg/fe#1977 adds along with Sonatina 2547f707. Pin that commit, its Cargo.lock and its Sonatina revision.
sbillig
added a commit
to fe-lang/fevm
that referenced
this pull request
Nov 10, 2026
The SHA-256 precompile compresses each block with `std::native::sha256_compress`, which argotorg/fe#1977 added along with Sonatina 2547f707. Pin Fe master 4608e5fdf, its Cargo.lock and its Sonatina revision.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates Sonatina to 2547f707 (fe-lang/sonatina#506 through #528, mostly native code generation; no snapshot changes), with the Cranelift fork pin at fe-lang/wasmtime b7772dbce.
Adds
std::native::sha256_compress(state, block): one SHA-256 compression,stateafter the 64 rounds over sixteen message words. It lowers to Sonatina's nativesha256_compress, which uses the x86-64 SHA extensions on a host that has them and scalar rounds elsewhere. The EVM has no such instruction, so it is native-only.fevm's SHA-256 precompile uses it.