C# Class CodeGeneration.CGenState

Mostra file Open project: phisiart/C-Compiler Class Usage Examples

Public Properties

Property Type Description
label_idx System.Int32
reg_strs String>.Dictionary

Public Methods

Method Description
ADDL ( Int32 er, System.Reg ee, String comment = "" ) : void
ADDL ( System.Reg er, System.Reg ee, String comment = "" ) : void
ADDL ( String er, String ee, String comment = "" ) : void

ADDL: add long

ALIGN ( Int32 align ) : void
ANDB ( Int32 er, System.Reg ee ) : void
ANDB ( String er, String ee ) : void
ANDL ( Int32 er, System.Reg ee ) : void
ANDL ( System.Reg er, System.Reg ee ) : void
ANDL ( String er, String ee ) : void

ANDL er, ee ee = er & ee

BYTE ( Int32 value ) : void
CALL ( String addr ) : void
CGenConvertFloatToLong ( ) : void
CGenConvertLongToFloat ( ) : void
CGenExpandStackBy ( Int32 nbytes ) : void
CGenExpandStackBy4Bytes ( String comment = "" ) : void
CGenExpandStackBy8Bytes ( String comment = "" ) : void
CGenExpandStackTo ( Int32 size, String comment = "" ) : void
CGenExpandStackWithAlignment ( Int32 nbytes, Int32 align ) : void
CGenForceStackSizeTo ( Int32 nbytes ) : void
CGenFuncStart ( String name ) : void
CGenLabel ( Int32 label ) : void
CGenLabel ( String label ) : void
CGenLongConst ( Int32 val ) : String
CGenLongLongConst ( Int32 lo, Int32 hi ) : String
CGenMemCpy ( ) : void

Fast Memory Copy using assembly. Make sure that 1) %esi = source address 2) %edi = destination address 3) %ecx = number of bytes

CGenMemCpyReversed ( ) : void

Fast Memory Copy using assembly. Make sure that 1) %esi = source address 2) %edi = destination address 3) %ecx = number of bytes

CGenPopDouble ( Int32 saved_size ) : void
CGenPopFloat ( Int32 saved_size ) : void
CGenPopLong ( Int32 saved_size, System.Reg dst ) : void
CGenPushDouble ( ) : Int32
CGenPushDoubleP ( ) : Int32
CGenPushFloat ( ) : Int32
CGenPushFloatP ( ) : Int32
CGenPushLong ( Int32 imm ) : Int32
CGenPushLong ( System.Reg src ) : Int32
CGenShrinkStackBy ( Int32 nbytes ) : void
CGenShrinkStackBy4Bytes ( String comment = "" ) : void
CGenShrinkStackBy8Bytes ( String comment = "" ) : void
CGenState ( ) : System
CGenString ( String str ) : String
CLD ( ) : void
CLTD ( ) : void

CLTD: used before division. clear %edx.

CMPL ( Int32 imm, System.Reg ee ) : void
CMPL ( System.Reg er, System.Reg ee ) : void
CMPL ( String er, String ee ) : void

CMPL: compare based on subtraction. Note that the order is reversed, i.e. ee comp er.

COMM ( String name, Int32 size, Int32 align ) : void
COMMENT ( String comment ) : void
CaseLabel ( Int32 value ) : Int32
DATA ( ) : void
DIVL ( System.Reg er ) : void
DIVL ( String addr ) : void

IDIVL: unsigned division. %eax = %edx:%eax / {addr}.

FADD ( Int32 op1, Int32 op2 ) : void

FADD: calculate %st(op1) + %st(op2) and rewrite %st(op2).

FADDP ( ) : void

FADDP: pop operands from %st(0) and %st(1), push addition result back to %st(0).

FCHS ( ) : void

FCHS: %st(0) = -%st(0)

FDIVP ( ) : void

FDIVP: pop operands from %st(0) and %st(1), push %st(0) / %st(1) back to %st(0).

FLD1 ( ) : void

FLD1: push 1.0 to FPU stack.

FLDL ( Int32 imm, System.Reg from ) : void
FLDL ( String addr ) : void

FLDL: load double to FPU stack.

FLDS ( Int32 imm, System.Reg src ) : void
FLDS ( String src ) : void

FLDS: load float to FPU stack.

