mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Yul: Fix cleanup for left shift of bytes types.
This commit is contained in:
parent
2d5b9036c2
commit
0112fed73b
@ -445,7 +445,7 @@ string YulUtilFunctions::typedShiftLeftFunction(Type const& _type, Type const& _
|
|||||||
Whiskers(R"(
|
Whiskers(R"(
|
||||||
function <functionName>(value, bits) -> result {
|
function <functionName>(value, bits) -> result {
|
||||||
bits := <cleanAmount>(bits)
|
bits := <cleanAmount>(bits)
|
||||||
result := <cleanup>(<shift>(bits, value))
|
result := <cleanup>(<shift>(bits, <cleanup>(value)))
|
||||||
}
|
}
|
||||||
)")
|
)")
|
||||||
("functionName", functionName)
|
("functionName", functionName)
|
||||||
|
@ -13,8 +13,8 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ====
|
// ====
|
||||||
// compileViaYul: true
|
|
||||||
// compileToEwasm: also
|
// compileToEwasm: also
|
||||||
|
// compileViaYul: true
|
||||||
// ----
|
// ----
|
||||||
// l(uint8): 64 -> 0x3930313233343536373839306162636465000000000000000000000000000000
|
// l(uint8): 64 -> 0x3930313233343536373839300000000000000000000000000000000000000000
|
||||||
// r(uint8): 64 -> 0x313233343536373839303132000000000000000000000000
|
// r(uint8): 64 -> 0x313233343536373839303132000000000000000000000000
|
||||||
|
Loading…
Reference in New Issue
Block a user