Summary
Add the Count Leading Zeros opcode (CLZ, 0x1E). Activates with Fusaka.
Spec
Scope
- Add Fusaka hardfork + EIP-7939 flag to
EEVM.HardforkConfig.
- Implement the
CLZ opcode in the interpreter (single 256-bit input → leading-zero count, 0..256).
- Charge
G_low (5 gas).
- Gate the opcode on the flag — earlier hardforks must reject it as invalid.
Definition of Done
CLZ(0) returns 256, CLZ(1) returns 255, CLZ(2^255) returns 0.
- Fusaka CLZ StateTest fixtures pass.
Parent
Summary
Add the Count Leading Zeros opcode (
CLZ, 0x1E). Activates with Fusaka.Spec
Scope
EEVM.HardforkConfig.CLZopcode in the interpreter (single 256-bit input → leading-zero count, 0..256).G_low(5 gas).Definition of Done
CLZ(0)returns 256,CLZ(1)returns 255,CLZ(2^255)returns 0.Parent