Enum Opcode

Source
pub enum Opcode {
Show 67 variants Ret, Br, Switch, IndirectBr, Invoke, Unreachable, CallBr, FNeg, Add, FAdd, Sub, FSub, Mul, FMul, UDiv, SDiv, FDiv, URem, SRem, FRem, Shl, LShr, AShr, And, Or, Xor, Alloca, Load, Store, GetElementPtr, Trunc, ZExt, SExt, FPToUI, FPToSI, UIToFP, SIToFP, FPTrunc, FPExt, PtrToInt, IntToPtr, BitCast, AddrSpaceCast, ICmp, FCmp, PHI, Call, Select, UserOp1, UserOp2, VAArg, ExtractElement, InsertElement, ShuffleVector, ExtractValue, InsertValue, Freeze, Fence, AtomicCmpXchg, AtomicRMW, Resume, LandingPad, CleanupRet, CatchRet, CatchPad, CleanupPad, CatchSwitch,
}
Expand description

Represents the various opcodes in LLVM IR.

Variants§

§

Ret

Return instruction.

§

Br

Branch instruction.

§

Switch

Switch instruction.

§

IndirectBr

Indirect branch instruction.

§

Invoke

Invoke instruction.

§

Unreachable

Unreachable instruction.

§

CallBr

CallBr instruction.

§

FNeg

Floating-point negation instruction.

§

Add

Integer addition instruction.

§

FAdd

Floating-point addition instruction.

§

Sub

Integer subtraction instruction.

§

FSub

Floating-point subtraction instruction.

§

Mul

Integer multiplication instruction

§

FMul

Floating-point multiplication instruction.

§

UDiv

Unsigned integer division instruction.

§

SDiv

Signed integer division instruction.

§

FDiv

Floating-point division instruction.

§

URem

Unsigned integer remainder instruction.

§

SRem

Signed integer remainder instruction.

§

FRem

Floating-point remainder instruction.

§

Shl

Logical shift left instruction.

§

LShr

Logical shift right instruction.

§

AShr

Arithmetic shift right instruction.

§

And

Bitwise AND instruction.

§

Or

Bitwise OR instruction.

§

Xor

Bitwise XOR instruction.

§

Alloca

Alloca instruction.

§

Load

Load instruction.

§

Store

Store instruction.

§

GetElementPtr

GetElementPtr instruction.

§

Trunc

Truncate instruction.

§

ZExt

Zero extend instruction.

§

SExt

Sign extend instruction.

§

FPToUI

Floating-point to unsigned integer instruction.

§

FPToSI

Floating-point to signed integer instruction.

§

UIToFP

Unsigned integer to floating-point instruction.

§

SIToFP

Signed integer to floating-point instruction.

§

FPTrunc

Floating-point truncate instruction.

§

FPExt

Floating-point extend instruction

§

PtrToInt

Pointer to integer instruction

§

IntToPtr

Integer to pointer instruction

§

BitCast

Bit-cast instruction

§

AddrSpaceCast

Address space cast instruction

§

ICmp

Integer comparison instruction

§

FCmp

Floating-point comparison instruction

§

PHI

PHI node instruction

§

Call

Call instruction

§

Select

Select instruction

§

UserOp1

User-defined operation 1

§

UserOp2

User-defined operation 2

§

VAArg

Variable argument instruction

§

ExtractElement

Extract element from vector instruction

§

InsertElement

Insert element into vector instruction

§

ShuffleVector

Shuffle vector instruction

§

ExtractValue

Extract value from aggregate instruction

§

InsertValue

Insert value into aggregate instruction

§

Freeze

Freeze instruction

§

Fence

Fence instruction

§

AtomicCmpXchg

Atomic compare and exchange instruction

§

AtomicRMW

Atomic read-modify-write instruction

§

Resume

Resume instruction

§

LandingPad

Landing pad instruction

§

CleanupRet

Cleanup return instruction.

§

CatchRet

Catch return instruction

§

CatchPad

Catch pad instruction

§

CleanupPad

Cleanup pad instruction

§

CatchSwitch

Catch switch instruction

Trait Implementations§

Source§

impl Clone for Opcode

Source§

fn clone(&self) -> Opcode

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Opcode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<LLVMOpcode> for Opcode

Source§

fn from(opcode: LLVMOpcode) -> Self

Converts to this type from the input type.
Source§

impl From<Opcode> for LLVMOpcode

Source§

fn from(opcode: Opcode) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Opcode

Source§

fn eq(&self, other: &Opcode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Opcode

Source§

impl Eq for Opcode

Source§

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 UnwindSafe for Opcode

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.