From 6523456d2dbcc3e1388943cec842f38ffe6ce009 Mon Sep 17 00:00:00 2001 From: Artem Melnytskyi <112873874+amelnytskyi@users.noreply.github.com> Date: Fri, 19 Jan 2024 18:49:20 +0200 Subject: [PATCH] Update extensions.md (#874) Co-authored-by: MexicanAce --- .../compiler/specification/instructions/extensions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zk-stack/components/compiler/specification/instructions/extensions.md b/docs/zk-stack/components/compiler/specification/instructions/extensions.md index ee18713ed6..150da71b04 100644 --- a/docs/zk-stack/components/compiler/specification/instructions/extensions.md +++ b/docs/zk-stack/components/compiler/specification/instructions/extensions.md @@ -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 |