C# 클래스 Reko.Arch.X86.X86Rewriter

파일 보기 프로젝트 열기: uxmal/reko

공개 메소드들

메소드 설명
EmitBinOp ( Reko.Core.Operators.BinaryOperator binOp, MachineOperand dst, DataType dtDst, Expression left, Expression right, CopyFlags flags ) : void
EmitCommonFpuInstruction ( Func op, bool fReversed, bool fPopStack ) : void
EmitCommonFpuInstruction ( Func op, bool fReversed, bool fPopStack, DataType cast ) : void
MatchesFstswSequence ( ) : bool
MaybeCast ( DataType type, Expression e ) : Expression
Mem ( Expression defaultSegment, Expression effectiveAddress ) : MemoryAccess
MemDi ( ) : MemoryAccess
MemSi ( ) : MemoryAccess
OperandAsCodeAddress ( MachineOperand op ) : Address
RewriteAdcSbb ( Func opr ) : void
RewriteAddSub ( Reko.Core.Operators.BinaryOperator op ) : void

Doesn't handle the x86 idiom add ... adc => long add (and sub ..sbc => long sub)

RewriteBinOp ( Reko.Core.Operators.BinaryOperator opr ) : void
RewriteBswap ( ) : void
RewriteCbw ( ) : void
RewriteFld ( ) : void
RewriteIret ( ) : void
RewriteLahf ( ) : void
RewriteLea ( ) : void
RewriteRet ( ) : void

비공개 메소드들

메소드 설명
Branch ( ConditionCode code, MachineOperand op ) : void
CreateTestCondition ( ConditionCode cc, Opcode opcode ) : Expression
EmitCcInstr ( Expression expr, FlagM defFlags ) : void

Emits an assignment to a flag-group pseudoregister.

EmitDaaDas ( string fnName ) : void
EmitFchs ( ) : void
EmitPop ( RegisterStorage reg ) : void
FpuRegister ( int reg ) : Identifier
GetIncrementOperator ( ) : Func
IntelSizeSuffix ( int size ) : string
IsRealModeReboot ( Reko.Arch.X86.X86Instruction instrCur ) : bool

A jump to 0xFFFF:0x0000 in real mode is a reboot.

RewriteAaa ( ) : void
RewriteAad ( ) : void
RewriteAam ( ) : void
RewriteAas ( ) : void
RewriteArpl ( ) : void
RewriteBound ( ) : void
RewriteBsr ( ) : void
RewriteBt ( ) : void
RewriteBtr ( ) : void
RewriteBts ( ) : void
RewriteCall ( MachineOperand callTarget, PrimitiveType opsize ) : void
RewriteCli ( ) : void
RewriteCmp ( ) : void
RewriteCmpxchg ( ) : void
RewriteConditionalGoto ( ConditionCode cc, MachineOperand op1 ) : void
RewriteConditionalMove ( ConditionCode cc, MachineOperand dst, MachineOperand src ) : void
RewriteCpuid ( ) : void
RewriteCwd ( ) : void
RewriteDivide ( Reko.Core.Operators.BinaryOperator op, Domain domain ) : void
RewriteEnter ( ) : void
RewriteExchange ( ) : void
RewriteFUnary ( string name ) : void
RewriteFabs ( ) : void
RewriteFbld ( ) : void
RewriteFbstp ( ) : void
RewriteFclex ( ) : void
RewriteFcom ( int pops ) : void
RewriteFdecstp ( ) : void
RewriteFfree ( ) : void
RewriteFicom ( bool pop ) : void
RewriteFild ( ) : void
RewriteFincstp ( ) : void
RewriteFist ( bool pop ) : void
RewriteFldConst ( Constant c ) : void
RewriteFldConst ( double constant ) : void
RewriteFldcw ( ) : void
RewriteFldenv ( ) : void
RewriteFpatan ( ) : void
RewriteFprem ( ) : void
RewriteFrstor ( ) : void
RewriteFsave ( ) : void
RewriteFscale ( ) : void
RewriteFsincos ( ) : void
RewriteFst ( bool pop ) : void
RewriteFstenv ( ) : void
RewriteFstsw ( ) : void
RewriteFtst ( ) : void
RewriteFxam ( ) : void
RewriteFyl2x ( ) : void
RewriteHlt ( ) : void
RewriteIn ( ) : void
RewriteIncDec ( int amount ) : void
RewriteInt ( ) : void
RewriteInto ( ) : void
RewriteJcxz ( ) : void
RewriteJmp ( ) : void
RewriteLeave ( ) : void
RewriteLock ( ) : void
RewriteLogical ( Reko.Core.Operators.BinaryOperator op ) : void
RewriteLoop ( FlagM useFlags, ConditionCode cc ) : void
RewriteLxs ( RegisterStorage seg ) : void
RewriteMov ( ) : void
RewriteMovsx ( ) : void
RewriteMovzx ( ) : void
RewriteMultiply ( BinaryOperator op, Domain resultDomain ) : void
RewriteNeg ( ) : void
RewriteNot ( ) : void
RewriteOut ( ) : void
RewritePop ( ) : void
RewritePop ( Identifier dst, PrimitiveType width ) : void
RewritePop ( MachineOperand op, PrimitiveType width ) : void
RewritePopa ( ) : void
RewritePopf ( ) : void
RewritePush ( ) : void
RewritePush ( PrimitiveType dataWidth, Expression expr ) : void
RewritePush ( RegisterStorage reg ) : void
RewritePusha ( ) : void
RewritePushf ( ) : void
RewriteRdtsc ( ) : void
RewriteRep ( ) : void

