openvm_instructions/phantom.rs
1use strum::FromRepr;
2
3#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
4pub struct PhantomDiscriminant(pub u16);
5
6/// Phantom instructions owned by the system. These are handled in the `ExecutionSegment`, as
7/// opposed to the `PhantomChip`.
8#[derive(Copy, Clone, Debug, PartialEq, Eq, FromRepr)]
9#[repr(u16)]
10pub enum SysPhantom {
11 /// Does nothing at constraint and runtime level besides advance pc by
12 /// [DEFAULT_PC_STEP](super::program::DEFAULT_PC_STEP).
13 Nop = 0,
14 /// Causes the runtime to panic, on host machine and prints a backtrace.
15 DebugPanic,
16 /// Start tracing
17 CtStart,
18 /// End tracing
19 CtEnd,
20}