mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 14:23:07 +00:00
Merge pull request #1317 from topos-protocol/more_memcpy_bytes
This commit is contained in:
commit
3ca166204a
@ -388,7 +388,7 @@ call_too_deep:
|
||||
args_size, %%after, // count, retdest
|
||||
new_ctx, args_size
|
||||
)
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
%%after:
|
||||
%stack (new_ctx, args_size) ->
|
||||
(new_ctx, @SEGMENT_CONTEXT_METADATA, @CTX_METADATA_CALLDATA_SIZE, args_size)
|
||||
@ -410,7 +410,7 @@ call_too_deep:
|
||||
n, %%after, // count, retdest
|
||||
kexit_info, success
|
||||
)
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
%%after:
|
||||
%endmacro
|
||||
|
||||
|
||||
@ -104,7 +104,7 @@ global create_common:
|
||||
code_len,
|
||||
run_constructor,
|
||||
new_ctx, value, address)
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
|
||||
run_constructor:
|
||||
// stack: new_ctx, value, address, kexit_info
|
||||
|
||||
@ -82,7 +82,7 @@ process_receipt_after_type:
|
||||
PUSH 0 PUSH @SEGMENT_TXN_BLOOM PUSH 0 // Bloom memory address.
|
||||
%get_trie_data_size PUSH @SEGMENT_TRIE_DATA PUSH 0 // MPT dest address.
|
||||
// stack: DST, SRC, 256, receipt_ptr, txn_nb, new_cum_gas, txn_nb, num_nibbles, retdest
|
||||
%memcpy
|
||||
%memcpy_bytes
|
||||
// stack: receipt_ptr, txn_nb, new_cum_gas, txn_nb, num_nibbles, retdest
|
||||
// Update trie data size.
|
||||
%get_trie_data_size
|
||||
|
||||
@ -32,7 +32,7 @@ global precompile_id:
|
||||
ctx, @SEGMENT_CALLDATA, 0, // SRC
|
||||
size, id_contd // count, retdest
|
||||
)
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
|
||||
id_contd:
|
||||
// stack: kexit_info
|
||||
|
||||
@ -59,7 +59,7 @@ global handle_precompiles_from_eoa:
|
||||
%stack (calldata_size, new_ctx) -> (calldata_size, new_ctx, calldata_size)
|
||||
%set_new_ctx_calldata_size
|
||||
%stack (new_ctx, calldata_size) -> (new_ctx, @SEGMENT_CALLDATA, 0, 0, @SEGMENT_TXN_DATA, 0, calldata_size, handle_precompiles_from_eoa_finish, new_ctx)
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
|
||||
handle_precompiles_from_eoa_finish:
|
||||
%stack (new_ctx, addr, retdest) -> (addr, new_ctx, retdest)
|
||||
|
||||
@ -47,7 +47,7 @@ global precompile_rip160:
|
||||
PUSH @SEGMENT_KERNEL_GENERAL
|
||||
DUP3
|
||||
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
|
||||
rip160_contd:
|
||||
// stack: hash, kexit_info
|
||||
|
||||
@ -49,7 +49,7 @@ global precompile_sha256:
|
||||
PUSH @SEGMENT_KERNEL_GENERAL
|
||||
DUP3
|
||||
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
|
||||
sha256_contd:
|
||||
// stack: hash, kexit_info
|
||||
|
||||
@ -163,7 +163,7 @@ global process_contract_creation_txn:
|
||||
PUSH 0 // DST.offset
|
||||
PUSH @SEGMENT_CODE // DST.segment
|
||||
DUP8 // DST.context = new_ctx
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
|
||||
global process_contract_creation_txn_after_code_loaded:
|
||||
// stack: new_ctx, address, retdest
|
||||
@ -294,7 +294,7 @@ global process_message_txn_code_loaded:
|
||||
%stack (calldata_size, new_ctx, retdest) -> (calldata_size, new_ctx, calldata_size, retdest)
|
||||
%set_new_ctx_calldata_size
|
||||
%stack (new_ctx, calldata_size, retdest) -> (new_ctx, @SEGMENT_CALLDATA, 0, 0, @SEGMENT_TXN_DATA, 0, calldata_size, process_message_txn_code_loaded_finish, new_ctx, retdest)
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
|
||||
process_message_txn_code_loaded_finish:
|
||||
%enter_new_ctx
|
||||
|
||||
@ -45,7 +45,7 @@ return_after_gas:
|
||||
ctx, @SEGMENT_MAIN_MEMORY, offset, // SRC
|
||||
size, sys_return_finish, kexit_info // count, retdest, ...
|
||||
)
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
|
||||
sys_return_finish:
|
||||
// stack: kexit_info
|
||||
@ -145,7 +145,7 @@ revert_after_gas:
|
||||
ctx, @SEGMENT_MAIN_MEMORY, offset, // SRC
|
||||
size, sys_revert_finish, kexit_info // count, retdest, ...
|
||||
)
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
|
||||
sys_revert_finish:
|
||||
%leftover_gas
|
||||
|
||||
@ -33,7 +33,7 @@ global encode_rlp_string_small:
|
||||
// stack: pos'', pos', ADDR: 3, len, retdest
|
||||
%stack (pos2, pos1, ADDR: 3, len, retdest)
|
||||
-> (0, @SEGMENT_RLP_RAW, pos1, ADDR, len, retdest, pos2)
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
|
||||
global encode_rlp_string_small_single_byte:
|
||||
// stack: pos, ADDR: 3, len, retdest
|
||||
@ -71,7 +71,7 @@ global encode_rlp_string_large_after_writing_len:
|
||||
// stack: pos''', pos'', ADDR: 3, len, retdest
|
||||
%stack (pos3, pos2, ADDR: 3, len, retdest)
|
||||
-> (0, @SEGMENT_RLP_RAW, pos2, ADDR, len, retdest, pos3)
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
|
||||
%macro encode_rlp_string
|
||||
%stack (pos, ADDR: 3, len) -> (pos, ADDR, len, %%after)
|
||||
|
||||
@ -115,7 +115,7 @@
|
||||
PUSH @SEGMENT_TXN_DATA
|
||||
GET_CONTEXT
|
||||
// stack: DST, SRC, data_len, %%after, new_pos
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
|
||||
%%after:
|
||||
// stack: new_pos
|
||||
|
||||
@ -94,7 +94,7 @@ after_serializing_txn_data:
|
||||
al_len,
|
||||
after_serializing_access_list,
|
||||
rlp_pos, rlp_start, retdest)
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
after_serializing_access_list:
|
||||
// stack: rlp_pos, rlp_start, retdest
|
||||
%mload_global_metadata(@GLOBAL_METADATA_ACCESS_LIST_RLP_LEN) ADD
|
||||
|
||||
@ -101,7 +101,7 @@ after_serializing_txn_data:
|
||||
al_len,
|
||||
after_serializing_access_list,
|
||||
rlp_pos, rlp_start, retdest)
|
||||
%jump(memcpy)
|
||||
%jump(memcpy_bytes)
|
||||
after_serializing_access_list:
|
||||
// stack: rlp_pos, rlp_start, retdest
|
||||
%mload_global_metadata(@GLOBAL_METADATA_ACCESS_LIST_RLP_LEN) ADD
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user