FLDZ ( ) : void

FLD0: push 0.0 to FPU stack.

FMULP ( ) : void

FMULP: pop operands from %st(0) and %st(1), push multiplication result back to %st(0).

FSTL ( Int32 imm, System.Reg to ) : void
FSTL ( String addr ) : void

FSTL: store double from FPU stack.

FSTP ( System.Reg dst ) : void
FSTP ( String dst ) : void

FSTP: copy %st(0) to dst, then pop %st(0).

FSTPL ( Int32 imm, System.Reg to ) : void
FSTPL ( String addr ) : void

FSTPL: pop from FPU and store *double*.

FSTPS ( Int32 imm, System.Reg to ) : void
FSTPS ( String addr ) : void

FSTPS: pop float from FPU stack, and store to {addr}.

FSTS ( Int32 imm, System.Reg to ) : void
FSTS ( String addr ) : void

FSTS: store float from FPU stack.

FSUB ( Int32 op1, Int32 op2 ) : void

FADD: calculate %st(op1) + %st(op2) and rewrite %st(op2).

FSUBP ( ) : void

FSUBP: pop operands from %st(0) and %st(1), push %st(0) / %st(1) back to %st(0).

FUCOMIP ( ) : void

FUCOMIP: unordered comparison: %st(0) vs %st(1).

GLOBL ( String name ) : void
GotoLabel ( String label ) : Int32
IDIVL ( System.Reg er ) : void
IDIVL ( String addr ) : void

IDIVL: signed division. %eax = %edx:%eax / {addr}.

IMUL ( System.Reg er ) : void
IMUL ( String addr ) : void

IMUL: signed multiplication. %edx:%eax = %eax * {addr}.

InFunction ( IReadOnlyList goto_labels ) : void
InLoop ( Int32 continue_label, Int32 break_label ) : void
InSwitch ( Int32 break_label, Int32 default_label, Int32>.Dictionary value_to_label ) : void
JMP ( Int32 label ) : void
JNZ ( Int32 label ) : void
JZ ( Int32 label ) : void
LEA ( Int32 offset, System.Reg src, System.Reg dst ) : void
LEA ( String addr, System.Reg dst ) : void
LEA ( String addr, String dst ) : void
LEAVE ( ) : void
LOCAL ( String name ) : void
LONG ( Int32 value ) : void
MOVB ( System.Reg from, Int32 imm, System.Reg to ) : void
MOVB ( System.Reg from, System.Reg to ) : void
MOVB ( String src, String dst ) : void

MOVB: move a byte

MOVL ( Int32 imm, System.Reg dst ) : void
MOVL ( Int32 offset, System.Reg src, System.Reg dst ) : void
MOVL ( Int32 imm, String dst ) : void
MOVL ( System.Reg src, Int32 offset, System.Reg dst ) : void
MOVL ( System.Reg src, System.Reg dst ) : void
MOVL ( String src, System.Reg dst ) : void
MOVL ( String src, String dst ) : void

MOVL: move a 4-byte long

MOVSBL ( Int32 offset, System.Reg src, System.Reg dst ) : void
MOVSBL ( System.Reg src, System.Reg dst ) : void
MOVSBL ( String src, System.Reg dst ) : void
MOVSBL ( String src, String dst ) : void

MOVSBL: move a byte and sign-extend to a 4-byte long

MOVSWL ( Int32 offset, System.Reg from, System.Reg to ) : void
MOVSWL ( System.Reg src, System.Reg dst ) : void
MOVSWL ( String from, System.Reg to ) : void
MOVSWL ( String from, String to ) : void

MOVSWL: move a 2-byte word and sign-extend to a 4-byte long

MOVW ( System.Reg from, Int32 imm, System.Reg to ) : void
MOVW ( String from, String to ) : void

MOVW: move a 2-byte word

MOVZBL ( Int32 offset, System.Reg src, System.Reg dst ) : void
MOVZBL ( System.Reg src, System.Reg dst ) : void
MOVZBL ( String src, System.Reg dst ) : void
MOVZBL ( String src, String dst ) : void

MOVZBL: move a byte and zero-extend to a 4-byte long

MOVZWL ( Int32 offset, System.Reg from, System.Reg to ) : void
MOVZWL ( System.Reg src, System.Reg dst ) : void
MOVZWL ( String from, System.Reg to ) : void
MOVZWL ( String from, String to ) : void

MOVZWL: move a 2-byte word and zero-extend to a 4-byte long

MUL ( System.Reg er ) : void
MUL ( String addr ) : void

MUL: unsigned multiplication. %edx:%eax = %eax * {addr}.

NEG ( System.Reg dst ) : void
NEG ( String addr ) : void

NEG addr: addr = -addr

NEWLINE ( ) : void
NOT ( System.Reg dst ) : void
NOT ( String addr ) : void

NOT: bitwise not

ORL ( System.Reg er, System.Reg ee, String comment = "" ) : void
ORL ( String er, String ee, String comment = "" ) : void

ORL er, ee ee = ee | er

OutFunction ( ) : void
OutLabels ( ) : void
RET ( ) : void
RegToString ( System.Reg reg ) : String
RequestLabel ( ) : Int32
SALL ( System.Reg er, System.Reg ee ) : void
SALL ( String er, String ee ) : void

SALL er, ee ee = ee << er Note that there is only one Kind of lshift.

SARL ( System.Reg er, System.Reg ee ) : void
SARL ( String er, String ee ) : void

SARL er, ee (arithmetic shift) ee = ee >> er (append sign bit)

SETA ( System.Reg dst ) : void
SETA ( String dst ) : void

SETA: set if above (unsigned).

SETB ( System.Reg dst ) : void
SETB ( String dst ) : void

SETB: set if below (unsigned).

SETE ( System.Reg dst ) : void
SETE ( String dst ) : void

SETE: set if equal to.

SETG ( System.Reg dst ) : void
SETG ( String dst ) : void

SETG: set if greater than (signed).

SETGE ( System.Reg dst ) : void
SETGE ( String dst ) : void

SETGE: set if greater or equal to (signed).

SETL ( System.Reg dst ) : void
SETL ( String dst ) : void

SETL: set if less than (signed).

SETLE ( System.Reg dst ) : void
SETLE ( String dst ) : void

SETLE: set if less than or equal to (signed).

SETNA ( System.Reg dst ) : void
SETNA ( String dst ) : void

SETNA: set if not above (unsigned).

SETNB ( System.Reg dst ) : void
SETNB ( String dst ) : void

SETNB: set if not below (unsigned).

SETNE ( System.Reg dst ) : void
SETNE ( String dst ) : void

SETNE: set if not equal to.

SHRL ( Int32 er, System.Reg ee ) : void
SHRL ( System.Reg er, System.Reg ee ) : void
SHRL ( String er, String ee ) : void

SHRL er, ee (logical shift) ee = ee >> er (append 0)

STD ( ) : void
SUBL ( Int32 er, System.Reg ee, String comment = "" ) : void
SUBL ( System.Reg er, System.Reg ee, String comment = "" ) : void
SUBL ( String er, String ee, String comment = "" ) : void

SUBL: subtract long

TESTL ( System.Reg er, System.Reg ee ) : void
TESTL ( String er, String ee ) : void

TESTL: used like testl %eax, %eax: compare %eax with zero.

TEXT ( ) : void
ToString ( ) : String
VALUE ( Int32 value ) : void
XORL ( System.Reg er, System.Reg ee ) : void
XORL ( String er, String ee ) : void

XORL er, ee ee = ee ^ er

ZERO ( Int32 size ) : void

Private Methods

Method Description
FILDL ( Int32 offset, System.Reg dst ) : void
FILDL ( String dst ) : void
FISTL ( Int32 offset, System.Reg dst ) : void
FISTL ( String dst ) : void
POPL ( System.Reg dst ) : void
POPL ( String dst ) : void

POPL: pop long from stack.

POPL changes the size of the stack, which should be tracked carefully. So, POPL is set private. Consider using CGenPopLong

PUSHL ( Int32 imm ) : void
PUSHL ( System.Reg src ) : void
PUSHL ( String src ) : void

PUSHL: push long into stack.

PUSHL changes the size of the stack, which should be tracked carefully. So, PUSHL is set private. Consider using CGenPushLong

SUBL ( Int32 er, String ee, String comment = "" ) : void

Method Details

ADDL() public method

