Skip to main content

predecode

Function predecode 

Source
pub fn predecode(code: &[u8]) -> Predecode
Expand description

Predecode an entire RV+C+custom-0 code section.

Linear pass; no recursion, no bitmask consultation. The self-describing length encoding (op[1:0] tells you 2-byte vs 4-byte) makes every advance unambiguous.

Per-block gas costs are computed by running the pipeline simulator from gas_cost::rv_gas_cost_for_block over every basic block. mem_cycles is the load/store cycle latency for the active memory tier (mirrors DEFAULT_MEM_CYCLES = 25 from the PVM gas table).