Converts a rep [string instruction] into a loop: while ([e]cx != 0) [string instruction] --ecx; if (zF) ; only cmps[b] and scas[b] goto follow; follow: ...

RewriteRotation ( string operation, bool useCarry, bool left ) : void
RewriteSet ( ConditionCode cc ) : void
RewriteSetFlag ( FlagM flagM, Constant value ) : void
RewriteShxd ( string name ) : void
RewriteSti ( ) : void
RewriteStringInstruction ( ) : bool

Rewrites the current instruction as a string instruction.

RewriteTest ( ) : void
RewriteUnaryOperator ( Expression>.Func op, MachineOperand opDst, MachineOperand opSrc, CopyFlags flags ) : void
RewriteWait ( ) : void
RewriteXadd ( ) : void
RewriteXgetbv ( ) : void
RewriteXlat ( ) : void
RewriterFstcw ( ) : void
StackPointer ( ) : Identifier
WriteFpuStack ( int offset ) : void

메소드 상세

EmitBinOp() 공개 메소드

public EmitBinOp ( Reko.Core.Operators.BinaryOperator binOp, MachineOperand dst, DataType dtDst, Expression left, Expression right, CopyFlags flags ) : void
binOp Reko.Core.Operators.BinaryOperator
dst Reko.Core.Machine.MachineOperand
dtDst DataType
left Expression
right Expression
flags CopyFlags
리턴 void

EmitCommonFpuInstruction() 공개 메소드

public EmitCommonFpuInstruction ( Func op, bool fReversed, bool fPopStack ) : void
op Func
fReversed bool
fPopStack bool
리턴 void

EmitCommonFpuInstruction() 공개 메소드

public EmitCommonFpuInstruction ( Func op, bool fReversed, bool fPopStack, DataType cast ) : void
op Func
fReversed bool
fPopStack bool
cast DataType
리턴 void

MatchesFstswSequence() 공개 메소드

public MatchesFstswSequence ( ) : bool
리턴 bool

MaybeCast() 공개 메소드

public MaybeCast ( DataType type, Expression e ) : Expression
type DataType
e Expression
리턴 Expression

Mem() 공개 메소드

public Mem ( Expression defaultSegment, Expression effectiveAddress ) : MemoryAccess
defaultSegment Expression
effectiveAddress Expression
리턴 MemoryAccess

MemDi() 공개 메소드

public MemDi ( ) : MemoryAccess
리턴 MemoryAccess

MemSi() 공개 메소드

public MemSi ( ) : MemoryAccess
리턴 MemoryAccess

OperandAsCodeAddress() 공개 메소드

public OperandAsCodeAddress ( MachineOperand op ) : Address
op Reko.Core.Machine.MachineOperand
리턴 Address

RewriteAdcSbb() 공개 메소드

public RewriteAdcSbb ( Func opr ) : void
opr Func
리턴 void

RewriteAddSub() 공개 메소드

Doesn't handle the x86 idiom add ... adc => long add (and sub ..sbc => long sub)
public RewriteAddSub ( Reko.Core.Operators.BinaryOperator op ) : void
op Reko.Core.Operators.BinaryOperator
리턴 void

RewriteBinOp() 공개 메소드

public RewriteBinOp ( Reko.Core.Operators.BinaryOperator opr ) : void
opr Reko.Core.Operators.BinaryOperator
리턴 void

RewriteBswap() 공개 메소드

public RewriteBswap ( ) : void
리턴 void

RewriteCbw() 공개 메소드

public RewriteCbw ( ) : void
리턴 void

RewriteFld() 공개 메소드

public RewriteFld ( ) : void
리턴 void

RewriteIret() 공개 메소드

public RewriteIret ( ) : void
리턴 void

RewriteLahf() 공개 메소드

public RewriteLahf ( ) : void
리턴 void

RewriteLea() 공개 메소드

public RewriteLea ( ) : void
리턴 void

RewriteRet() 공개 메소드

public RewriteRet ( ) : void
리턴 void