From 46d9cee09dd3906f79799b692d481b236eb2d25b Mon Sep 17 00:00:00 2001 From: Nicholas Ward Date: Tue, 25 Apr 2023 14:58:43 -0700 Subject: [PATCH] charge gas! --- evm/src/cpu/kernel/asm/core/precompiles/blake2_f.asm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/evm/src/cpu/kernel/asm/core/precompiles/blake2_f.asm b/evm/src/cpu/kernel/asm/core/precompiles/blake2_f.asm index 16786bcd..1716e7e8 100644 --- a/evm/src/cpu/kernel/asm/core/precompiles/blake2_f.asm +++ b/evm/src/cpu/kernel/asm/core/precompiles/blake2_f.asm @@ -10,8 +10,6 @@ global precompile_blake2_f: // get various inputs out of SEGMENT_CALLDATA - // charge gas (based on rounds) - PUSH blake2_f_contd // stack: blake2_f_contd, kexit_info @@ -102,6 +100,12 @@ global precompile_blake2_f: GET_CONTEXT // stack: ctx, @SEGMENT_CALLDATA, 0, 4, h_7..h_0, m_15..m_0, t_0, t_1, flag, blake2_f_contd, kexit_info %mload_packing + // stack: rounds, h_7..h_0, m_15..m_0, t_0, t_1, flag, blake2_f_contd, kexit_info + + DUP1 + // stack: rounds, rounds, h_7..h_0, m_15..m_0, t_0, t_1, flag, blake2_f_contd, kexit_info + %charge_gas + // stack: rounds, h_7..h_0, m_15..m_0, t_0, t_1, flag, blake2_f_contd, kexit_info %jump(blake2_f) blake2_f_contd: