mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-08 08:43:06 +00:00
Merge pull request #1316 from topos-protocol/memcpy_tiny
Move empty check inside final iteration of memcpy_bytes
This commit is contained in:
commit
0f299d4c2e
@ -52,15 +52,6 @@ global memcpy:
|
|||||||
global memcpy_bytes:
|
global memcpy_bytes:
|
||||||
// stack: DST, SRC, count, retdest
|
// stack: DST, SRC, count, retdest
|
||||||
|
|
||||||
// Handle empty case
|
|
||||||
DUP7
|
|
||||||
// stack: count, DST, SRC, count, retdest
|
|
||||||
ISZERO
|
|
||||||
// stack: count == 0, DST, SRC, count, retdest
|
|
||||||
%jumpi(memcpy_finish)
|
|
||||||
|
|
||||||
// stack: DST, SRC, count, retdest
|
|
||||||
|
|
||||||
// Handle small case
|
// Handle small case
|
||||||
DUP7
|
DUP7
|
||||||
// stack: count, DST, SRC, count, retdest
|
// stack: count, DST, SRC, count, retdest
|
||||||
@ -104,6 +95,15 @@ global memcpy_bytes:
|
|||||||
memcpy_bytes_finish:
|
memcpy_bytes_finish:
|
||||||
// stack: DST, SRC, count, retdest
|
// stack: DST, SRC, count, retdest
|
||||||
|
|
||||||
|
// Handle empty case
|
||||||
|
DUP7
|
||||||
|
// stack: count, DST, SRC, count, retdest
|
||||||
|
ISZERO
|
||||||
|
// stack: count == 0, DST, SRC, count, retdest
|
||||||
|
%jumpi(memcpy_finish)
|
||||||
|
|
||||||
|
// stack: DST, SRC, count, retdest
|
||||||
|
|
||||||
// Copy the last chunk of `count` bytes.
|
// Copy the last chunk of `count` bytes.
|
||||||
DUP7
|
DUP7
|
||||||
DUP1
|
DUP1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user