From 00d97d5d5c83903464efec74388d9f107b9a57c4 Mon Sep 17 00:00:00 2001 From: krlosMata Date: Wed, 25 Jan 2023 16:35:22 +0100 Subject: [PATCH] remove duplicate stack overflow --- main/opcodes/stack-operations.zkasm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/opcodes/stack-operations.zkasm b/main/opcodes/stack-operations.zkasm index 9741b1d3..c0006c00 100644 --- a/main/opcodes/stack-operations.zkasm +++ b/main/opcodes/stack-operations.zkasm @@ -233,10 +233,10 @@ opDUP1: GAS - %GAS_FASTEST_STEP => GAS :JMPN(outOfGas) $ => A :MLOAD(SP-1); [value => A] - ; check stack overflow - %CALLDATA_OFFSET - SP :JMPN(stackOverflow) + ; store duplicated value A :MSTORE(SP++); [duplicated_value(A) => SP] + ; check stack overflow %CALLDATA_OFFSET - SP :JMPN(stackOverflow, readCode)