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.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurehigh impactChanges are very prominent and affect users or the project in a major way.low effortThere is not much implementation work to be done. The task is very easy or tiny.must haveSomething we consider an essential part of Solidity 1.0.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions