Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
Update extensions.md (#874)
Browse files Browse the repository at this point in the history
Co-authored-by: MexicanAce <[email protected]>
  • Loading branch information
amelnytskyi and MexicanAce authored Jan 19, 2024
1 parent 76590f4 commit 6523456
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ For some simulations below we assume that there exist a hidden global pseudo-var
| to_l1(is_first, in0, in1 | if_first (bool) | 0xFFFF | in0 (u256) | in1 (u256) | 0xFFFF to prevent optimizing out by Yul | 0 | 0 | \_ | call | @llvm.syncvm.tol1(i256 %in0, i256 %in1, i256 %is_first) | Send messages to L1 |
| code_source | 0 | 0xFFFE | - | 0 | 0xFFFF to prevent optimizing out by Yul | 0 | 0 | address | staticcall | @llvm.syncvm.context(i256 %param) ; param == 2 (see SyncVM.h) | Largely to be able to catch “delegatecalls” in system contracts (by comparing this == code_source) |
| precompile(in0, ergs_to_burn, out0) | in0 (u256) | 0xFFFD | - | ergs_to_burn (u32) | 0xFFFF to prevent optimizing out by Yul | 0 | 0 | out0 | staticcall | @llvm.syncvm.precompile(i256 %in0, i256 %ergs) | way to trigger call to precompile in VM |
| meta | 0 | 0xFFFC | - | 0 | 0xFFFF to prevent optimizing out by Yul | 0 | 0 | [u256 tight packing](https://github.com/matter-labs/era-zkevm_opcode_defs/src/definitions/abi/meta.rs) | staticcall | @llvm.syncvm.context(i256 %param) ; param == 3 (see SyncVM.h) | way to trigger call to meta information about some small pieces of the state in VM |
| meta | 0 | 0xFFFC | - | 0 | 0xFFFF to prevent optimizing out by Yul | 0 | 0 | [u256 tight packing](https://github.com/matter-labs/era-zkevm_opcode_defs/blob/v1.4.1/src/definitions/abi/meta.rs) | staticcall | @llvm.syncvm.context(i256 %param) ; param == 3 (see SyncVM.h) | way to trigger call to meta information about some small pieces of the state in VM |
| mimic_call(to, abi_data, implicit r5 = who to mimic) | who_to_call | 0xFFFB | 0 | abi_data | who_to_mimic | 0 | 0 | WILL mess up the registers and WILL use r1-r4 for our standard ABI convention and r5 for the extra who_to_mimic argument | any in the code; mimic call in the bytecode | Runtime*{i256, i1} \_\_mimiccall(i256, i256, i256, *{i256, i1}) | |
| system_mimic_call(to, abi_data, implicit r3, r4, r5 = who to mimic) | who_to_call | 0xFFFA | 0 | abi_data | who_to_mimic | value_to_put_into_r3 | value_to_put_into_r4 | WILL mess up the registers and WILL use r1-r4 for our standard ABI convention and r5 for the extra who_to_mimic argument | any in the code; mimic call in the bytecode | Runtime _{i256, i1} \_\_mimiccall(i256, i256, i256,_{i256, i1}) | |
| mimic_call_byref(to, ACTIVE_PTR, implicit r5 = who to mimic) | who_to_call | 0xFFF9 | 0 | 0 | who_to_mimic | 0 | 0 | WILL mess up the registers and WILL use r1-r4 for our standard ABI convention and r5 for the extra who_to_mimic argument | any in the code; mimic call in the bytecode | Runtime *{i256, i1} \_\_mimiccall(*i8 addrspace(3), i256, i256, \*{i256, i1}) | Same as one above, but takes ABI data from ACTIVE_PTR |
Expand Down

0 comments on commit 6523456

Please sign in to comment.