Skip to content

Commit a498a4f

Browse files
committed
Set the cycles of the CFI instruction
1 parent 546d975 commit a498a4f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/cost_model.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ pub fn estimate_cycles(i: Instruction) -> u64 {
8888
insts::OP_WIDE_DIVU => 32,
8989
insts::OP_FAR_JUMP_REL => 3,
9090
insts::OP_FAR_JUMP_ABS => 3,
91+
// CFI
92+
insts::OP_LPAD => 3,
93+
insts::OP_SSRDP => 3,
94+
insts::OP_SSPUSH => 3,
95+
insts::OP_SSPOPCHK => 3,
96+
insts::OP_SSAMOSWAP_W => 4,
97+
insts::OP_SSAMOSWAP_D => 4,
9198
_ => 1,
9299
}
93100
}

0 commit comments

Comments
 (0)