Skip to content

Add support for EIP-7939 CLZ #16118

@Vectorized

Description

@Vectorized

Abstract

EIP-7939 (CLZ) is an opcode that is scheduled for inclusion in the Fusaka hardfork.

https://eips.ethereum.org/EIPS/eip-7607#core-eips

Motivation

Support for the CLZ opcode.

Specification

The mathematical specification is outlined in the EIP.

Minimally, expose the clz opcode in inline-assembly (and pure yul).

Optionally, expose it in regular Solidity. However, this includes the added risk of breaking existing codebases which have a clz identifier in regular Solidity namespace.

As most existing use-cases of clz are in low level inline-assembly, implementing it just for inline-assembly may suffice.

Backwards Compatibility

Existing codebases which use clz as an identifier may break.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions