mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-13 08:21:09 +00:00
Support solc v0.8.31 (#430)
- Support for solc v0.8.31. - Support for the `clz` Yul builtin. --------- Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -348,6 +348,14 @@ impl FunctionCall {
|
||||
)
|
||||
.map(Some)
|
||||
}
|
||||
Name::Clz => {
|
||||
let arguments = self.pop_arguments_llvm::<1>(context)?;
|
||||
revive_llvm_context::polkavm_evm_bitwise::count_leading_zeros(
|
||||
context,
|
||||
arguments[0].into_int_value(),
|
||||
)
|
||||
.map(Some)
|
||||
}
|
||||
Name::Byte => {
|
||||
let arguments = self.pop_arguments_llvm::<2>(context)?;
|
||||
revive_llvm_context::polkavm_evm_bitwise::byte(
|
||||
|
||||
@@ -54,6 +54,8 @@ pub enum Name {
|
||||
Shr,
|
||||
/// signed arithmetic shift right `y` by `x` bits
|
||||
Sar,
|
||||
/// number of leading zero bits of x, 256 if x == 0
|
||||
Clz,
|
||||
/// `n`th byte of `x`, where the most significant byte is the `0`th byte
|
||||
Byte,
|
||||
/// discard value x
|
||||
@@ -270,6 +272,7 @@ impl From<&str> for Name {
|
||||
"shl" => Self::Shl,
|
||||
"shr" => Self::Shr,
|
||||
"sar" => Self::Sar,
|
||||
"clz" => Self::Clz,
|
||||
"byte" => Self::Byte,
|
||||
"pop" => Self::Pop,
|
||||
|
||||
@@ -393,6 +396,7 @@ impl fmt::Display for Name {
|
||||
Self::Shl => "shl",
|
||||
Self::Shr => "shr",
|
||||
Self::Sar => "sar",
|
||||
Self::Clz => "clz",
|
||||
Self::Byte => "byte",
|
||||
Self::Pop => "pop",
|
||||
|
||||
|
||||
Reference in New Issue
Block a user