diff --git a/evm/src/cpu/kernel/asm/core/precompiles/rip160.asm b/evm/src/cpu/kernel/asm/core/precompiles/rip160.asm index 8444088c..31cf8da1 100644 --- a/evm/src/cpu/kernel/asm/core/precompiles/rip160.asm +++ b/evm/src/cpu/kernel/asm/core/precompiles/rip160.asm @@ -27,7 +27,7 @@ global precompile_rip160: // // %stack (ctx, size) -> // ( - // 0, @SEGMENT_KERNEL_GENERAL, 200, // DST + // ctx, @SEGMENT_KERNEL_GENERAL, 200, // DST // ctx, @SEGMENT_CALLDATA, 0, // SRC // size, ripemd, // count, retdest // 200, size, rip160_contd // ripemd input: virt, num_bytes, retdest @@ -42,7 +42,7 @@ global precompile_rip160: SWAP6 PUSH 200 PUSH @SEGMENT_KERNEL_GENERAL - PUSH 0 + DUP3 %jump(memcpy) diff --git a/evm/src/cpu/kernel/asm/core/precompiles/sha256.asm b/evm/src/cpu/kernel/asm/core/precompiles/sha256.asm index 61be27fc..8cdb8fee 100644 --- a/evm/src/cpu/kernel/asm/core/precompiles/sha256.asm +++ b/evm/src/cpu/kernel/asm/core/precompiles/sha256.asm @@ -31,7 +31,7 @@ global precompile_sha256: // // %stack (ctx, size) -> // ( - // 0, @SEGMENT_KERNEL_GENERAL, 1, // DST + // ctx, @SEGMENT_KERNEL_GENERAL, 1, // DST // ctx, @SEGMENT_CALLDATA, 0, // SRC // size, sha2, // count, retdest // 0, size, sha256_contd // sha2 input: virt, num_bytes, retdest @@ -47,7 +47,7 @@ global precompile_sha256: SWAP6 PUSH 1 PUSH @SEGMENT_KERNEL_GENERAL - PUSH 0 + DUP3 %jump(memcpy)