C# Class Reko.Arch.X86.OperandRewriter

Helper class used by the X86 rewriter to turn machine code operands into IL expressions.
Mostrar archivo Open project: uxmal/reko Class Usage Examples

Protected Properties

Property Type Description
arch IntelArchitecture

Public Methods

Method Description
AddrOf ( Expression expr ) : UnaryExpression
AluRegister ( Reko.Core.Machine.RegisterOperand reg ) : Identifier
AluRegister ( RegisterStorage reg ) : Identifier
AluRegister ( RegisterStorage reg, PrimitiveType vt ) : Identifier
CreateConstant ( ImmediateOperand imm, PrimitiveType dataWidth ) : Constant
CreateMemoryAccess ( Reko.Arch.X86.X86Instruction instr, Reko.Arch.X86.MemoryOperand mem, DataType dt, Reko.Arch.X86.X86State state ) : Expression
CreateMemoryAccess ( Reko.Arch.X86.X86Instruction instr, Reko.Arch.X86.MemoryOperand memoryOperand, Reko.Arch.X86.X86State state ) : Expression
EffectiveAddressExpression ( Reko.Arch.X86.X86Instruction instr, Reko.Arch.X86.MemoryOperand mem, Reko.Arch.X86.X86State state ) : Expression

Memory accesses are translated into expressions.

FlagGroup ( FlagM flags ) : Identifier
FpuRegister ( int reg, Reko.Arch.X86.X86State state ) : Identifier

Changes the stack-relative address 'reg' into a frame-relative operand. If the register number is larger than the stack depth, then the register was passed on the stack when the function was called.

ImmediateAsAddress ( Address address, ImmediateOperand imm ) : Address
ImportedGlobal ( Address addrInstruction, PrimitiveType addrWidth, Reko.Arch.X86.MemoryOperand mem ) : Identifier
ImportedProcedure ( Address addrInstruction, PrimitiveType addrWidth, Reko.Arch.X86.MemoryOperand mem ) : Reko.Core.ExternalProcedure
OperandRewriter ( IntelArchitecture arch, ExpressionEmitter emitter, Frame frame, IRewriterHost host ) : Reko.Core.Expressions
ReplaceCodeSegment ( RegisterStorage reg, Reko.Arch.X86.X86State state ) : Constant
StackAccess ( Expression expr, DataType dt ) : MemoryAccess
Transform ( Reko.Arch.X86.X86Instruction instr, MachineOperand op, PrimitiveType opWidth, Reko.Arch.X86.X86State state ) : Expression

Method Details

AddrOf() public method

public AddrOf ( Expression expr ) : UnaryExpression
expr Expression
return UnaryExpression

AluRegister() public method

public AluRegister ( Reko.Core.Machine.RegisterOperand reg ) : Identifier
reg Reko.Core.Machine.RegisterOperand
return Identifier

AluRegister() public method

public AluRegister ( RegisterStorage reg ) : Identifier
reg RegisterStorage
return Identifier

AluRegister() public method

public AluRegister ( RegisterStorage reg, PrimitiveType vt ) : Identifier
reg RegisterStorage
vt PrimitiveType
return Identifier

CreateConstant() public method

public CreateConstant ( ImmediateOperand imm, PrimitiveType dataWidth ) : Constant
imm Reko.Core.Machine.ImmediateOperand
dataWidth PrimitiveType
return Constant

CreateMemoryAccess() public method

public CreateMemoryAccess ( Reko.Arch.X86.X86Instruction instr, Reko.Arch.X86.MemoryOperand mem, DataType dt, Reko.Arch.X86.X86State state ) : Expression
instr Reko.Arch.X86.X86Instruction
mem Reko.Arch.X86.MemoryOperand
dt DataType
state Reko.Arch.X86.X86State
return Expression

CreateMemoryAccess() public method

public CreateMemoryAccess ( Reko.Arch.X86.X86Instruction instr, Reko.Arch.X86.MemoryOperand memoryOperand, Reko.Arch.X86.X86State state ) : Expression
instr Reko.Arch.X86.X86Instruction
memoryOperand Reko.Arch.X86.MemoryOperand
state Reko.Arch.X86.X86State
return Expression

EffectiveAddressExpression() public method

Memory accesses are translated into expressions.
public EffectiveAddressExpression ( Reko.Arch.X86.X86Instruction instr, Reko.Arch.X86.MemoryOperand mem, Reko.Arch.X86.X86State state ) : Expression
instr Reko.Arch.X86.X86Instruction
mem Reko.Arch.X86.MemoryOperand
state Reko.Arch.X86.X86State
return Expression

FlagGroup() public method

public FlagGroup ( FlagM flags ) : Identifier
flags FlagM
return Identifier

FpuRegister() public method

Changes the stack-relative address 'reg' into a frame-relative operand. If the register number is larger than the stack depth, then the register was passed on the stack when the function was called.
public FpuRegister ( int reg, Reko.Arch.X86.X86State state ) : Identifier
reg int
state Reko.Arch.X86.X86State
return Identifier

ImmediateAsAddress() public abstract method

public abstract ImmediateAsAddress ( Address address, ImmediateOperand imm ) : Address
address Address
imm Reko.Core.Machine.ImmediateOperand
return Address

ImportedGlobal() public method

public ImportedGlobal ( Address addrInstruction, PrimitiveType addrWidth, Reko.Arch.X86.MemoryOperand mem ) : Identifier
addrInstruction Address
addrWidth PrimitiveType
mem Reko.Arch.X86.MemoryOperand
return Identifier

ImportedProcedure() public method

public ImportedProcedure ( Address addrInstruction, PrimitiveType addrWidth, Reko.Arch.X86.MemoryOperand mem ) : Reko.Core.ExternalProcedure
addrInstruction Address
addrWidth PrimitiveType
mem Reko.Arch.X86.MemoryOperand
return Reko.Core.ExternalProcedure

OperandRewriter() public method

public OperandRewriter ( IntelArchitecture arch, ExpressionEmitter emitter, Frame frame, IRewriterHost host ) : Reko.Core.Expressions
arch IntelArchitecture
emitter Reko.Core.Expressions.ExpressionEmitter
frame Reko.Core.Frame
host IRewriterHost
return Reko.Core.Expressions

ReplaceCodeSegment() public method

public ReplaceCodeSegment ( RegisterStorage reg, Reko.Arch.X86.X86State state ) : Constant
reg RegisterStorage
state Reko.Arch.X86.X86State
return Constant

StackAccess() public method

public StackAccess ( Expression expr, DataType dt ) : MemoryAccess
expr Expression
dt DataType
return MemoryAccess

Transform() public method

public Transform ( Reko.Arch.X86.X86Instruction instr, MachineOperand op, PrimitiveType opWidth, Reko.Arch.X86.X86State state ) : Expression
instr Reko.Arch.X86.X86Instruction
op Reko.Core.Machine.MachineOperand
opWidth PrimitiveType
state Reko.Arch.X86.X86State
return Expression

Property Details

arch protected_oe property

protected IntelArchitecture,Reko.Arch.X86 arch
return IntelArchitecture