public ADDL ( Int32 er, System.Reg ee, String comment = "" ) : void
er System.Int32
ee System.Reg
comment String
return void

ADDL() public method

public ADDL ( System.Reg er, System.Reg ee, String comment = "" ) : void
er System.Reg
ee System.Reg
comment String
return void

ADDL() public method

ADDL: add long
public ADDL ( String er, String ee, String comment = "" ) : void
er String
ee String
comment String
return void

ALIGN() public method

public ALIGN ( Int32 align ) : void
align System.Int32
return void

ANDB() public method

public ANDB ( Int32 er, System.Reg ee ) : void
er System.Int32
ee System.Reg
return void

ANDB() public method

public ANDB ( String er, String ee ) : void
er String
ee String
return void

ANDL() public method

public ANDL ( Int32 er, System.Reg ee ) : void
er System.Int32
ee System.Reg
return void

ANDL() public method

public ANDL ( System.Reg er, System.Reg ee ) : void
er System.Reg
ee System.Reg
return void

ANDL() public method

ANDL er, ee ee = er & ee
public ANDL ( String er, String ee ) : void
er String
ee String
return void

BYTE() public method

public BYTE ( Int32 value ) : void
value System.Int32
return void

CALL() public method

public CALL ( String addr ) : void
addr String
return void

CGenConvertFloatToLong() public method

public CGenConvertFloatToLong ( ) : void
return void

CGenConvertLongToFloat() public method

public CGenConvertLongToFloat ( ) : void
return void

CGenExpandStackBy() public method

public CGenExpandStackBy ( Int32 nbytes ) : void
nbytes System.Int32
return void

CGenExpandStackBy4Bytes() public method

public CGenExpandStackBy4Bytes ( String comment = "" ) : void
comment String
return void

CGenExpandStackBy8Bytes() public method

public CGenExpandStackBy8Bytes ( String comment = "" ) : void
comment String
return void

CGenExpandStackTo() public method

public CGenExpandStackTo ( Int32 size, String comment = "" ) : void
size System.Int32
comment String
return void

CGenExpandStackWithAlignment() public method

public CGenExpandStackWithAlignment ( Int32 nbytes, Int32 align ) : void
nbytes System.Int32
align System.Int32
return void

CGenForceStackSizeTo() public method

public CGenForceStackSizeTo ( Int32 nbytes ) : void
nbytes System.Int32
return void

CGenFuncStart() public method

public CGenFuncStart ( String name ) : void
name String
return void

CGenLabel() public method

public CGenLabel ( Int32 label ) : void
label System.Int32
return void

CGenLabel() public method

public CGenLabel ( String label ) : void
label String
return void

CGenLongConst() public method

public CGenLongConst ( Int32 val ) : String
val System.Int32
return String

CGenLongLongConst() public method

public CGenLongLongConst ( Int32 lo, Int32 hi ) : String
lo System.Int32
hi System.Int32
return String

CGenMemCpy() public method

Fast Memory Copy using assembly. Make sure that 1) %esi = source address 2) %edi = destination address 3) %ecx = number of bytes
public CGenMemCpy ( ) : void
return void

CGenMemCpyReversed() public method

Fast Memory Copy using assembly. Make sure that 1) %esi = source address 2) %edi = destination address 3) %ecx = number of bytes
public CGenMemCpyReversed ( ) : void
return void

CGenPopDouble() public method

public CGenPopDouble ( Int32 saved_size ) : void
saved_size System.Int32
return void

CGenPopFloat() public method

public CGenPopFloat ( Int32 saved_size ) : void
saved_size System.Int32
return void

CGenPopLong() public method

public CGenPopLong ( Int32 saved_size, System.Reg dst ) : void
saved_size System.Int32
dst System.Reg
return void

CGenPushDouble() public method

public CGenPushDouble ( ) : Int32
return System.Int32

CGenPushDoubleP() public method

public CGenPushDoubleP ( ) : Int32
return System.Int32

CGenPushFloat() public method

public CGenPushFloat ( ) : Int32
return System.Int32

CGenPushFloatP() public method

public CGenPushFloatP ( ) : Int32
return System.Int32

CGenPushLong() public method

public CGenPushLong ( Int32 imm ) : Int32
imm System.Int32
return System.Int32

CGenPushLong() public method

