#[repr(u8)]pub enum Opcode {
Show 72 variants
Copy = 1,
Load = 2,
Store = 3,
Branch = 4,
CBranch = 5,
BranchInd = 6,
Call = 7,
CallInd = 8,
CallOther = 9,
Return = 10,
IntEqual = 11,
IntNotEqual = 12,
IntSLess = 13,
IntSLessEqual = 14,
IntLess = 15,
IntLessEqual = 16,
IntZext = 17,
IntSext = 18,
IntAdd = 19,
IntSub = 20,
IntCarry = 21,
IntSCarry = 22,
IntSBorrow = 23,
Int2Comp = 24,
IntNegate = 25,
IntXor = 26,
IntAnd = 27,
IntOr = 28,
IntLeft = 29,
IntRight = 30,
IntSRight = 31,
IntMult = 32,
IntDiv = 33,
IntSDiv = 34,
IntRem = 35,
IntSRem = 36,
BoolNegate = 37,
BoolXor = 38,
BoolAnd = 39,
BoolOr = 40,
FloatEqual = 41,
FloatNotEqual = 42,
FloatLess = 43,
FloatLessEqual = 44,
FloatNan = 46,
FloatAdd = 47,
FloatDiv = 48,
FloatMult = 49,
FloatSub = 50,
FloatNeg = 51,
FloatAbs = 52,
FloatSqrt = 53,
FloatInt2Float = 54,
FloatFloat2Float = 55,
FloatTrunc = 56,
FloatCeil = 57,
FloatFloor = 58,
FloatRound = 59,
MultiEqual = 60,
Indirect = 61,
Piece = 62,
SubPiece = 63,
Cast = 64,
PtrAdd = 65,
PtrSub = 66,
SegmentOp = 67,
CpoolRef = 68,
New = 69,
Insert = 70,
Extract = 71,
PopCount = 72,
LzCount = 73,
}Expand description
An opcode from Ghidra’s p-code operation reference.
The variants use Rust-style names; each maps one-for-one to Ghidra’s
CPUI_* opcode with the corresponding uppercase spelling. Some variants
are analysis-only pseudo-operations and are identified by
Self::is_raw_instruction_op.
Variants§
Copy = 1
Load = 2
Store = 3
Branch = 4
CBranch = 5
BranchInd = 6
Call = 7
CallInd = 8
CallOther = 9
Return = 10
IntEqual = 11
IntNotEqual = 12
IntSLess = 13
IntSLessEqual = 14
IntLess = 15
IntLessEqual = 16
IntZext = 17
IntSext = 18
IntAdd = 19
IntSub = 20
IntCarry = 21
IntSCarry = 22
IntSBorrow = 23
Int2Comp = 24
IntNegate = 25
IntXor = 26
IntAnd = 27
IntOr = 28
IntLeft = 29
IntRight = 30
IntSRight = 31
IntMult = 32
IntDiv = 33
IntSDiv = 34
IntRem = 35
IntSRem = 36
BoolNegate = 37
BoolXor = 38
BoolAnd = 39
BoolOr = 40
FloatEqual = 41
FloatNotEqual = 42
FloatLess = 43
FloatLessEqual = 44
FloatNan = 46
FloatAdd = 47
FloatDiv = 48
FloatMult = 49
FloatSub = 50
FloatNeg = 51
FloatAbs = 52
FloatSqrt = 53
FloatInt2Float = 54
FloatFloat2Float = 55
FloatTrunc = 56
FloatCeil = 57
FloatFloor = 58
FloatRound = 59
MultiEqual = 60
Indirect = 61
Piece = 62
SubPiece = 63
Cast = 64
PtrAdd = 65
PtrSub = 66
SegmentOp = 67
CpoolRef = 68
New = 69
Insert = 70
Extract = 71
PopCount = 72
LzCount = 73
Implementations§
Source§impl Opcode
impl Opcode
Sourcepub const fn is_raw_instruction_op(self) -> bool
pub const fn is_raw_instruction_op(self) -> bool
Returns whether this opcode may occur in raw instruction p-code.
Ghidra reserves SSA and type-recovery pseudo-operations for later
analysis. INSERT and EXTRACT are likewise pseudo-operations even
though they correspond to SLEIGH bit-range syntax.
Trait Implementations§
impl Copy for Opcode
Source§impl<'de> Deserialize<'de> for Opcode
impl<'de> Deserialize<'de> for Opcode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Opcode
impl StructuralPartialEq for Opcode
Auto Trait Implementations§
impl Freeze for Opcode
impl RefUnwindSafe for Opcode
impl Send for Opcode
impl Sync for Opcode
impl Unpin for Opcode
impl UnsafeUnpin for Opcode
impl UnwindSafe for Opcode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more