C# Class Reko.Arch.M68k.OperandRewriter

Rewrites M68k operands into sequences of RTL expressions and possibly instructions.
Some of the operands, like (A6)+ and -(A5), have side effects that need to be expressed as separate instructions. We must therefore insert RTL instructions into the stream as these operands are rewritten. Because of these side effects, it is critical that we don't call Rewrite twice on the same operand, as this will cause two side effect instructions to be generated.
Show file Open project: uxmal/reko Class Usage Examples

Public Methods

Method Description
FlagGroup ( FlagM flags ) : Identifier
OperandRewriter ( M68kArchitecture arch, Reko.Core.Rtl.RtlEmitter emitter, Frame frame, PrimitiveType dataWidth ) : Reko.Core
RewriteDst ( MachineOperand operand, Address addrInstr, Expression src, Func opGen ) : Expression
RewriteDst ( MachineOperand operand, Address addrInstr, PrimitiveType dataWidth, Expression src, Func opGen ) : Expression
RewriteMoveDst ( MachineOperand opDst, Address addrInstr, PrimitiveType dataWidth, Expression src ) : Expression
RewriteSrc ( MachineOperand operand, Address addrInstr, bool addressAsAddress = false ) : Expression

Rewrite operands being used as sources.

RewriteUnary ( MachineOperand operand, Address addrInstr, PrimitiveType dataWidth, Expression>.Func opGen ) : Expression

Private Methods

Method Description
Combine ( Expression e, Expression o ) : Expression
Combine ( Expression e, RegisterStorage reg ) : Expression
RewriteIndirectBaseRegister ( IndirectIndexedOperand indidx, Address addrInstr ) : Expression
RewriteMemoryAccess ( MemoryOperand mem, PrimitiveType dataWidth, Address addrInstr ) : MemoryAccess
Spill ( Expression src, Identifier r ) : Expression

Method Details

FlagGroup() public method

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

OperandRewriter() public method

public OperandRewriter ( M68kArchitecture arch, Reko.Core.Rtl.RtlEmitter emitter, Frame frame, PrimitiveType dataWidth ) : Reko.Core
arch M68kArchitecture
emitter Reko.Core.Rtl.RtlEmitter
frame Reko.Core.Frame
dataWidth PrimitiveType
return Reko.Core

RewriteDst() public method

public RewriteDst ( MachineOperand operand, Address addrInstr, Expression src, Func opGen ) : Expression
operand Reko.Core.Machine.MachineOperand
addrInstr Address
src Expression
opGen Func
return Expression

RewriteDst() public method

public RewriteDst ( MachineOperand operand, Address addrInstr, PrimitiveType dataWidth, Expression src, Func opGen ) : Expression
operand Reko.Core.Machine.MachineOperand
addrInstr Address
dataWidth PrimitiveType
src Expression
opGen Func
return Expression

RewriteMoveDst() public method

public RewriteMoveDst ( MachineOperand opDst, Address addrInstr, PrimitiveType dataWidth, Expression src ) : Expression
opDst Reko.Core.Machine.MachineOperand
addrInstr Address
dataWidth PrimitiveType
src Expression
return Expression

RewriteSrc() public method

Rewrite operands being used as sources.
public RewriteSrc ( MachineOperand operand, Address addrInstr, bool addressAsAddress = false ) : Expression
operand Reko.Core.Machine.MachineOperand
addrInstr Address Address of the current instruction
addressAsAddress bool
return Expression

RewriteUnary() public method

public RewriteUnary ( MachineOperand operand, Address addrInstr, PrimitiveType dataWidth, Expression>.Func opGen ) : Expression
operand Reko.Core.Machine.MachineOperand
addrInstr Address
dataWidth PrimitiveType
opGen Expression>.Func
return Expression