public CGenPushLong ( System.Reg src ) : Int32
src System.Reg
return System.Int32

CGenShrinkStackBy() public method

public CGenShrinkStackBy ( Int32 nbytes ) : void
nbytes System.Int32
return void

CGenShrinkStackBy4Bytes() public method

public CGenShrinkStackBy4Bytes ( String comment = "" ) : void
comment String
return void

CGenShrinkStackBy8Bytes() public method

public CGenShrinkStackBy8Bytes ( String comment = "" ) : void
comment String
return void

CGenState() public method

public CGenState ( ) : System
return System

CGenString() public method

public CGenString ( String str ) : String
str String
return String

CLD() public method

public CLD ( ) : void
return void

CLTD() public method

CLTD: used before division. clear %edx.
public CLTD ( ) : void
return void

CMPL() public method

public CMPL ( Int32 imm, System.Reg ee ) : void
imm System.Int32
ee System.Reg
return void

CMPL() public method

public CMPL ( System.Reg er, System.Reg ee ) : void
er System.Reg
ee System.Reg
return void

CMPL() public method

CMPL: compare based on subtraction. Note that the order is reversed, i.e. ee comp er.
public CMPL ( String er, String ee ) : void
er String
ee String
return void

COMM() public method

public COMM ( String name, Int32 size, Int32 align ) : void
name String
size System.Int32
align System.Int32
return void

COMMENT() public method

public COMMENT ( String comment ) : void
comment String
return void

CaseLabel() public method

public CaseLabel ( Int32 value ) : Int32
value System.Int32
return System.Int32

DATA() public method

public DATA ( ) : void
return void

DIVL() public method

public DIVL ( System.Reg er ) : void
er System.Reg
return void

DIVL() public method

IDIVL: unsigned division. %eax = %edx:%eax / {addr}.
public DIVL ( String addr ) : void
addr String
return void

FADD() public method

FADD: calculate %st(op1) + %st(op2) and rewrite %st(op2).
public FADD ( Int32 op1, Int32 op2 ) : void
op1 System.Int32
op2 System.Int32
return void

FADDP() public method

FADDP: pop operands from %st(0) and %st(1), push addition result back to %st(0).
public FADDP ( ) : void
return void

FCHS() public method

FCHS: %st(0) = -%st(0)
public FCHS ( ) : void
return void

FDIVP() public method

FDIVP: pop operands from %st(0) and %st(1), push %st(0) / %st(1) back to %st(0).
public FDIVP ( ) : void
return void

FLD1() public method

FLD1: push 1.0 to FPU stack.
public FLD1 ( ) : void
return void

FLDL() public method

public FLDL ( Int32 imm, System.Reg from ) : void
imm System.Int32
from System.Reg
return void

FLDL() public method

FLDL: load double to FPU stack.
public FLDL ( String addr ) : void
addr String Address.
return void

FLDS() public method

public FLDS ( Int32 imm, System.Reg src ) : void
imm System.Int32
src System.Reg
return void

FLDS() public method

FLDS: load float to FPU stack.
public FLDS ( String src ) : void
src String
return void

FLDZ() public method

FLD0: push 0.0 to FPU stack.
public FLDZ ( ) : void
return void

FMULP() public method

FMULP: pop operands from %st(0) and %st(1), push multiplication result back to %st(0).
public FMULP ( ) : void
return void

FSTL() public method

public FSTL ( Int32 imm, System.Reg to ) : void
imm System.Int32
to System.Reg
return void

FSTL() public method

FSTL: store double from FPU stack.
public FSTL ( String addr ) : void
addr String
return void

FSTP() public method

public FSTP ( System.Reg dst ) : void
dst System.Reg
return void

FSTP() public method

FSTP: copy %st(0) to dst, then pop %st(0).
public FSTP ( String dst ) : void
dst String
return void

FSTPL() public method

public FSTPL ( Int32 imm, System.Reg to ) : void
imm System.Int32
to System.Reg
return void

FSTPL() public method

FSTPL: pop from FPU and store *double*.
public FSTPL ( String addr ) : void
addr String
return void

FSTPS() public method

public FSTPS ( Int32 imm, System.Reg to ) : void
imm System.Int32
to System.Reg
return void

FSTPS() public method

FSTPS: pop float from FPU stack, and store to {addr}.
public FSTPS ( String addr ) : void
addr String
return void

