Command-line tests checking behavior of msize without optimizer

This commit is contained in:
Kamil Śliwak
2023-06-07 12:12:00 +02:00
parent 7ab730d410
commit 8e35e8dd8e
9 changed files with 365 additions and 0 deletions
@@ -0,0 +1 @@
--strict-assembly --debug-info none
@@ -0,0 +1,13 @@
{
function f() -> x {
x := mload(0)
}
// In pure Yul without optimizer presence of msize disables stack optimization.
// This file should remain untouched when passed through the optimizer.
pop(msize())
let x := 0
let y := x
mstore(0, f())
}
@@ -0,0 +1,40 @@
======= strict_asm_msize_without_optimizer/input.yul (EVM) =======
Pretty printed source:
object "object" {
code {
function f() -> x
{ x := mload(0) }
pop(msize())
let x := 0
let y := x
mstore(0, f())
}
}
Binary representation:
600b565b5f8051905090565b5f8060136003565b5f525050
Text representation:
jump(tag_2)
tag_1:
0x00
dup1
mload
swap1
pop
swap1
jump // out
tag_2:
0x00
dup1
tag_4
tag_1
jump // in
tag_4:
0x00
mstore
pop
pop