From b9de9e93160e5322b63cc97b9fc614ac950c497a Mon Sep 17 00:00:00 2001 From: Zhou Fang <33002388+zhouwfang@users.noreply.github.com> Date: Fri, 3 Jan 2025 02:39:54 -0800 Subject: [PATCH] Optimize side table masks (#713) Based on experiments, these are the smallest masks to pass CI. In other words, `SideTableEntry` only requires `u35` at this point. I'll add the fields from `func_type()` and `func()` in `module.rs` to the side table in #711, and `SideTableEntry` as `u64` might not be sufficient. #46 --------- Co-authored-by: Zhou Fang <33002388+zhou-w-fang@users.noreply.github.com> --- crates/interpreter/src/side_table.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/interpreter/src/side_table.rs b/crates/interpreter/src/side_table.rs index dc65d365..c491f5d3 100644 --- a/crates/interpreter/src/side_table.rs +++ b/crates/interpreter/src/side_table.rs @@ -32,9 +32,9 @@ pub struct SideTableEntryView { impl SideTableEntry { const DELTA_IP_MASK: u64 = 0xffff; - const DELTA_STP_MASK: u64 = 0xffff << 16; - const VAL_CNT_MASK: u64 = 0xffff << 32; - const POP_CNT_MASK: u64 = 0xffff << 48; + const DELTA_STP_MASK: u64 = 0x7fff << 16; + const VAL_CNT_MASK: u64 = 0x3 << 31; + const POP_CNT_MASK: u64 = 0x3 << 33; pub fn new(view: SideTableEntryView) -> Result { let mut fields = 0;