FSTS() public method

public FSTS ( Int32 imm, System.Reg to ) : void
imm System.Int32
to System.Reg
return void

FSTS() public method

FSTS: store float from FPU stack.
public FSTS ( String addr ) : void
addr String
return void

FSUB() public method

FADD: calculate %st(op1) + %st(op2) and rewrite %st(op2).
public FSUB ( Int32 op1, Int32 op2 ) : void
op1 System.Int32
op2 System.Int32
return void

FSUBP() public method

FSUBP: pop operands from %st(0) and %st(1), push %st(0) / %st(1) back to %st(0).
public FSUBP ( ) : void
return void

FUCOMIP() public method

FUCOMIP: unordered comparison: %st(0) vs %st(1).
public FUCOMIP ( ) : void
return void

GLOBL() public method

public GLOBL ( String name ) : void
name String
return void

GotoLabel() public method

public GotoLabel ( String label ) : Int32
label String
return System.Int32

IDIVL() public method

public IDIVL ( System.Reg er ) : void
er System.Reg
return void

IDIVL() public method

IDIVL: signed division. %eax = %edx:%eax / {addr}.
public IDIVL ( String addr ) : void
addr String
return void

IMUL() public method

public IMUL ( System.Reg er ) : void
er System.Reg
return void

IMUL() public method

IMUL: signed multiplication. %edx:%eax = %eax * {addr}.
public IMUL ( String addr ) : void
addr String
return void

InFunction() public method

public InFunction ( IReadOnlyList goto_labels ) : void
goto_labels IReadOnlyList
return void

InLoop() public method

public InLoop ( Int32 continue_label, Int32 break_label ) : void
continue_label System.Int32
break_label System.Int32
return void

InSwitch() public method

public InSwitch ( Int32 break_label, Int32 default_label, Int32>.Dictionary value_to_label ) : void
break_label System.Int32
default_label System.Int32
value_to_label Int32>.Dictionary
return void

JMP() public method

public JMP ( Int32 label ) : void
label System.Int32
return void

JNZ() public method

public JNZ ( Int32 label ) : void
label System.Int32
return void

JZ() public method

public JZ ( Int32 label ) : void
label System.Int32
return void

LEA() public method

public LEA ( Int32 offset, System.Reg src, System.Reg dst ) : void
offset System.Int32
src System.Reg
dst System.Reg
return void

LEA() public method

public LEA ( String addr, System.Reg dst ) : void
addr String
dst System.Reg
return void

LEA() public method

public LEA ( String addr, String dst ) : void
addr String
dst String
return void

LEAVE() public method

public LEAVE ( ) : void
return void

LOCAL() public method

public LOCAL ( String name ) : void
name String
return void

LONG() public method

public LONG ( Int32 value ) : void
value System.Int32
return void

MOVB() public method

public MOVB ( System.Reg from, Int32 imm, System.Reg to ) : void
from System.Reg
imm System.Int32
to System.Reg
return void

MOVB() public method

public MOVB ( System.Reg from, System.Reg to ) : void
from System.Reg
to System.Reg
return void

MOVB() public method

MOVB: move a byte
public MOVB ( String src, String dst ) : void
src String
dst String
return void

MOVL() public method

public MOVL ( Int32 imm, System.Reg dst ) : void
imm System.Int32
dst System.Reg
return void

MOVL() public method

public MOVL ( Int32 offset, System.Reg src, System.Reg dst ) : void
offset System.Int32
src System.Reg
dst System.Reg
return void

MOVL() public method

public MOVL ( Int32 imm, String dst ) : void
imm System.Int32
dst String
return void

MOVL() public method

public MOVL ( System.Reg src, Int32 offset, System.Reg dst ) : void
src System.Reg
offset System.Int32
dst System.Reg
return void

MOVL() public method

public MOVL ( System.Reg src, System.Reg dst ) : void
src System.Reg
dst System.Reg
return void

MOVL() public method

public MOVL ( String src, System.Reg dst ) : void
src String
dst System.Reg
return void

MOVL() public method

MOVL: move a 4-byte long
public MOVL ( String src, String dst ) : void
src String
dst String
return void

MOVSBL() public method

public MOVSBL ( Int32 offset, System.Reg src, System.Reg dst ) : void
offset System.Int32
src System.Reg
dst System.Reg
return void

MOVSBL() public method

public MOVSBL ( System.Reg src, System.Reg dst ) : void
src System.Reg
dst System.Reg
return void

MOVSBL() public method

public MOVSBL ( String src, System.Reg dst ) : void
src String
dst System.Reg
return void

MOVSBL() public method

MOVSBL: move a byte and sign-extend to a 4-byte long
public MOVSBL ( String src, String dst ) : void
src String
dst String
return void

MOVSWL() public method

public MOVSWL ( Int32 offset, System.Reg from, System.Reg to ) : void
offset System.Int32
from System.Reg
to System.Reg
return void

MOVSWL() public method

public MOVSWL ( System.Reg src, System.Reg dst ) : void
src System.Reg
dst System.Reg
return void

MOVSWL() public method

public MOVSWL ( String from, System.Reg to ) : void
from String
to System.Reg
return void

MOVSWL() public method

MOVSWL: move a 2-byte word and sign-extend to a 4-byte long
public MOVSWL ( String from, String to ) : void
from String
to String
return void

MOVW() public method

public MOVW ( System.Reg from, Int32 imm, System.Reg to ) : void
from System.Reg
imm System.Int32
to System.Reg
return void

MOVW() public method

MOVW: move a 2-byte word
public MOVW ( String from, String to ) : void
from String
to String
return void

MOVZBL() public method

public MOVZBL ( Int32 offset, System.Reg src, System.Reg dst ) : void
offset System.Int32
src System.Reg
dst System.Reg
return void

MOVZBL() public method

public MOVZBL ( System.Reg src, System.Reg dst ) : void
src System.Reg
dst System.Reg
return void

MOVZBL() public method

public MOVZBL ( String src, System.Reg dst ) : void
src String
dst System.Reg
return void

MOVZBL() public method

MOVZBL: move a byte and zero-extend to a 4-byte long
public MOVZBL ( String src, String dst ) : void
src String
dst String
return void

MOVZWL() public method

public MOVZWL ( Int32 offset, System.Reg from, System.Reg to ) : void
offset System.Int32
from System.Reg
to System.Reg
return void

MOVZWL() public method

public MOVZWL ( System.Reg src, System.Reg dst ) : void
src System.Reg
dst System.Reg
return void

MOVZWL() public method

public MOVZWL ( String from, System.Reg to ) : void
from String
to System.Reg
return void

MOVZWL() public method

MOVZWL: move a 2-byte word and zero-extend to a 4-byte long
public MOVZWL ( String from, String to ) : void
from String
to String
return void

MUL() public method

public MUL ( System.Reg er ) : void
er System.Reg
return void

MUL() public method

MUL: unsigned multiplication. %edx:%eax = %eax * {addr}.
public MUL ( String addr ) : void
addr String
return void

NEG() public method

public NEG ( System.Reg dst ) : void
dst System.Reg
return void

NEG() public method

NEG addr: addr = -addr
public NEG ( String addr ) : void
addr String
return void

NEWLINE() public method

public NEWLINE ( ) : void
return void

NOT() public method

public NOT ( System.Reg dst ) : void
dst System.Reg
return void

NOT() public method

NOT: bitwise not
public NOT ( String addr ) : void
addr String
return void

ORL() public method

public ORL ( System.Reg er, System.Reg ee, String comment = "" ) : void
er System.Reg
ee System.Reg
comment String
return void

ORL() public method

ORL er, ee ee = ee | er
public ORL ( String er, String ee, String comment = "" ) : void
er String
ee String
comment String
return void

OutFunction() public method

public OutFunction ( ) : void
return void

OutLabels() public method

public OutLabels ( ) : void
return void

RET() public method

public RET ( ) : void
return void

RegToString() public static method

public static RegToString ( System.Reg reg ) : String
reg System.Reg
return String

RequestLabel() public method

public RequestLabel ( ) : Int32
return System.Int32

SALL() public method

public SALL ( System.Reg er, System.Reg ee ) : void
er System.Reg
ee System.Reg
return void

SALL() public method

SALL er, ee ee = ee << er Note that there is only one Kind of lshift.
public SALL ( String er, String ee ) : void
er String
ee String
return void

