Minor test adjustments.

This commit is contained in:
Daniel Kirchner 2022-12-21 23:07:27 +01:00
parent 6a655bb0dd
commit 1f0f77aa95
3 changed files with 13 additions and 9 deletions

View File

@ -1042,6 +1042,7 @@ jobs:
environment: environment:
EVM: "shanghai" EVM: "shanghai"
SOLTEST_FLAGS: "--eof-version 1" SOLTEST_FLAGS: "--eof-version 1"
BOOST_TEST_ARGS: "-t sem*"
steps: steps:
- run: - run:
name: Build evmone based on EOF branch name: Build evmone based on EOF branch

View File

@ -17,7 +17,7 @@ contract C {
// EVMVersion: >=byzantium // EVMVersion: >=byzantium
// ---- // ----
// constructor(), 20 wei // constructor(), 20 wei
// gas irOptimized: 184005 // gas irOptimized: 179697
// gas legacy: 294335 // gas legacy: 294335
// gas legacyOptimized: 173427 // gas legacyOptimized: 173427
// f(uint256): 20 -> 0x137aa4dfc0911524504fcd4d98501f179bc13b4a // f(uint256): 20 -> 0x137aa4dfc0911524504fcd4d98501f179bc13b4a

View File

@ -10,6 +10,7 @@ function adjustContractCodeForArgSize(bytes memory x, uint16 argSize)
{ {
assembly { assembly {
let memPos := add(x, 32) let memPos := add(x, 32)
if eq(shr(232, mload(memPos)), 0xef0001) {
let numCodeSections := shr(240, mload(add(memPos, 7))) let numCodeSections := shr(240, mload(add(memPos, 7)))
let dataSectionSizeOffset := add(memPos, add(10, mul(numCodeSections, 2))) let dataSectionSizeOffset := add(memPos, add(10, mul(numCodeSections, 2)))
let tmp := mload(dataSectionSizeOffset) let tmp := mload(dataSectionSizeOffset)
@ -19,6 +20,7 @@ function adjustContractCodeForArgSize(bytes memory x, uint16 argSize)
mstore(dataSectionSizeOffset, or(shr(16, shl(16, tmp)), shl(240, dataSectionSize))) mstore(dataSectionSizeOffset, or(shr(16, shl(16, tmp)), shl(240, dataSectionSize)))
} }
} }
}
contract C { contract C {
function createDSalted(bytes32 salt, uint arg) public { function createDSalted(bytes32 salt, uint arg) public {
@ -43,4 +45,5 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// createDSalted(bytes32,uint256): 42, 64 -> // createDSalted(bytes32,uint256): 42, 64 ->
// gas legacy: 104365 // gas irOptimized: 100021
// gas legacy: 104455