mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-05 07:13:08 +00:00
Fix copy_returndata_to_mem (#976)
This commit is contained in:
parent
c7e60073f0
commit
475b2ba0cb
@ -297,12 +297,16 @@ global after_call_instruction:
|
||||
|
||||
%macro copy_returndata_to_mem
|
||||
// stack: kexit_info, new_ctx, success, ret_offset, ret_size
|
||||
SWAP4
|
||||
%returndatasize
|
||||
// stack: returndata_size, ret_size, new_ctx, success, ret_offset, kexit_info
|
||||
%min
|
||||
GET_CONTEXT
|
||||
%stack (ctx, kexit_info, new_ctx, success, ret_offset, ret_size) ->
|
||||
%stack (ctx, n, new_ctx, success, ret_offset, kexit_info) ->
|
||||
(
|
||||
ctx, @SEGMENT_MAIN_MEMORY, ret_offset, // DST
|
||||
ctx, @SEGMENT_RETURNDATA, 0, // SRC
|
||||
ret_size, %%after, // count, retdest
|
||||
n, %%after, // count, retdest
|
||||
kexit_info, success
|
||||
)
|
||||
%jump(memcpy)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user