pub trait Architecture: 'static + Sized + AsRef<CoreArchitecture> {
    type Handle: Borrow<Self> + Clone;
    type RegisterInfo: RegisterInfo<RegType = Self::Register>;
    type Register: Register<InfoType = Self::RegisterInfo>;
    type Flag: Flag<FlagClass = Self::FlagClass>;
    type FlagWrite: FlagWrite<FlagType = Self::Flag, FlagClass = Self::FlagClass>;
    type FlagClass: FlagClass;
    type FlagGroup: FlagGroup<FlagType = Self::Flag, FlagClass = Self::FlagClass>;

Show 30 methods fn endianness(&self) -> Endianness; fn address_size(&self) -> usize; fn default_integer_size(&self) -> usize; fn instruction_alignment(&self) -> usize; fn max_instr_len(&self) -> usize; fn opcode_display_len(&self) -> usize; fn associated_arch_by_addr(&self, addr: &mut u64) -> CoreArchitecture; fn instruction_info(&self, data: &[u8], addr: u64) -> Option<InstructionInfo>; fn instruction_text(
        data: &[u8],
        addr: u64
    ) -> Option<(usize, Vec<InstructionTextToken>)>; fn instruction_llil(
        data: &[u8],
        addr: u64,
        il: &mut Lifter<Self>
    ) -> Option<(usize, bool)>; fn flags_required_for_flag_condition(
        condition: FlagCondition,
        class: Option<Self::FlagClass>
    ) -> Vec<Self::Flag>; fn flag_group_llil<'a>(
        group: Self::FlagGroup,
        il: &'a mut Lifter<Self>
    ) -> Option<LiftedExpr<'a, Self>>; fn registers_all(&self) -> Vec<Self::Register>; fn registers_full_width(&self) -> Vec<Self::Register>; fn registers_global(&self) -> Vec<Self::Register>; fn registers_system(&self) -> Vec<Self::Register>; fn flags(&self) -> Vec<Self::Flag>; fn flag_write_types(&self) -> Vec<Self::FlagWrite>; fn flag_classes(&self) -> Vec<Self::FlagClass>; fn flag_groups(&self) -> Vec<Self::FlagGroup>; fn stack_pointer_reg(&self) -> Option<Self::Register>; fn link_reg(&self) -> Option<Self::Register>; fn register_from_id(&self, id: u32) -> Option<Self::Register>; fn flag_from_id(&self, id: u32) -> Option<Self::Flag>; fn flag_write_from_id(&self, id: u32) -> Option<Self::FlagWrite>; fn flag_class_from_id(&self, id: u32) -> Option<Self::FlagClass>; fn flag_group_from_id(&self, id: u32) -> Option<Self::FlagGroup>; fn handle(&self) -> Self::Handle; fn flag_write_llil<'a>(
        flag: Self::Flag,
        flag_write_type: Self::FlagWrite,
        op: FlagWriteOp<Self::Register>,
        il: &'a mut Lifter<Self>
    ) -> Option<LiftedExpr<'a, Self>> { ... } fn flag_cond_llil<'a>(
        cond: FlagCondition,
        class: Option<Self::FlagClass>,
        il: &'a mut Lifter<Self>
    ) -> Option<LiftedExpr<'a, Self>> { ... }

Required Associated Types

Required Methods

Determines what flags need to be examined in order to attempt automatic recovery of the semantics of this flag use.

If automatic recovery is not possible, the flag_cond_llil method will be invoked to give this Architecture implementation arbitrary control over the expression to be evaluated.

Performs fallback resolution when the core was unable to recover the semantics of a LLIL_FLAG_GROUP expression. This occurs when multiple instructions may have set the flags at the flag group query, or when the FlagGroup::flag_conditions() map doesn’t have an entry for the FlagClass associated with the FlagWrite type of the expression that last set the flags required by the FlagGroup group.

In this fallback path, the Architecture must generate the boolean expression in terms of the values of that flags returned by group’s flags_required method.

This function must return an expression representing a boolean (as in, size of 0) value. It is not allowed to add any instructions that can cause side effects.

This function must not observe the values of any flag not returned by group’s flags_required method.

Provided Methods

Fallback flag value calculation path. This method is invoked when the core is unable to recover flag use semantics, and resorts to emitting instructions that explicitly set each observed flag to the value of an expression returned by this function.

This function MUST NOT append instructions that have side effects.

This function MUST NOT observe the values of other flags.

This function MUST return None or an expression representing a boolean value.

This function MUST NOT append instructions that have side effects.

This function MUST NOT observe the values of flags not returned by flags_required_for_flag_condition.

This function MUST return None or an expression representing a boolean value.