solidity/test/libyul/ewasmTranslationTests/arithmetic_addmod.yul

26 lines
1.3 KiB
Plaintext
Raw Normal View History

{
sstore(0, addmod(0, 1, 1))
sstore(1, addmod(0, 1, 2))
sstore(2, addmod(3, 1, 2))
sstore(3, addmod(1, not(0), 5))
sstore(4, addmod(0, 0, 0))
sstore(5, addmod(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, 1, 1))
sstore(6, addmod(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, 1, 0))
sstore(7, addmod(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd, 1, 5))
sstore(8, addmod(
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,
0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe,
5
))
}
// ----
// Trace:
// Memory dump:
// 0: 0000000000000000000000000000000000000000000000000000000000000008
// 20: 0000000000000000000000000000000000000000000000000000000000000004
// Storage dump:
// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000001
// 0000000000000000000000000000000000000000000000000000000000000003: 0000000000000000000000000000000000000000000000000000000000000001
// 0000000000000000000000000000000000000000000000000000000000000007: 0000000000000000000000000000000000000000000000000000000000000004
// 0000000000000000000000000000000000000000000000000000000000000008: 0000000000000000000000000000000000000000000000000000000000000004