SARL() public method

public SARL ( System.Reg er, System.Reg ee ) : void
er System.Reg
ee System.Reg
return void

SARL() public method

SARL er, ee (arithmetic shift) ee = ee >> er (append sign bit)
public SARL ( String er, String ee ) : void
er String
ee String
return void

SETA() public method

public SETA ( System.Reg dst ) : void
dst System.Reg
return void

SETA() public method

SETA: set if above (unsigned).
public SETA ( String dst ) : void
dst String
return void

SETB() public method

public SETB ( System.Reg dst ) : void
dst System.Reg
return void

SETB() public method

SETB: set if below (unsigned).
public SETB ( String dst ) : void
dst String
return void

SETE() public method

public SETE ( System.Reg dst ) : void
dst System.Reg
return void

SETE() public method

SETE: set if equal to.
public SETE ( String dst ) : void
dst String
return void

SETG() public method

public SETG ( System.Reg dst ) : void
dst System.Reg
return void

SETG() public method

SETG: set if greater than (signed).
public SETG ( String dst ) : void
dst String
return void

SETGE() public method

public SETGE ( System.Reg dst ) : void
dst System.Reg
return void

SETGE() public method

SETGE: set if greater or equal to (signed).
public SETGE ( String dst ) : void
dst String
return void

SETL() public method

public SETL ( System.Reg dst ) : void
dst System.Reg
return void

SETL() public method

SETL: set if less than (signed).
public SETL ( String dst ) : void
dst String
return void

SETLE() public method

public SETLE ( System.Reg dst ) : void
dst System.Reg
return void

SETLE() public method

SETLE: set if less than or equal to (signed).
public SETLE ( String dst ) : void
dst String
return void

SETNA() public method

public SETNA ( System.Reg dst ) : void
dst System.Reg
return void

SETNA() public method

SETNA: set if not above (unsigned).
public SETNA ( String dst ) : void
dst String
return void

SETNB() public method

public SETNB ( System.Reg dst ) : void
dst System.Reg
return void

SETNB() public method

SETNB: set if not below (unsigned).
public SETNB ( String dst ) : void
dst String
return void

SETNE() public method

public SETNE ( System.Reg dst ) : void
dst System.Reg
return void

SETNE() public method

SETNE: set if not equal to.
public SETNE ( String dst ) : void
dst String
return void

SHRL() public method

public SHRL ( Int32 er, System.Reg ee ) : void
er System.Int32
ee System.Reg
return void

SHRL() public method

public SHRL ( System.Reg er, System.Reg ee ) : void
er System.Reg
ee System.Reg
return void

SHRL() public method

SHRL er, ee (logical shift) ee = ee >> er (append 0)
public SHRL ( String er, String ee ) : void
er String
ee String
return void

STD() public method

public STD ( ) : void
return void

SUBL() public method

public SUBL ( Int32 er, System.Reg ee, String comment = "" ) : void
er System.Int32
ee System.Reg
comment String
return void

SUBL() public method

public SUBL ( System.Reg er, System.Reg ee, String comment = "" ) : void
er System.Reg
ee System.Reg
comment String
return void

SUBL() public method

SUBL: subtract long
public SUBL ( String er, String ee, String comment = "" ) : void
er String
ee String
comment String
return void

TESTL() public method

public TESTL ( System.Reg er, System.Reg ee ) : void
er System.Reg
ee System.Reg
return void

TESTL() public method

TESTL: used like testl %eax, %eax: compare %eax with zero.
public TESTL ( String er, String ee ) : void
er String
ee String
return void

TEXT() public method

public TEXT ( ) : void
return void

ToString() public method

public ToString ( ) : String
return String

VALUE() public method

public VALUE ( Int32 value ) : void
value System.Int32
return void

XORL() public method

public XORL ( System.Reg er, System.Reg ee ) : void
er System.Reg
ee System.Reg
return void

XORL() public method

XORL er, ee ee = ee ^ er
public XORL ( String er, String ee ) : void
er String
ee String
return void

ZERO() public method

public ZERO ( Int32 size ) : void
size System.Int32
return void

Property Details

label_idx public_oe property

public Int32,System label_idx
return System.Int32

reg_strs public_oe static_oe property

public static Dictionary reg_strs
return String>.Dictionary