Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/evmone/advanced_instructions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const Instruction* op_jumpi(const Instruction* instr, AdvancedExecutionState& st

const Instruction* op_pc(const Instruction* instr, AdvancedExecutionState& state) noexcept
{
state.stack.push(instr->arg.number);
state.stack.push(static_cast<uint64_t>(instr->arg.number));
return ++instr;
}

Expand Down
6 changes: 5 additions & 1 deletion lib/evmone/instructions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class StackTop

/// Assigns the value to the stack top and moves the stack top pointer up.
void push(const uint256& value) noexcept { *m_end++ = value; }

/// Pushes a 64-bit value without a uint256 temporary,
/// which GCC 15 and 16 build on the stack and copy.
void push(uint64_t value) noexcept { *m_end++ = value; }
};


Expand Down Expand Up @@ -844,7 +848,7 @@ inline void msize(StackTop stack, ExecutionState& state) noexcept

inline Result gas(StackTop stack, int64_t gas_left, ExecutionState& /*state*/) noexcept
{
stack.push(gas_left);
stack.push(static_cast<uint64_t>(gas_left));
return {EVMC_SUCCESS, gas_left};
}

Expand Down
Loading