Skip to content

Conversation

@snissn
Copy link
Contributor

@snissn snissn commented Jan 21, 2026

Abstract

This PR proposes implementing Ethereum’s EIP-7939 in the FEVM by introducing a new opcode, CLZ (0x1e). The opcode pops one 256-bit stack word x and pushes the number of leading zero bits in x (0–256). If x == 0, it pushes 256. This change improves Ethereum compatibility (EIP-7939 is activated on Ethereum mainnet in the Fusaka upgrade) and enables cheaper and simpler implementations of common bit-operations in FEVM smart contracts.

Discussion

Implementation

Notes

  • Draft: FIPS/fip-draft_eip-7939-clz.md (no number assigned; README row uses XXXX).

@rvagg
Copy link
Member

rvagg commented Jan 21, 2026

@snissn similar to #1228, this is uncontroversial I think because Fusaka has already shipped. So let's assign FIP number 0114 to this one - update filename, frontmatter and README.

@lanzafame
Copy link
Contributor

My approval assumes the edits @rvagg has put forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants