TempleOSTS_130315.ISO
This commit is contained in:
1 parent
e57428affb
commit
17b71f1a2d
958 files changed
+26043
-15907
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,694 @@
|
||||
asm {
|
||||
USE64
|
||||
CMP_OPT_NOP:
|
||||
#assert CIntermediateCode.ic_opcode==0
|
||||
DU16 IC_NOP; //Must be at CIntermediateCode.ic_opcode offset
|
||||
DU8 sizeof(CIntermediateCode)-2 DUP(0);
|
||||
|
||||
// ************************************
|
||||
_OPTNEXT::
|
||||
ENTER 0
|
||||
PUSH RDI
|
||||
MOV RCX,U64 SF_ARG1[RBP]
|
||||
MOV RDX,U64 SF_ARG2[RBP]
|
||||
|
||||
MOV RAX,U64 16[RDX]
|
||||
MOV U64 24[RDX],RAX
|
||||
MOV RAX,U64 8[RDX]
|
||||
MOV U64 16[RDX],RAX
|
||||
MOV RAX,U64 [RDX]
|
||||
MOV U64 8[RDX],RAX
|
||||
MOV U64 [RDX],RCX
|
||||
|
||||
MOV RDI,RDX
|
||||
|
||||
MOV RAX,RCX
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_END_EXP
|
||||
JBE @@05
|
||||
STOSQ
|
||||
|
||||
@@05: MOV RAX,U64 8[RDX]
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_END_EXP
|
||||
JBE @@10
|
||||
STOSQ
|
||||
|
||||
@@10: MOV RAX,U64 16[RDX]
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_END_EXP
|
||||
JBE @@15
|
||||
STOSQ
|
||||
|
||||
@@15: MOV RAX,U64 24[RDX]
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_END_EXP
|
||||
JBE @@20
|
||||
STOSQ
|
||||
|
||||
@@20: MOV RAX,CMP_OPT_NOP
|
||||
ADD RDX,32
|
||||
JMP @@30
|
||||
|
||||
@@25: STOSQ
|
||||
@@30: CMP RDI,RDX
|
||||
JB @@25
|
||||
|
||||
POP RDI
|
||||
LEAVE
|
||||
RET1 16
|
||||
// ************************************
|
||||
_OPTNEXT2::
|
||||
ENTER 0
|
||||
PUSH RDI
|
||||
MOV RCX,U64 SF_ARG1[RBP]
|
||||
MOV RDX,U64 SF_ARG2[RBP]
|
||||
|
||||
MOV RAX,U64 16[RDX]
|
||||
MOV U64 24[RDX],RAX
|
||||
MOV RAX,U64 8[RDX]
|
||||
MOV U64 16[RDX],RAX
|
||||
MOV RAX,U64 [RDX]
|
||||
MOV U64 8[RDX],RAX
|
||||
MOV U64 [RDX],RCX
|
||||
|
||||
MOV RDI,RDX
|
||||
|
||||
MOV RAX,RCX
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_END_EXP
|
||||
JB @@05
|
||||
STOSQ
|
||||
|
||||
@@05: MOV RAX,U64 8[RDX]
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_END_EXP
|
||||
JB @@10
|
||||
STOSQ
|
||||
|
||||
@@10: MOV RAX,U64 16[RDX]
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_END_EXP
|
||||
JB @@15
|
||||
STOSQ
|
||||
|
||||
@@15: MOV RAX,U64 24[RDX]
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_END_EXP
|
||||
JB @@20
|
||||
STOSQ
|
||||
|
||||
@@20: MOV RAX,CMP_OPT_NOP
|
||||
ADD RDX,32
|
||||
JMP @@30
|
||||
|
||||
@@25: STOSQ
|
||||
@@30: CMP RDI,RDX
|
||||
JB @@25
|
||||
|
||||
POP RDI
|
||||
LEAVE
|
||||
RET1 16
|
||||
|
||||
// ************************************
|
||||
_OPTNEXT3::
|
||||
ENTER 0
|
||||
PUSH RDI
|
||||
MOV RCX,U64 SF_ARG1[RBP]
|
||||
MOV RDX,U64 SF_ARG2[RBP]
|
||||
|
||||
MOV RAX,U64 16[RDX]
|
||||
MOV U64 24[RDX],RAX
|
||||
MOV RAX,U64 8[RDX]
|
||||
MOV U64 16[RDX],RAX
|
||||
MOV RAX,U64 [RDX]
|
||||
MOV U64 8[RDX],RAX
|
||||
MOV U64 [RDX],RCX
|
||||
|
||||
MOV RDI,RDX
|
||||
|
||||
MOV RAX,RCX
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_END_EXP
|
||||
JB @@05
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_NOP1
|
||||
JE @@05
|
||||
STOSQ
|
||||
|
||||
@@05: MOV RAX,U64 8[RDX]
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_END_EXP
|
||||
JB @@10
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_NOP1
|
||||
JE @@10
|
||||
STOSQ
|
||||
|
||||
@@10: MOV RAX,U64 16[RDX]
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_END_EXP
|
||||
JB @@15
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_NOP1
|
||||
JE @@15
|
||||
STOSQ
|
||||
|
||||
@@15: MOV RAX,U64 24[RDX]
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_END_EXP
|
||||
JB @@20
|
||||
CMP U16 CIntermediateCode.ic_opcode[RAX],IC_NOP1
|
||||
JE @@20
|
||||
STOSQ
|
||||
|
||||
@@20: MOV RAX,CMP_OPT_NOP
|
||||
ADD RDX,32
|
||||
JMP @@30
|
||||
|
||||
@@25: STOSQ
|
||||
@@30: CMP RDI,RDX
|
||||
JB @@25
|
||||
|
||||
POP RDI
|
||||
LEAVE
|
||||
RET1 16
|
||||
|
||||
// ************************************
|
||||
CMP_TEMPLATES::
|
||||
DU32 @@05,@@10,@@15,@@25,@@30,
|
||||
@@35,@@40,@@45,@@55,@@60,
|
||||
@@75,@@80,@@85,@@90,@@95,
|
||||
@@100,@@105,@@110,@@115,@@125,
|
||||
@@135;
|
||||
|
||||
@@05: //INC
|
||||
PUSH RAX
|
||||
FLD1
|
||||
FADD ST0,U64 [RSP]
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@10: //DEC
|
||||
PUSH RAX
|
||||
FLD1
|
||||
FSUBR ST0,U64 [RSP]
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@15: //MOD
|
||||
PUSH RDX
|
||||
PUSH RAX
|
||||
MOV RBX,RSP
|
||||
FLD U64 [RBX]
|
||||
FLD U64 8[RBX]
|
||||
@@20: FPREM
|
||||
FSTSW
|
||||
TEST AX,0x400
|
||||
JNZ @@20
|
||||
FSTP U64 [RBX]
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
POP RAX
|
||||
ADD RSP,8
|
||||
|
||||
@@25: //LESS
|
||||
PUSH RDX
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FLD U64 8[RSP]
|
||||
FCOMIP ST0,ST1
|
||||
MOV RAX,0
|
||||
ADC RAX,0
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,16
|
||||
|
||||
@@30: //GREATER
|
||||
PUSH RDX
|
||||
PUSH RAX
|
||||
FLD U64 8[RSP]
|
||||
FLD U64 [RSP]
|
||||
FCOMIP ST0,ST1
|
||||
MOV RAX,0
|
||||
ADC RAX,0
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,16
|
||||
|
||||
@@35: //LESS_EQUAL
|
||||
PUSH RDX
|
||||
PUSH RAX
|
||||
FLD U64 8[RSP]
|
||||
FLD U64 [RSP]
|
||||
FCOMIP ST0,ST1
|
||||
MOV RAX,1
|
||||
SBB RAX,0
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,16
|
||||
|
||||
@@40: //GREATER_EQUAL
|
||||
PUSH RDX
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FLD U64 8[RSP]
|
||||
FCOMIP ST0,ST1
|
||||
MOV RAX,1
|
||||
SBB RAX,0
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,16
|
||||
|
||||
@@45: //StrLen
|
||||
MOV RDX,RAX
|
||||
@@50: MOV BL,U8 [RAX]
|
||||
INC RAX
|
||||
OR BL,BL
|
||||
JNZ @@50
|
||||
SUB RAX,RDX
|
||||
DEC RAX
|
||||
|
||||
@@55: //RDTSC
|
||||
RDTSC
|
||||
SHL RDX,32
|
||||
ADD RAX,RDX
|
||||
|
||||
@@60: //SignI64
|
||||
OR RAX,RAX
|
||||
JZ @@70
|
||||
JS @@65
|
||||
MOV RAX,1
|
||||
JMP @@70
|
||||
@@65: MOV RAX,-1
|
||||
@@70:
|
||||
@@75:
|
||||
@@80:
|
||||
@@85:
|
||||
MOV EAX,HPET_MAIN_CNT
|
||||
MOV RAX,U64 [RAX]
|
||||
|
||||
@@90: //Sqr
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FMUL ST0,ST0
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@95: //Abs
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FABS
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@100: //Sqrt
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FSQRT
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@105: //Sin
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FSIN
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@110: //Cos
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FCOS
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@115: //Tan
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
@@120: FPTAN
|
||||
FSTSW
|
||||
TEST AX,0x400
|
||||
JNZ @@120
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@125: //Atan
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FLD1
|
||||
@@130: FPATAN
|
||||
FSTSW
|
||||
TEST AX,0x400
|
||||
JNZ @@130
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@135:
|
||||
|
||||
// ************************************
|
||||
CMP_TEMPLATES_DONT_POP::
|
||||
DU32 @@05,@@10,@@15,@@20,@@25,
|
||||
@@30,@@35,@@40,@@45,@@50,
|
||||
@@55,@@60,@@65,@@70,@@75,
|
||||
@@80,@@85,@@90,@@95,@@105,
|
||||
@@115;
|
||||
|
||||
@@05: //INC
|
||||
PUSH RAX
|
||||
FLD1
|
||||
FADD ST0,U64 [RSP]
|
||||
FST U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@10: //DEC
|
||||
PUSH RAX
|
||||
FLD1
|
||||
FSUBR ST0,U64 [RSP]
|
||||
FST U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@15:
|
||||
@@20:
|
||||
@@25:
|
||||
@@30:
|
||||
@@35:
|
||||
@@40:
|
||||
@@45:
|
||||
@@50:
|
||||
@@55:
|
||||
@@60:
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
ADD RSP,8
|
||||
@@65:
|
||||
|
||||
@@70: //Sqr
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FMUL ST0,ST0
|
||||
ADD RSP,8
|
||||
|
||||
@@75: //Abs
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FABS
|
||||
ADD RSP,8
|
||||
|
||||
@@80: //Sqrt
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FSQRT
|
||||
ADD RSP,8
|
||||
|
||||
@@85: //Sin
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FSIN
|
||||
ADD RSP,8
|
||||
|
||||
@@90: //Cos
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FCOS
|
||||
ADD RSP,8
|
||||
|
||||
@@95: //Tan
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
@@100: FPTAN
|
||||
FSTSW
|
||||
TEST AX,0x400
|
||||
JNZ @@100
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,8
|
||||
|
||||
@@105: //Atan
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FLD1
|
||||
@@110: FPATAN
|
||||
FSTSW
|
||||
TEST AX,0x400
|
||||
JNZ @@110
|
||||
ADD RSP,8
|
||||
@@115:
|
||||
|
||||
// ************************************
|
||||
CMP_TEMPLATES_DONT_PUSH::
|
||||
DU32 @@05,@@10,@@15,@@20,@@30,
|
||||
@@35,@@40,@@50,@@55,@@60,
|
||||
@@65,@@70,@@75,@@80,@@85,
|
||||
@@90,@@95,@@100,@@105,@@115,
|
||||
@@125;
|
||||
|
||||
@@05: //INC
|
||||
SUB RSP,8
|
||||
FLD1
|
||||
FADDP ST1,ST0
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@10: //DEC
|
||||
SUB RSP,8
|
||||
FLD1
|
||||
FSUBP ST1,ST0
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@15:
|
||||
@@20: //LESS
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FCOMIP ST0,ST1
|
||||
MOV RAX,0
|
||||
JZ @@25
|
||||
MOV RAX,1
|
||||
SBB RAX,0
|
||||
@@25: FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,8
|
||||
|
||||
@@30: //GREATER
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FCOMIP ST0,ST1
|
||||
MOV RAX,0
|
||||
ADC RAX,0
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,8
|
||||
|
||||
@@35: //LESS_EQUAL
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FCOMIP ST0,ST1
|
||||
MOV RAX,1
|
||||
SBB RAX,0
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,8
|
||||
|
||||
@@40: //GREATER_EQUAL
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FCOMIP ST0,ST1
|
||||
MOV RAX,1
|
||||
JZ @@45
|
||||
MOV RAX,0
|
||||
ADC RAX,0
|
||||
@@45: FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,8
|
||||
@@50:
|
||||
@@55:
|
||||
@@60:
|
||||
@@65: //FSTP
|
||||
SUB RSP,8
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
@@70:
|
||||
@@75:
|
||||
@@80: //Sqr
|
||||
SUB RSP,8
|
||||
FMUL ST0,ST0
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@85: //Abs
|
||||
SUB RSP,8
|
||||
FABS
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@90: //Sqrt
|
||||
SUB RSP,8
|
||||
FSQRT
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@95: //Sin
|
||||
SUB RSP,8
|
||||
FSIN
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@100: //Cos
|
||||
SUB RSP,8
|
||||
FCOS
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@105: //Tan
|
||||
SUB RSP,8
|
||||
@@110: FPTAN
|
||||
FSTSW
|
||||
TEST AX,0x400
|
||||
JNZ @@110
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@115: //Atan
|
||||
SUB RSP,8
|
||||
FLD1
|
||||
@@120: FPATAN
|
||||
FSTSW
|
||||
TEST AX,0x400
|
||||
JNZ @@120
|
||||
FSTP U64 [RSP]
|
||||
POP RAX
|
||||
@@125:
|
||||
|
||||
// ************************************
|
||||
CMP_TEMPLATES_DONT_PUSH_POP::
|
||||
DU32 @@05,@@10,@@15,@@20,@@25,
|
||||
@@30,@@35,@@40,@@45,@@50,
|
||||
@@55,@@60,@@65,@@70,@@75,
|
||||
@@80,@@85,@@90,@@95,@@100,
|
||||
@@110;
|
||||
|
||||
@@05: //INC
|
||||
SUB RSP,8
|
||||
FLD1
|
||||
FADDP ST1,ST0
|
||||
FST U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@10: //DEC
|
||||
SUB RSP,8
|
||||
FLD1
|
||||
FSUBP ST1,ST0
|
||||
FST U64 [RSP]
|
||||
POP RAX
|
||||
|
||||
@@15:
|
||||
@@20:
|
||||
@@25:
|
||||
@@30:
|
||||
@@35:
|
||||
@@40:
|
||||
@@45:
|
||||
@@50:
|
||||
@@55:
|
||||
@@60:
|
||||
@@65:
|
||||
@@70: //Sqr
|
||||
FMUL ST0,ST0
|
||||
|
||||
@@75: //Abs
|
||||
FABS
|
||||
|
||||
@@80: //Sqrt
|
||||
FSQRT
|
||||
|
||||
@@85: //Sin
|
||||
FSIN
|
||||
|
||||
@@90: //Cos
|
||||
FCOS
|
||||
|
||||
@@95: //Tan
|
||||
FPTAN
|
||||
FSTSW
|
||||
TEST AX,0x400
|
||||
JNZ @@95
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
|
||||
@@100: //Atan
|
||||
FLD1
|
||||
@@105: FPATAN
|
||||
FSTSW
|
||||
TEST AX,0x400
|
||||
JNZ @@105
|
||||
@@110:
|
||||
|
||||
// ************************************
|
||||
CMP_TEMPLATES_DONT_PUSH2::
|
||||
DU32 @@05,@@10,@@15,@@20,@@25,
|
||||
@@35,@@45,@@50,@@55,@@60,
|
||||
@@65,@@70,@@75,@@80,@@85,
|
||||
@@90,@@95,@@100,@@105,@@110,
|
||||
@@115;
|
||||
|
||||
@@05:
|
||||
@@10:
|
||||
|
||||
@@15:
|
||||
@@20: //LESS
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FCOMIP ST0,ST1
|
||||
MOV RAX,0
|
||||
ADC RAX,0
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,8
|
||||
|
||||
@@25: //GREATER
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FCOMIP ST0,ST1
|
||||
MOV RAX,0
|
||||
JZ @@30
|
||||
MOV RAX,1
|
||||
SBB RAX,0
|
||||
@@30: FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,8
|
||||
|
||||
@@35: //LESS_EQUAL
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FCOMIP ST0,ST1
|
||||
MOV RAX,1
|
||||
JZ @@40
|
||||
MOV RAX,0
|
||||
ADC RAX,0
|
||||
@@40: FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,8
|
||||
|
||||
@@45: //GREATER_EQUAL
|
||||
PUSH RAX
|
||||
FLD U64 [RSP]
|
||||
FCOMIP ST0,ST1
|
||||
MOV RAX,1
|
||||
SBB RAX,0
|
||||
FFREE ST0
|
||||
FINCSTP
|
||||
ADD RSP,8
|
||||
@@50:
|
||||
@@55:
|
||||
@@60:
|
||||
@@65:
|
||||
@@70:
|
||||
@@75:
|
||||
@@80:
|
||||
@@85:
|
||||
@@90:
|
||||
@@95:
|
||||
@@100:
|
||||
@@105:
|
||||
@@110:
|
||||
@@115:
|
||||
}
|
||||
|
||||
_extern _OPTNEXT Bool OptNext(CIntermediateCode *tempi,
|
||||
CIntermediateCode **temp_lag);
|
||||
|
||||
_extern _OPTNEXT2 Bool OptNext2(CIntermediateCode *tempi,
|
||||
CIntermediateCode **temp_lag);
|
||||
|
||||
_extern _OPTNEXT3 Bool OptNext3(CIntermediateCode *tempi,
|
||||
CIntermediateCode **temp_lag);
|
||||
@@ -0,0 +1,401 @@
|
||||
//Intermediate compiler codes
|
||||
#define IC_END 0x00
|
||||
#define IC_START 0x01
|
||||
#define IC_NOP 0x02
|
||||
#define IC_END_EXP 0x03
|
||||
#define IC_NOP1 0x04
|
||||
#define IC_LABEL 0x05
|
||||
#define IC_CALL_START 0x06
|
||||
#define IC_CALL_END 0x07
|
||||
#define IC_CALL_END2 0x08
|
||||
#define IC_RETURN_VAL 0x09
|
||||
#define IC_RETURN_VAL2 0x0A
|
||||
#define IC_IMM 0x0B
|
||||
#define IC_F64 0x0C
|
||||
#define IC_STR_CONST 0x0D
|
||||
#define IC_ABS_ADDR 0x0E
|
||||
#define IC_ADDR_IMPORT 0x0F
|
||||
#define IC_HEAP_GLBL 0x10
|
||||
#define IC_SIZEOF 0x11
|
||||
#define IC_TYPE 0x12
|
||||
#define IC_GET_LABEL 0x13
|
||||
#define IC_RBP 0x14
|
||||
#define IC_REG 0x15
|
||||
#define IC_FS 0x16
|
||||
#define IC_MOV_FS 0x17
|
||||
#define IC_GS 0x18
|
||||
#define IC_MOV_GS 0x19
|
||||
|
||||
#define IC_LEA 0x1A
|
||||
#define IC_MOV 0x1B
|
||||
|
||||
#define IC_TO_I64 0x1C
|
||||
#define IC_TO_F64 0x1D
|
||||
#define IC_TO_BOOL 0x1E
|
||||
#define IC_TOUPPER 0x1F
|
||||
#define IC_NATIVE_TYPECAST 0x20
|
||||
|
||||
#define IC_ADDR 0x21
|
||||
#define IC_COM 0x22
|
||||
#define IC_NOT 0x23
|
||||
#define IC_UNARY_MINUS 0x24
|
||||
|
||||
#define IC_DEREF 0x25
|
||||
#define IC_DEREF_PP 0x26
|
||||
#define IC_DEREF_MM 0x27
|
||||
#define IC__PP 0x28
|
||||
#define IC__MM 0x29
|
||||
#define IC_PP_ 0x2A
|
||||
#define IC_MM_ 0x2B
|
||||
|
||||
#define IC_SHL 0x2C
|
||||
#define IC_SHR 0x2D
|
||||
#define IC_SHL_CONST 0x2E
|
||||
#define IC_SHR_CONST 0x2F
|
||||
#define IC_POWER 0x30
|
||||
|
||||
#define IC_MUL 0x31
|
||||
#define IC_DIV 0x32
|
||||
#define IC_MOD 0x33
|
||||
|
||||
#define IC_AND 0x34
|
||||
|
||||
#define IC_OR 0x35
|
||||
#define IC_XOR 0x36
|
||||
|
||||
#define IC_ADD 0x37
|
||||
#define IC_SUB 0x38
|
||||
#define IC_ADD_CONST 0x39
|
||||
#define IC_SUB_CONST 0x3A
|
||||
|
||||
#define IC_EQUAL_EQUAL 0x3B
|
||||
#define IC_NOT_EQUAL 0x3C
|
||||
#define IC_LESS 0x3D
|
||||
#define IC_GREATER 0x3E
|
||||
#define IC_LESS_EQUAL 0x3F
|
||||
#define IC_GREATER_EQUAL 0x40
|
||||
#define IC_PUSH_CMP 0x41
|
||||
|
||||
#define IC_AND_AND 0x42
|
||||
|
||||
#define IC_OR_OR 0x43
|
||||
#define IC_XOR_XOR 0x44
|
||||
|
||||
#define IC_COLON 0x45
|
||||
#define IC_QUESTION 0x46
|
||||
|
||||
#define IC_ASSIGN 0x47
|
||||
#define IC_ASSIGN_PP 0x48
|
||||
#define IC_ASSIGN_MM 0x49
|
||||
|
||||
#define IC_SHL_EQUAL 0x4A
|
||||
#define IC_SHR_EQUAL 0x4B
|
||||
#define IC_MUL_EQUAL 0x4C
|
||||
#define IC_DIV_EQUAL 0x4D
|
||||
#define IC_MOD_EQUAL 0x4E
|
||||
#define IC_AND_EQUAL 0x4F
|
||||
#define IC_OR_EQUAL 0x50
|
||||
#define IC_XOR_EQUAL 0x51
|
||||
#define IC_ADD_EQUAL 0x52
|
||||
#define IC_SUB_EQUAL 0x53
|
||||
|
||||
#define IC_JMP 0x54
|
||||
#define IC_SWITCH 0x55
|
||||
#define IC_NOBOUND_SWITCH 0x56
|
||||
|
||||
#define IC_ADD_RSP 0x57
|
||||
#define IC_ADD_RSP1 0x58
|
||||
#define IC_ENTER 0x59
|
||||
#define IC_PUSH_REGS 0x5A
|
||||
#define IC_POP_REGS 0x5B
|
||||
#define IC_LEAVE 0x5C
|
||||
#define IC_RET 0x5D
|
||||
|
||||
#define IC_CALL 0x5E
|
||||
#define IC_CALL_INDIRECT 0x5F
|
||||
#define IC_CALL_INDIRECT2 0x60
|
||||
#define IC_CALL_IMPORT 0x61
|
||||
#define IC_CALL_EXTERN 0x62
|
||||
#define IC_IRQ 0x63
|
||||
|
||||
#define IC_ASM 0x64
|
||||
#define IC_CLI 0x65
|
||||
#define IC_STI 0x66
|
||||
#define IC_PREEMPT 0x67
|
||||
#define IC_CLD 0x68
|
||||
#define IC_STD 0x69
|
||||
#define IC_HLT 0x6A
|
||||
#define IC_PUSH 0x6B
|
||||
#define IC_POP 0x6C
|
||||
#define IC_PUSHFD 0x6D
|
||||
#define IC_POPFD 0x6E
|
||||
#define IC_PAUSE 0x6F
|
||||
|
||||
#define IC_CLFLUSH 0x70
|
||||
#define IC_INVLPG 0x71
|
||||
|
||||
#define IC_INU8 0x72
|
||||
#define IC_INU16 0x73
|
||||
#define IC_INU32 0x74
|
||||
#define IC_OUTU8 0x75
|
||||
#define IC_OUTU16 0x76
|
||||
#define IC_OUTU32 0x77
|
||||
|
||||
#define IC_GET_FLAGS 0x78
|
||||
#define IC_CARRY 0x79
|
||||
#define IC_SET_FLAGS 0x7A
|
||||
#define IC_GET_RAX 0x7B
|
||||
#define IC_SET_RAX 0x7C
|
||||
#define IC_GET_BASE_PTR 0x7D
|
||||
#define IC_SET_BASE_PTR 0x7E
|
||||
#define IC_GET_STK_PTR 0x7F
|
||||
#define IC_SET_STK_PTR 0x80
|
||||
#define IC_RIP 0x81
|
||||
|
||||
#define IC_RDTSC 0x82
|
||||
#define IC_HPET 0x83
|
||||
|
||||
#define IC_BT 0x84
|
||||
#define IC_BTS 0x85
|
||||
#define IC_BTR 0x86
|
||||
#define IC_BTC 0x87
|
||||
#define IC_BEQU 0x88
|
||||
#define IC_LBTS 0x89
|
||||
#define IC_LBTR 0x8A
|
||||
#define IC_LBTC 0x8B
|
||||
#define IC_LBEQU 0x8C
|
||||
#define IC_BSF 0x8D
|
||||
#define IC_BSR 0x8E
|
||||
|
||||
#define IC_QUE_INIT 0x8F
|
||||
#define IC_QUE_INS 0x90
|
||||
#define IC_QUE_INS_REV 0x91
|
||||
#define IC_QUE_REM 0x92
|
||||
|
||||
#define IC_STRLEN 0x93
|
||||
#define IC_MEMCPY 0x94
|
||||
|
||||
#define IC_MEMSET 0x95
|
||||
#define IC_MEMSET_U16 0x96
|
||||
#define IC_MEMSET_U32 0x97
|
||||
#define IC_MEMSET_U64 0x98
|
||||
|
||||
#define IC_BR_ZERO 0x99
|
||||
#define IC_BR_NOT_ZERO 0x9A
|
||||
|
||||
#define IC_BR_NOT_EQUAL 0x9B
|
||||
#define IC_BR_EQUAL_EQUAL 0x9C
|
||||
#define IC_BR_GREATER_EQUAL 0x9D
|
||||
#define IC_BR_LESS_EQUAL 0x9E
|
||||
#define IC_BR_GREATER 0x9F
|
||||
#define IC_BR_LESS 0xA0
|
||||
#define IC_BR_NOT_EQUAL2 0xA1
|
||||
#define IC_BR_EQUAL_EQUAL2 0xA2
|
||||
#define IC_BR_GREATER_EQUAL2 0xA3
|
||||
#define IC_BR_LESS_EQUAL2 0xA4
|
||||
#define IC_BR_GREATER2 0xA5
|
||||
#define IC_BR_LESS2 0xA6
|
||||
#define IC_BR_AND_ZERO 0xA7
|
||||
#define IC_BR_AND_NOT_ZERO 0xA8
|
||||
#define IC_BR_MM_ZERO 0xA9
|
||||
#define IC_BR_MM_NOT_ZERO 0xAA
|
||||
#define IC_BR_AND_AND_ZERO 0xAB
|
||||
#define IC_BR_AND_AND_NOT_ZERO 0xAC
|
||||
#define IC_BR_OR_OR_ZERO 0xAD
|
||||
#define IC_BR_OR_OR_NOT_ZERO 0xAE
|
||||
|
||||
#define IC_BR_BT 0xAF
|
||||
#define IC_BR_BTS 0xB0
|
||||
#define IC_BR_BTR 0xB1
|
||||
#define IC_BR_BTC 0xB2
|
||||
#define IC_BR_LBTS 0xB3
|
||||
#define IC_BR_LBTR 0xB4
|
||||
#define IC_BR_LBTC 0xB5
|
||||
#define IC_BR_NOT_BT 0xB6
|
||||
#define IC_BR_NOT_BTS 0xB7
|
||||
#define IC_BR_NOT_BTR 0xB8
|
||||
#define IC_BR_NOT_BTC 0xB9
|
||||
#define IC_BR_NOT_LBTS 0xBA
|
||||
#define IC_BR_NOT_LBTR 0xBB
|
||||
#define IC_BR_NOT_LBTC 0xBC
|
||||
|
||||
#define IC_SWAP_U8 0xBD
|
||||
#define IC_SWAP_U16 0xBE
|
||||
#define IC_SWAP_U32 0xBF
|
||||
#define IC_SWAP_U64 0xC0
|
||||
|
||||
#define IC_ABS_I64 0xC1
|
||||
#define IC_SIGN_I64 0xC2
|
||||
#define IC_MIN_I64 0xC3
|
||||
#define IC_MIN_U64 0xC4
|
||||
#define IC_MAX_I64 0xC5
|
||||
#define IC_MAX_U64 0xC6
|
||||
#define IC_LIMIT_I64 0xC7
|
||||
#define IC_LIMIT_U64 0xC8
|
||||
#define IC_MOD_U64 0xC9
|
||||
#define IC_SQR_I64 0xCA
|
||||
#define IC_SQR_U64 0xCB
|
||||
#define IC_SQR 0xCC
|
||||
#define IC_ABS 0xCD
|
||||
#define IC_SQRT 0xCE
|
||||
#define IC_SIN 0xCF
|
||||
#define IC_COS 0xD0
|
||||
#define IC_TAN 0xD1
|
||||
#define IC_ATAN 0xD2
|
||||
#define IC_NUM_ENTRIES 0xD3
|
||||
//Don't forget $LK,"IC_INIT_TABLE","FA:::/TempleOS/Compiler/CmpInit.CPP,IC_INIT_TABLE"$
|
||||
|
||||
#define KW_INCLUDE 0
|
||||
#define KW_DEFINE 1
|
||||
#define KW_UNION 2
|
||||
#define KW_CATCH 3
|
||||
#define KW_CLASS 4
|
||||
#define KW_TRY 5
|
||||
#define KW_IF 6
|
||||
#define KW_ELSE 7
|
||||
#define KW_FOR 8
|
||||
#define KW_WHILE 9
|
||||
#define KW_EXTERN 10
|
||||
#define KW__EXTERN 11
|
||||
#define KW_RETURN 12
|
||||
#define KW_SIZEOF 13
|
||||
#define KW__INTERN 14
|
||||
#define KW_DO 15
|
||||
#define KW_ASM 16
|
||||
#define KW_GOTO 17
|
||||
#define KW_EXE 18
|
||||
#define KW_BREAK 19
|
||||
#define KW_SWITCH 20
|
||||
#define KW_NOBOUND_SWITCH 21
|
||||
#define KW_CASE 22
|
||||
#define KW_DFT 23
|
||||
#define KW_PUBLIC 24
|
||||
#define KW_OFFSET 25
|
||||
#define KW_IMPORT 26
|
||||
#define KW__IMPORT 27
|
||||
#define KW_IFDEF 28
|
||||
#define KW_IFNDEF 29
|
||||
#define KW_IFAOT 30
|
||||
#define KW_IFJIT 31
|
||||
#define KW_ENDIF 32
|
||||
#define KW_ASSERT 33
|
||||
#define KW_REG 34
|
||||
#define KW_NOREG 35
|
||||
#define KW_NOUNUSEDWARN 36
|
||||
#define KW_HELP_INDEX 37
|
||||
#define KW_HELP_FILE 38
|
||||
#define KW_STATIC 39
|
||||
#define KW_INTERRUPT 40
|
||||
#define KW_LOCK 41
|
||||
#define KW_DEFINED 42
|
||||
#define KW_ARGPOP 43
|
||||
#define KW_NOARGPOP 44
|
||||
|
||||
#define AKW_ALIGN 64
|
||||
#define AKW_MODULE_ORG 65
|
||||
#define AKW_I0 66
|
||||
#define AKW_I8 67
|
||||
#define AKW_I16 68
|
||||
#define AKW_I32 69
|
||||
#define AKW_I64 70
|
||||
#define AKW_U0 71
|
||||
#define AKW_U8 72
|
||||
#define AKW_U16 73
|
||||
#define AKW_U32 74
|
||||
#define AKW_U64 75
|
||||
#define AKW_F64 76
|
||||
#define AKW_DU8 77
|
||||
#define AKW_DU16 78
|
||||
#define AKW_DU32 79
|
||||
#define AKW_DU64 80
|
||||
#define AKW_DUP 81
|
||||
#define AKW_USE16 82
|
||||
#define AKW_USE32 83
|
||||
#define AKW_USE64 84
|
||||
#define AKW_IMPORT 85
|
||||
#define AKW_LIST 86
|
||||
#define AKW_NOLIST 87
|
||||
#define KW_NUM_KEYWORDS 88
|
||||
|
||||
#define CMP_TEMPLATE_INC 0x00
|
||||
#define CMP_TEMPLATE_DEC 0x01
|
||||
#define CMP_TEMPLATE_MOD 0x02
|
||||
#define CMP_TEMPLATE_LESS 0x03
|
||||
#define CMP_TEMPLATE_GREATER 0x04
|
||||
#define CMP_TEMPLATE_LESS_EQUAL 0x05
|
||||
#define CMP_TEMPLATE_GREATER_EQUAL 0x06
|
||||
#define CMP_TEMPLATE_STRLEN 0x07
|
||||
#define CMP_TEMPLATE_RDTSC 0x08
|
||||
#define CMP_TEMPLATE_SIGN_I64 0x09
|
||||
#define CMP_TEMPLATE_FSTP 0x0A
|
||||
#define CMP_TEMPLATE_FLD 0x0B
|
||||
#define CMP_TEMPLATE_HPET 0x0C
|
||||
#define CMP_TEMPLATE_SQR 0x0D
|
||||
#define CMP_TEMPLATE_ABS 0x0E
|
||||
#define CMP_TEMPLATE_SQRT 0x0F
|
||||
#define CMP_TEMPLATE_SIN 0x10
|
||||
#define CMP_TEMPLATE_COS 0x11
|
||||
#define CMP_TEMPLATE_TAN 0x12
|
||||
#define CMP_TEMPLATE_ATAN 0x13
|
||||
|
||||
#define ASSOCF_LEFT 1
|
||||
#define ASSOCF_RIGHT 2
|
||||
#define ASSOC_MASK 3
|
||||
|
||||
#define PREC_NULL 0x00
|
||||
#define PREC_TERM 0x04
|
||||
#define PREC_UNARY_POST 0x08
|
||||
#define PREC_UNARY_PRE 0x0C
|
||||
#define PREC_EXP 0x10
|
||||
#define PREC_MUL 0x14
|
||||
#define PREC_AND 0x18
|
||||
#define PREC_XOR 0x1C
|
||||
#define PREC_OR 0x20
|
||||
#define PREC_ADD 0x24
|
||||
#define PREC_CMP 0x28
|
||||
#define PREC_CMP2 0x2C
|
||||
#define PREC_AND_AND 0x30
|
||||
#define PREC_XOR_XOR 0x34
|
||||
#define PREC_OR_OR 0x38
|
||||
#define PREC_QUEST 0x3C
|
||||
#define PREC_ASSIGN 0x40
|
||||
|
||||
#define PREC_MAX 0x44
|
||||
|
||||
#define CPS_IS_PUBLIC 1
|
||||
#define CPS_IS_INTERRUPT 2
|
||||
#define CPS_IS_ASM 4
|
||||
#define CPS_IS_STATIC 8
|
||||
#define CPS_IS_ARGPOP 16
|
||||
#define CPS_IS_NOARGPOP 32
|
||||
|
||||
#define CPS_FUN_FLAGS (CPS_IS_INTERRUPT|CPS_IS_PUBLIC|CPS_IS_ARGPOP|CPS_IS_NOARGPOP)
|
||||
|
||||
//Byte 0
|
||||
#define PRS0_NULL 0x000000
|
||||
#define PRS0__EXTERN 0x000001
|
||||
#define PRS0__INTERN 0x000002
|
||||
#define PRS0__IMPORT 0x000003
|
||||
#define PRS0_EXTERN 0x000004
|
||||
#define PRS0_IMPORT 0x000005
|
||||
#define PRS0_TYPECAST 0x000006
|
||||
|
||||
//Byte 1
|
||||
#define PRS1B_NULL 0
|
||||
#define PRS1_NULL 0x000000
|
||||
#define PRS1B_LOCAL_VAR 1
|
||||
#define PRS1_LOCAL_VAR 0x000100
|
||||
#define PRS1B_FUN_ARG 2
|
||||
#define PRS1_FUN_ARG 0x000200
|
||||
#define PRS1B_CLASS 3
|
||||
#define PRS1_CLASS 0x000300
|
||||
#define PRS1B_STATIC_LOCAL_VAR 4
|
||||
#define PRS1_STATIC_LOCAL_VAR 0x000400
|
||||
|
||||
#define PRSF_UNION 0x010000
|
||||
|
||||
class COptReg
|
||||
{
|
||||
I64 offset;
|
||||
CMemberLst *m;
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
import Bool PutSrcLink(U8 *add,I64 cnt=1,U8 *buf=NULL);
|
||||
import CDoc *DocRead(U8 *name,I64 flags=0);
|
||||
import U0 DocLoad(CDoc *doc,U8 *src2,I64 size);
|
||||
import U0 DocWrite(CDoc *doc,Bool prompt=FALSE);
|
||||
import CDoc *DocNew(CTask *task=NULL);
|
||||
import Bool DocRecalc(CDoc *doc,Bool has_cursor=FALSE,I64 recalc=DOC_RECALC_ALL);
|
||||
import U0 DocDel(CDoc *doc);
|
||||
import U0 DocRst(CDoc *doc,Bool is_old);
|
||||
import CDocEntry *DocPutLine(CDocEntry *doc_e);
|
||||
import I64 DocSize(CDoc *doc);
|
||||
import U8 *Doc2PlainText(CDoc *doc,CDocEntry *doc_e);
|
||||
import U0 HashRep(CHashTable *h=NULL,
|
||||
I64 mask=HTG_ALL,U8 *outname=NULL,U8 *flags=NULL,U8 mapfile_drv=0,U8 *index=NULL,
|
||||
CDoc *_doc=NULL);
|
||||
|
||||
extern I64 Expression(CLex *lx);
|
||||
extern Bool GetExpression(CLex *lx,U8 **_ex);
|
||||
extern I64 PrsUnaryTerm(CLex *lx,CPrsStk *ps,CMemberLst **_local_var,CArrayDim **_tempad,
|
||||
I64 *max_prec,I64 *unary_pre_prec,I64 *paren_prec);
|
||||
extern I64 PrsUnaryModifier(CLex *lx,CPrsStk *ps,CMemberLst **_local_var,CArrayDim **_tempad,I64 *unary_post_prec);
|
||||
extern U0 PrsDereference(CLex *lx);
|
||||
extern U0 LexExcept(CLex *lx,U8 *name=NULL,CHashFun *fun_class=NULL);
|
||||
extern CExe *CmpJoin(CLex *lx,CHashFun *locals,Bool first_lex,Bool asm_blk=FALSE,U8 *map_name=NULL,U8 mapfile_drv=0);
|
||||
extern U0 CmpFixUpJITAsm(CLex *lx,CExe *ex,I64 ip2);
|
||||
extern U0 CmpFixUpAOTAsm(CLex *lx,CExe *ex,I64 ip2);
|
||||
extern CHashClass *PrsClass(CLex *lx,Bool is_union,I64 cps_flags,Bool is_extern);
|
||||
extern CHashClass *PrsType(CLex *lx,CHashClass **tempc1,
|
||||
I64 *_mode,CMemberLst *tempm,U8 **_ident,CHashFun **_fun_ptr,
|
||||
CHashExport **_tempess,CArrayDim *tempad,I64 cps_flags);
|
||||
extern U0 PrsVarInit2(CLex *lx,U8 **_dst,CHashClass *tempc,CArrayDim *tempad,U8 *data_addr_ip,U8 **_base,Bool data_heap,I64 pass);
|
||||
extern CHashFun *PrsFunJoin(CLex *lx,
|
||||
CHashClass *temp_return,U8 *name,I64 cps_flags);
|
||||
extern Bool PrsStatement(CLex *lx,CHashFun *locals,I64 try_cnt=0,
|
||||
CCodeBlkMisc *lb_break=NULL,Bool saved_prs_semicolon=TRUE,Bool if_else=FALSE);
|
||||
extern CIntermediateCode *OptLag1(CIntermediateCode *tempi);
|
||||
extern CIntermediateCode *OptPass012(CLex *lx,CHashFun *fun_class,Bool combined);
|
||||
extern U0 OptPass3(CLex *lx,CHashFun *fun_class,COptReg *register_offsets);
|
||||
extern U0 OptPass4(CLex *lx,COptReg *register_offsets,I64 *_type);
|
||||
extern U0 OptPass5(CLex *lx);
|
||||
extern U0 OptPass6(CLex *lx,CHashFun *fun_class);
|
||||
extern I64 OptPass789A(CLex *lx,CHashFun *fun_class,COptReg *register_offsets,U8 *buf,CDbgInfo **_dbg);
|
||||
extern I64 PrsKeyWord(CLex *lx);
|
||||
extern I64 HashEntrySize2(CHashSrcSym *temph);
|
||||
extern U0 LexPutWarn(CLex *lx,U8 *name=NULL,CHashFun *fun_class=NULL);
|
||||
extern CHashSrcSym *HashEntryImportCopy(CHashSrcSym *temph);
|
||||
extern U0 HashTableImport(CHashTable *src,CHashTable *dst);
|
||||
|
||||
_extern CMP_TEMPLATES U32 cmp_templates[1];
|
||||
_extern CMP_TEMPLATES_DONT_POP U32 cmp_templates_dont_pop[1];
|
||||
_extern CMP_TEMPLATES_DONT_PUSH U32 cmp_templates_dont_push[1];
|
||||
_extern CMP_TEMPLATES_DONT_PUSH_POP U32 cmp_templates_dont_push_pop[1];
|
||||
_extern CMP_TEMPLATES_DONT_PUSH2 U32 cmp_templates_dont_push2[1];
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
CHashTable *asm_hash;
|
||||
Bool is_first_compiler,cmp_do_not_write_to_dsk;
|
||||
CHashClass *sys_internal_types[IT_NUM_IT];
|
||||
|
||||
U32 *dual_U16_tokens1,*dual_U16_tokens2,*dual_U16_tokens3;
|
||||
U32 *binary_ops_table,*unary_ops_table;
|
||||
U8 *cmp_arg_cnt,*cmp_result_cnt;
|
||||
U8 *deref_bitmap,*assign_bitmap,*not_constant_bitmap,*cmp_bitmap,*fpop_bitmap;
|
||||
I64 num_stk_temps,num_reg_vars,num_non_ptr_vars;
|
||||
I64 stk_temps_mask,reg_vars_mask,non_ptr_vars_mask;
|
||||
U8 *to_stk_temps_map_odd;
|
||||
U8 *to_stk_temps_map_even;
|
||||
U8 *to_reg_vars_map,*to_non_ptr_vars_map;
|
||||
I64 compiled_lines,compiled_funs,compiled_bytes;
|
||||
|
||||
//Unassembler
|
||||
CInstruction **unasm_table;
|
||||
I64 unasm_table_entries;
|
||||
I64 uasm_ins64_mask,uasm_signed_arg_mask,uasm_mem_mask;
|
||||
|
||||
@@ -0,0 +1,744 @@
|
||||
#define NUM_INTERNAL_TYPES 16
|
||||
|
||||
class CInternalType
|
||||
{
|
||||
U8 type,size,name[8];
|
||||
};
|
||||
|
||||
CInternalType internal_types_table[NUM_INTERNAL_TYPES]={
|
||||
{IT_I0,0,"I0i"},
|
||||
{IT_U0,0,"U0i"},
|
||||
{IT_I0,0,"I0"},
|
||||
{IT_U0,0,"U0"},
|
||||
{IT_I8,1,"I8i"},
|
||||
{IT_I8,1,"I8"},
|
||||
{IT_U8,1,"U8i"},
|
||||
{IT_U8,1,"U8"},
|
||||
{IT_I16,2,"I16i"},
|
||||
{IT_U16,2,"U16i"},
|
||||
{IT_I32,4,"I32i"},
|
||||
{IT_U32,4,"U32i"},
|
||||
{IT_I64,8,"I64i"},
|
||||
{IT_U64,8,"U64i"},
|
||||
{IT_F64,8,"F64i"},
|
||||
{IT_F64,8,"F64"},
|
||||
};
|
||||
|
||||
U0 AsmPrsInsFlags(CLex *lx,CInstruction *tempi)
|
||||
{
|
||||
I64 i;
|
||||
while (TRUE) {
|
||||
switch (lx->token) {
|
||||
case TK_IDENT:
|
||||
if ((i=DefineMatch(lx->ident,"ST_OPCODE_MODIFIERS"))>=0) {
|
||||
tempi->opcode_modifier=i;
|
||||
break;
|
||||
} else
|
||||
return;
|
||||
case TK_INTEGER:
|
||||
if (lx->cur_i==16)
|
||||
tempi->flags|=IEF_OP_SIZE16;
|
||||
else if (lx->cur_i==32)
|
||||
tempi->flags|=IEF_OP_SIZE32;
|
||||
else
|
||||
return;
|
||||
break;
|
||||
case '+':
|
||||
tempi->flags|=IEF_PLUS_OPCODE;
|
||||
case '/':
|
||||
if (Lex(lx)==TK_INTEGER && lx->cur_i<8)
|
||||
tempi->slash_val=lx->cur_i;
|
||||
else if (lx->token==TK_IDENT) {
|
||||
if (!StrCmp(lx->ident,"R"))
|
||||
tempi->slash_val=SV_R_REGISTER;
|
||||
else if (!StrCmp(lx->ident,"I"))
|
||||
tempi->slash_val=SV_I_REGISTER;
|
||||
else
|
||||
return;
|
||||
} else
|
||||
return;
|
||||
break;
|
||||
case '!': tempi->flags|=IEF_DONT_SWITCH_MODES; break;
|
||||
case '&': tempi->flags|=IEF_DFT; break;
|
||||
case ':': tempi->flags|=IEF_STI; break;
|
||||
case '-': tempi->flags|=IEF_NO_REX; break;
|
||||
case '~': tempi->flags|=IEF_40_REX; break;
|
||||
case '=': tempi->flags|=IEF_48_REX; break;
|
||||
case '`': tempi->flags|=IEF_REX_ONLY_R8_R15; break;
|
||||
case '^': tempi->flags|=IEF_REX_XOR_LIKE; break;
|
||||
case '$$': tempi->flags|=IEF_ENDING_ZERO; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
Lex(lx);
|
||||
}
|
||||
}
|
||||
|
||||
U0 AsmHashLoad(Bool first)
|
||||
{
|
||||
I64 i,j,size,size1;
|
||||
CInternalType *tempit;
|
||||
CLex *lx;
|
||||
CHashGeneric *temph;
|
||||
CHashReg *tempr;
|
||||
CHashOpcode *tempo,*tempo1;
|
||||
CInstruction *tempi;
|
||||
CHashClass *tempc;
|
||||
|
||||
asm_hash=HashTableNew(2048);
|
||||
size1=offset(CHashOpcode.ins)+sizeof(CInstruction)<<5;
|
||||
tempo=MAlloc(size1);
|
||||
|
||||
lx=LexNew(TextFileRead("OpCodes.TXT"),0,StrNew("OpCodes.TXT.Z"));
|
||||
lx->hash_table_lst=NULL;
|
||||
Lex(lx);
|
||||
while (lx->token) {
|
||||
if (lx->token!=TK_IDENT)
|
||||
LexExcept(lx,"ST_EXPECTING_IDENTIFIER");
|
||||
i=LstEntryMatch(lx->ident,"R8\0R16\0R32\0R64\0SEG\0FSTK\0MM\0XMM\0OPCODE\0KEYWORD\0ASM_KEYWORD\0");
|
||||
if (i<0)
|
||||
LexExcept(lx,"Unknown Statement");
|
||||
Lex(lx); //skip keyword
|
||||
if (lx->token!=TK_IDENT)
|
||||
LexExcept(lx,"ST_EXPECTING_IDENTIFIER");
|
||||
switch (i) {
|
||||
case 8: //OPCODE
|
||||
MemSet(tempo,0,size1);
|
||||
tempo->type=HTT_OPCODE;
|
||||
tempo->instruction_entry_cnt=0;
|
||||
tempo->str=lx->ident;
|
||||
lx->ident=0;
|
||||
Lex(lx); //Skip OPCODE
|
||||
while (lx->token && lx->token!=';') {
|
||||
tempi=&tempo->ins[tempo->instruction_entry_cnt];
|
||||
tempi->ins_entry_num=tempo->instruction_entry_cnt++;
|
||||
tempi->slash_val=SV_NONE; //Not zero!!
|
||||
while (lx->token==TK_INTEGER) {
|
||||
tempi->opcode[tempi->opcode_cnt++]=lx->cur_i;
|
||||
Lex(lx);
|
||||
}
|
||||
if (lx->token==',')
|
||||
Lex(lx);
|
||||
else if (lx->token!=';')
|
||||
LexExcept(lx,"ST_EXPECTING_COMMA");
|
||||
|
||||
AsmPrsInsFlags(lx,tempi);
|
||||
|
||||
tempi->arg1=0;
|
||||
tempi->arg2=0;
|
||||
if (lx->token==TK_IDENT) {
|
||||
j=DefineMatch(lx->ident,"ST_ARG_TYPES");
|
||||
tempi->arg1=j;
|
||||
if (ARGT_REL8<=j<=ARGT_REL32 ||
|
||||
ARGT_MOFFS8<=j<=ARGT_MOFFS64)
|
||||
tempi|=IEF_NO_REX;
|
||||
|
||||
if (Lex(lx)==TK_IDENT) {
|
||||
j=DefineMatch(lx->ident,"ST_ARG_TYPES");
|
||||
Lex(lx);
|
||||
tempi->arg2=j;
|
||||
if (ARGT_REL8<=j<=ARGT_REL32 ||
|
||||
ARGT_MOFFS8<=j<=ARGT_MOFFS64)
|
||||
tempi|=IEF_NO_REX;
|
||||
}
|
||||
}
|
||||
}
|
||||
size=offset(CHashOpcode.ins)+
|
||||
sizeof(CInstruction)*tempo->instruction_entry_cnt;
|
||||
tempo1=MAlloc(size);
|
||||
MemCpy(tempo1,tempo,size);
|
||||
tempo1->use_cnt=0;
|
||||
if (HashFind(tempo1->str,asm_hash,HTT_OPCODE))
|
||||
LexExcept(lx,"ST_DUP_OPCODE_ENTRY");
|
||||
HashAdd(tempo1,asm_hash);
|
||||
break;
|
||||
case 9: //KEYWORD
|
||||
case 10: //ASM_KEYWORD
|
||||
temph=CAlloc(sizeof(CHashGeneric));
|
||||
temph->str=lx->ident;
|
||||
lx->ident=NULL;
|
||||
Lex(lx); //skip keyword name
|
||||
if (lx->token!=TK_INTEGER)
|
||||
LexExcept(lx,"ST_EXPECTING_INTEGER");
|
||||
temph->user_data0=lx->cur_i;
|
||||
if (i==9) {//KEYWORD
|
||||
temph->type=HTT_KEYWORD;
|
||||
HashAdd(temph,asm_hash);
|
||||
if (first) {
|
||||
temph=MAllocIdentical(temph);
|
||||
HashAdd(temph,adam_task->hash_table);
|
||||
}
|
||||
} else {
|
||||
temph->type=HTT_ASM_KEYWORD;
|
||||
HashAdd(temph,asm_hash);
|
||||
}
|
||||
Lex(lx); //Skip INT
|
||||
break;
|
||||
case REGT_R8:
|
||||
case REGT_R16:
|
||||
case REGT_R32:
|
||||
case REGT_R64:
|
||||
case REGT_SEG:
|
||||
case REGT_FSTK:
|
||||
case REGT_MM:
|
||||
case REGT_XMM:
|
||||
tempr=CAlloc(sizeof(CHashReg));
|
||||
tempr->str=lx->ident;
|
||||
lx->ident=NULL;
|
||||
Lex(lx); //skip keyword name
|
||||
if (lx->token!=TK_INTEGER)
|
||||
LexExcept(lx,"ST_EXPECTING_INTEGER");
|
||||
tempr->type=HTT_REG;
|
||||
tempr->reg_type=i;
|
||||
tempr->reg_num=lx->cur_i;
|
||||
HashAdd(tempr,asm_hash);
|
||||
Lex(lx); //Skip INT
|
||||
break;
|
||||
}
|
||||
if (lx->token!=';')
|
||||
LexExcept(lx,"ST_MISSING_SEMICOLON");
|
||||
Lex(lx); //Skip ';'
|
||||
}
|
||||
Free(tempo);
|
||||
LexDel(lx);
|
||||
for (i=0;i<NUM_INTERNAL_TYPES;i++) {
|
||||
tempit=&internal_types_table[i];
|
||||
tempc=PrsClassNew;
|
||||
tempc->type=HTT_INTERNAL_TYPE;
|
||||
tempc->sub_type=tempit->type;
|
||||
Bts(&tempc->flags,Cf_INTERNAL_TYPE);
|
||||
tempc->size=tempit->size;
|
||||
tempc->str=AStrNew(tempit->name);
|
||||
HashAdd(tempc,asm_hash);
|
||||
sys_internal_types[tempc->sub_type]=tempc;
|
||||
if (first) {
|
||||
tempc=MAllocIdentical(tempc);
|
||||
HashAdd(tempc,adam_task->hash_table);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
U0 CmpLoadDefines()
|
||||
{
|
||||
DefineLoad("ST_ERR",ST_ERR_ST);
|
||||
DefineLoad("ST_WARN",ST_WARN_ST);
|
||||
DefineLoad("ST_MISSING_SEMICOLON","missing ';' at");
|
||||
DefineLoad("ST_MISSING_EXPRESSION","missing Expression at ");
|
||||
DefineLoad("ST_MISSING_RIGHT_PAREN","missing ')' at ");
|
||||
DefineLoad("ST_MISSING_RIGHT_BRACKET","missing ']' at ");
|
||||
DefineLoad("ST_MISSING_COLON","missing ':' at");
|
||||
DefineLoad("ST_UNDEFINED_SYM","undefined sym at ");
|
||||
DefineLoad("ST_UNDEFINED_SYM_LINE","undefined sym at line:");
|
||||
DefineLoad("ST_UNDEFINED_IDENTIFIER","undefined identifier at ");
|
||||
DefineLoad("ST_INVALID_CLASS","invalid class at ");
|
||||
DefineLoad("ST_INVALID_MEMBER","invalid member at ");
|
||||
DefineLoad("ST_EXPECTING_TYPE","expecting type at ");
|
||||
DefineLoad("ST_EXPECTING_IDENTIFIER","expecting identifier at ");
|
||||
DefineLoad("ST_EXPECTING_RIGHT_PAREN","expecting ')' at ");
|
||||
DefineLoad("ST_EXPECTING_LEFT_BRACE","expecting '{' at ");
|
||||
DefineLoad("ST_EXPECTING_EQUAL","expecting '=' at ");
|
||||
DefineLoad("ST_MISSING_RIGHT_BRACE","missing '}' at ");
|
||||
DefineLoad("ST_INVALID_LVAL","invalid lval at ");
|
||||
DefineLoad("ST_EXPECTING_COMMA","expecting ',' at ");
|
||||
DefineLoad("ST_EXPECTING_SYS_SYM","expecting System sym at ");
|
||||
DefineLoad("ST_MISSING_WHILE","missing 'while' at");
|
||||
DefineLoad("ST_ALREADY_ONE_IMMEDIATE","already one immediate at ");
|
||||
DefineLoad("ST_SYNTAX_ERROR","syntax error at ");
|
||||
DefineLoad("ST_EXPECTING_SCALE_FACTOR","expecting scale factor at ");
|
||||
DefineLoad("ST_EXPECTING_LEFT_PAREN","expecting '(' at ");
|
||||
DefineLoad("ST_UNDEFINED_DUP_CNT","undefined DUP cnt at ");
|
||||
DefineLoad("ST_NO_LOCAL_GLBL_EXPORT","no local glbl exports at ");
|
||||
DefineLoad("ST_EXPECTING_COLON","expecting ':' at ");
|
||||
DefineLoad("ST_EXPECTING_DOT","expecting '.' at ");
|
||||
DefineLoad("ST_EXPECTING_LOCAL_VAR","expecting local var at ");
|
||||
DefineLoad("ST_REDEFINITION","redefinition at ");
|
||||
DefineLoad("ST_INVALID_INSTRUCTION","invalid instruction at ");
|
||||
DefineLoad("ST_BRANCH_OUT_OF_RANGE","branch out of range at ");
|
||||
DefineLoad("ST_BRANCH_OUT_OF_RANGE_LINE","branch out of range at line:");
|
||||
DefineLoad("ST_ATTEMPT_DEFINE_IMPORT","attempt to define import at ");
|
||||
DefineLoad("ST_COULD_USE_I8_DISP","could use I8 displacement at ");
|
||||
DefineLoad("ST_COULD_USE_I8_DISP_LINE","could use I8 displacement at line:");
|
||||
DefineLoad("ST_PTR_TO_U0","use \"U8 *\" instead of \"U0 *\" at ");
|
||||
DefineLoad("ST_NO_SIZE_SPECIFIED","no size specified at ");
|
||||
DefineLstLoad("ST_IT_TYPES","I0\0U0\0I8\0U8\0I16\0U16\0I32\0U32\0I64\0U64\0F64\0uF64\0");
|
||||
DefineLstLoad("ST_TY_TYPES","NULL\0IMM\0REG\0DISP\0SIB\0RIP\0STK\0");
|
||||
DefineLstLoad("ST_U8_REGS","AL\0CL\0DL\0BL\0AH\0CH\0DH\0BH\0"
|
||||
"R8u8\0R9u8\0R10u8\0R11u8\0R12u8\0R13u8\0R14u8\0R15u8\0");
|
||||
DefineLstLoad("ST_U8_REX_REGS","AL\0CL\0DL\0BL\0RSPu8\0RBPu8\0RSIu8\0RDIu8\0"
|
||||
"R8u8\0R9u8\0R10u8\0R11u8\0R12u8\0R13u8\0R14u8\0R15u8\0");
|
||||
DefineLstLoad("ST_U16_REGS","AX\0CX\0DX\0BX\0SP\0BP\0SI\0DI\0"
|
||||
"R8u16\0R9u16\0R10u16\0R11u16\0R12u16\0R13u16\0R14u16\0R15u16\0");
|
||||
DefineLstLoad("ST_U32_REGS","EAX\0ECX\0EDX\0EBX\0ESP\0EBP\0ESI\0EDI\0"
|
||||
"R8u32\0R9u32\0R10u32\0R11u32\0R12u32\0R13u32\0R14u32\0R15u32\0");
|
||||
DefineLstLoad("ST_U64_REGS","RAX\0RCX\0RDX\0RBX\0RSP\0RBP\0RSI\0RDI\0"
|
||||
"R8\0R9\0R10\0R11\0R12\0R13\0R14\0R15\0");
|
||||
DefineLstLoad("ST_MM_REGS","MM0\0MM1\0MM2\0MM3\0MM4\0MM5\0MM6\0MM7\0");
|
||||
DefineLstLoad("ST_XMM_REGS","XMM0\0XMM1\0XMM2\0XMM3\0XMM4\0XMM5\0XMM6\0XMM7\0");
|
||||
DefineLstLoad("ST_OPCODE_MODIFIERS","NO\0CB\0CW\0CD\0CP\0IB\0IW\0ID\0");
|
||||
DefineLstLoad("ST_ARG_TYPES",
|
||||
"NO\0REL8\0REL16\0REL32\0UIMM8\0UIMM16\0UIMM32\0UIMM64\0"
|
||||
"R8\0R16\0R32\0R64\0"
|
||||
"IMM8\0IMM16\0IMM32\0IMM64\0RM8\0RM16\0RM32\0RM64\0"
|
||||
"M8\0M16\0M32\0M64\0"
|
||||
"M1632\0M16N32\0M16N16\0M32N32\0"
|
||||
"MOFFS8\0MOFFS16\0MOFFS32\0MOFFS64\0"
|
||||
"AL\0AX\0EAX\0RAX\0CL\0DX\0 \0SREG\0"
|
||||
"SS\0DS\0ES\0FS\0GS\0CS\0ST0\0STI\0"
|
||||
"MM\0MM32\0MM64\0XMM\0XMM32\0XMM64\0XMM128\0XMM0\0");
|
||||
DefineLstLoad("ST_SEG_REGS","ES\0CS\0SS\0DS\0FS\0GS\0");
|
||||
DefineLstLoad("ST_FSTK_REGS","ST0\0ST1\0ST2\0ST3\0ST4\0ST5\0ST6\0ST7\0");
|
||||
DefineLoad("ST_EXPECTING_INTEGER","expecting integer at ");
|
||||
DefineLoad("ST_USE_POSTFIX_CAST","Use TempleOS postfix typecasting at ");
|
||||
DefineLoad("ST_PRS_INTERNAL_ERROR","Compiler Parse Error at ");
|
||||
DefineLoad("ST_OPT_INTERNAL_ERROR","Compiler Optimization Error at ");
|
||||
DefineLoad("ST_UNRESOLVED_REFERENCE","Unresolved Reference:");
|
||||
DefineLoad("ST_SCANNING_DIR","Scanning Directory:");
|
||||
DefineLoad("ST_UNUSED_VAR","Unused var ");
|
||||
DefineLoad("ST_UNNEEDED_NOUNUSEDWARN","Unneeded nounusedwarn ");
|
||||
DefineLoad("ST_UNUSED_EXTERN","Unused extern ");
|
||||
DefineLoad("ST_UNUSED_LABEL","Unused label ");
|
||||
DefineLoad("ST_UNUSED_LABEL_AT","Unused label at ");
|
||||
DefineLoad("ST_NOT_ALLOWED_IN_FUN","Not allowed in fun");
|
||||
DefineLoad("ST_MISSING_CATCH","missing 'catch' at");
|
||||
DefineLoad("ST_UNDEFINED_GOTO_LABEL","Undefined goto label ");
|
||||
DefineLoad("ST_UNDEFINED_GOTO_LABEL_AT","Undefined goto label at ");
|
||||
DefineLoad("ST_DUP_GOTO_LABEL","Duplicate goto label at ");
|
||||
DefineLoad("ST_BREAK_NOT_ALLOWED","'break' not allowed\n");
|
||||
DefineLoad("ST_ERRORS_WARNINGS","Errs:%d Warns:%d Code:%X Size:%X\n");
|
||||
DefineLoad("ST_IMPORT_NOT_NEEDED","import not needed at ");
|
||||
DefineLoad("ST_CASE_RANGE_ERROR","switch range error at ");
|
||||
DefineLoad("ST_LEX_STK_OVERFLOW","Lex Stk overflow");
|
||||
DefineLoad("ST_ASSERT_FAILED","Assert Failed ");
|
||||
DefineLoad("ST_ADDR_EXTERN","Can't take addr of extern fun");
|
||||
DefineLoad("ST_EXTERNS_NOT_ALLOWED","Extern Not Allowed at ");
|
||||
DefineLoad("ST_UNNECESSARY_PARENTHESIS","Unnecessary parenthesis");
|
||||
DefineLoad("ST_STATIC_UNION","Static unions are not implemented");
|
||||
DefineLoad("ST_IMPORT_HASH_TABLE_NOT_ALLOWED","import_hash_table only allowed in AOT compiled #exe{} mode.");
|
||||
DefineLoad("ST_CANT_INIT_GLBL_ON_HEAP","Can't init glbl var on data heap in AOT module");
|
||||
DefineLoad("ST_INVALID_ARRAY_SIZE","Invalid array size at ");
|
||||
DefineLoad("ST_NO_FUN_ASM_ALIGN","ALIGN not allowed in fun asm blk ");
|
||||
DefineLoad("ST_NO_FUN_ASM_ORG","ORG not allowed in fun asm blk ");
|
||||
DefineLoad("ST_JUST_ONE_ORG_ALLOWED","Just one org allowed ");
|
||||
DefineLoad("ST_ORG_MUST_BE_AT_BEGINNING","ORG must be at beginning ");
|
||||
DefineLoad("ST_ALIGN_MUST_BE_POWER_OF_TWO","ALIGN must be power of two at ");
|
||||
DefineLoad("ST_ALIGN_TOO_LARGE","In JIT mode, max ALIGN is 8 ");
|
||||
DefineLoad("ST_FUN_SIZE_NOT_DEFINED","Function size not defined at ");
|
||||
DefineLoad("ST_DUP_MEMBER","Duplicate member at ");
|
||||
DefineLoad("ST_DUP_TYPE","Duplicate type at ");
|
||||
DefineLoad("ST_FUN_PTR_FUN_PTR","Duplicate fun pointer at ");
|
||||
DefineLoad("ST_EXPECTING_STAR","Expecting '*' at ");
|
||||
DefineLoad("ST_EXPECTING_AMPERSAND","Expecting '&' at ");
|
||||
DefineLoad("ST_NOT_IMPLEMENTED","Feat not implemented");
|
||||
DefineLoad("ST_DUP_CASE","Duplicate case at ");
|
||||
DefineLoad("ST_DEREF_U0","Dereference U0 ");
|
||||
DefineLoad("ST_ASSIGN_U0","Assign U0 ");
|
||||
DefineLoad("ST_NO_GLBL_LABELS","No global labels at ");
|
||||
DefineLoad("ST_SHOULD_RETURN_VAL","Function should return val ");
|
||||
DefineLoad("ST_CANT_RETURN_VAL","Not in fun. Can't return a val ");
|
||||
DefineLoad("ST_SHOULD_NOT_RETURN_VAL","Function should NOT return val ");
|
||||
DefineLoad("ST_DUP_OPCODE_ENTRY","Duplicate OPCODE entry ");
|
||||
DefineLoad("ST_IN_FUN","in fun ");
|
||||
DefineLoad("ST_NOT_ARRAY_OR_PTR","not array or ptr ");
|
||||
DefineLoad("ST_16BIT_UNASM","16-bit unassembly is not well supported.\n");
|
||||
DefineLoad("ST_CANT_REG_VAR","Can't reg var ");
|
||||
DefineLoad("ST_ILLEGAL_FWD_REF","Illegal fwd ref at ");
|
||||
DefineLoad("ST_REG_IN_USE","Register in use ");
|
||||
DefineLoad("ST_ONE_BASE_CLASS","Only one base class allowed at this time at ");
|
||||
DefineLoad("ST_ADD_NOT_VAL","Must be address, not value ");
|
||||
DefineLoad("ST_HEADER_FOR_PRINTF","Missing header for PrintF(), PutS() and PutChar() at ");
|
||||
DefineLoad("ST_HEADER_FOR_SYSTRY","Missing header for SysTry() and SysUntry() at ");
|
||||
$AN,"Anchor for inserting Compiler Defines","COMPILE_DEFINE"$
|
||||
|
||||
|
||||
DefineLstLoad("ST_INTERMEDIATE_CODE",
|
||||
// '*' means it is a dereference instruction
|
||||
// '=' means it is an assignment instruction
|
||||
// '^' means it is a compare instruction
|
||||
|
||||
// '9' arg cnt means var
|
||||
|
||||
// 'N' means not constant. Sets LF_NOT_CONSTANT
|
||||
// which means an expression contains mem
|
||||
// accesses or things which might change.
|
||||
|
||||
// arg cnt,result cnt,deref/assign/cmp,nonconst,might not fill result
|
||||
"00..END\0"
|
||||
"00..START\0"
|
||||
"00..NOP\0"
|
||||
"10..END_EXP\0"
|
||||
"00..NOP1\0"
|
||||
"00..LABEL\0"
|
||||
"00..CALL_START\0"
|
||||
"01..CALL_END\0"
|
||||
"00..CALL_END2\0"
|
||||
"10..RETURN_VAL\0"
|
||||
"00..RETURN_VAL2\0"
|
||||
"01..IMM\0"
|
||||
"01..F64\0"
|
||||
"01.NSTR_CONST\0"
|
||||
"01.NABS_ADDR\0"
|
||||
"01.NADDR_IMPORT\0"
|
||||
"01.NHEAP_GLBL\0"
|
||||
"01..SIZEOF\0"
|
||||
"01..TYPE\0"
|
||||
"01.NGET_LABEL\0"
|
||||
"01.NRBP\0"
|
||||
"01.NREG\0"
|
||||
"00.NFS\0"
|
||||
"01.NMOV_FS\0"
|
||||
"00.NGS\0"
|
||||
"01.NMOV_GS\0"
|
||||
"01.NLEA\0"
|
||||
"01.NMOV\0"
|
||||
"10..TO_I64\0"
|
||||
"10..TO_F64\0"
|
||||
"10..TO_BOOL\0"
|
||||
"10..TOUPPER\0"
|
||||
"11..NATIVE_TYPECAST\0"
|
||||
"11.NADDR\0"
|
||||
"11..COM\0"
|
||||
"11..NOT\0"
|
||||
"11..UNARY_MINUS\0"
|
||||
"11*NDEREF\0"
|
||||
"11*NDEREF_PP\0"
|
||||
"11*NDEREF_MM\0"
|
||||
"11*N_PP\0"
|
||||
"11*N_MM\0"
|
||||
"11*NPP_\0"
|
||||
"11*NMM_\0"
|
||||
"21..SHL\0"
|
||||
"21..SHR\0"
|
||||
"11=.SHL_CONST\0"
|
||||
"11=.SHR_CONST\0"
|
||||
"21..POWER\0"
|
||||
"21..MUL\0"
|
||||
"21..DIV\0"
|
||||
"21..MOD\0"
|
||||
"21..AND\0"
|
||||
"21..OR\0"
|
||||
"21..XOR\0"
|
||||
"21..ADD\0"
|
||||
"21..SUB\0"
|
||||
"11=.ADD_CONST\0"
|
||||
"11=.SUB_CONST\0"
|
||||
"21^.EQUAL_EQUAL\0"
|
||||
"21^.NOT_EQUAL\0"
|
||||
"21^.LESS\0"
|
||||
"21^.GREATER\0"
|
||||
"21^.LESS_EQUAL\0"
|
||||
"21^.GREATER_EQUAL\0"
|
||||
"01..PUSH_CMP\0"
|
||||
"21..AND_AND\0"
|
||||
"21..OR_OR\0"
|
||||
"21..XOR_XOR\0"
|
||||
"31..COLON\0"
|
||||
"00..QUESTION\0"
|
||||
"21=NASSIGN\0"
|
||||
"21=NASSIGN_PP\0"
|
||||
"21=NASSIGN_MM\0"
|
||||
"21=NSHL_EQUAL\0"
|
||||
"21=NSHR_EQUAL\0"
|
||||
"21=NMUL_EQUAL\0"
|
||||
"21=NDIV_EQUAL\0"
|
||||
"21=NMOD_EQUAL\0"
|
||||
"21=NAND_EQUAL\0"
|
||||
"21=NOR_EQUAL\0"
|
||||
"21=NXOR_EQUAL\0"
|
||||
"21=NADD_EQUAL\0"
|
||||
"21=NSUB_EQUAL\0"
|
||||
"00..JMP\0"
|
||||
"20..SWITCH\0"
|
||||
"20..NOBOUND_SWITCH\0"
|
||||
"90..ADD_RSP\0"
|
||||
"90..ADD_RSP1\0"
|
||||
"00..ENTER\0"
|
||||
"00=.PUSH_REGS\0"
|
||||
"00=.POP_REGS\0"
|
||||
"00..LEAVE\0"
|
||||
"00..RET\0"
|
||||
"00.NCALL\0"
|
||||
"00.NCALL_INDIRECT\0"
|
||||
"00.NCALL_INDIRECT2\0"
|
||||
"00.NCALL_IMPORT\0"
|
||||
"00.NCALL_EXTERN\0"
|
||||
"00.NIRQ\0"
|
||||
"00.NASM\0"
|
||||
"00.NCLI\0"
|
||||
"00.NSTI\0"
|
||||
"10.NPREEMPT\0"
|
||||
"00.NCLD\0"
|
||||
"00.NSTD\0"
|
||||
"00.NHLT\0"
|
||||
"10.NPUSH\0"
|
||||
"00.NPOP\0"
|
||||
"00.NPUSHFD\0"
|
||||
"00.NPOPFD\0"
|
||||
"00.NPAUSE\0"
|
||||
"10.NCLFLUSH\0"
|
||||
"10.NINVLPG\0"
|
||||
"10.NINU8\0"
|
||||
"10.NINU16\0"
|
||||
"10.NINU32\0"
|
||||
"20.NOUTU8\0"
|
||||
"20.NOUTU16\0"
|
||||
"20.NOUTU32\0"
|
||||
"00.NGET_FLAGS\0"
|
||||
"00.NCARRY\0"
|
||||
"10.NSET_FLAGS\0"
|
||||
"00.NGET_RAX\0"
|
||||
"10.NSET_RAX\0"
|
||||
"00.NGET_BASE_PTR\0"
|
||||
"10.NSET_BASE_PTR\0"
|
||||
"00.NGET_STK_PTR\0"
|
||||
"10.NSET_STK_PTR\0"
|
||||
"01.NRIP\0"
|
||||
"00.NRDTSC\0"
|
||||
"00.NHPET\0"
|
||||
"20.NBT\0"
|
||||
"20.NBTS\0"
|
||||
"20.NBTR\0"
|
||||
"20.NBTC\0"
|
||||
"30.NBEQU\0"
|
||||
"20.NLBTS\0"
|
||||
"20.NLBTR\0"
|
||||
"20.NLBTC\0"
|
||||
"30.NLBEQU\0"
|
||||
"10.NBSF\0"
|
||||
"10.NBSR\0"
|
||||
"10.NQUE_INIT\0"
|
||||
"20.NQUE_INS\0"
|
||||
"20.NQUE_INS_REV\0"
|
||||
"10.NQUE_REM\0"
|
||||
"10.NSTRLEN\0"
|
||||
"30.NMEMCPY\0"
|
||||
"30.NMEMSET\0"
|
||||
"30.NMEMSET_U16\0"
|
||||
"30.NMEMSET_U32\0"
|
||||
"30.NMEMSET_U64\0"
|
||||
"10..BR_ZERO\0"
|
||||
"10..BR_NOT_ZERO\0"
|
||||
"20..BR_NOT_EQUAL\0"
|
||||
"20..BR_EQUAL_EQUAL\0"
|
||||
"20..BR_GREATER_EQUAL\0"
|
||||
"20..BR_LESS_EQUAL\0"
|
||||
"20..BR_GREATER\0"
|
||||
"20..BR_LESS\0"
|
||||
"21..BR_2NOT_EQUAL\0"
|
||||
"21..BR_2EQUAL_EQUAL\0"
|
||||
"21..BR_2GREATER_EQUAL\0"
|
||||
"21..BR_2LESS_EQUAL\0"
|
||||
"21..BR_2GREATER\0"
|
||||
"21..BR_2LESS\0"
|
||||
"20..BR_AND_ZERO\0"
|
||||
"20..BR_AND_NOT_ZERO\0"
|
||||
"10.NBR_MM_ZERO\0"
|
||||
"10.NBR_MM_NOT_ZERO\0"
|
||||
"20..BR_AND_AND_ZERO\0"
|
||||
"20..BR_AND_AND_NOT_ZERO\0"
|
||||
"20..BR_OR_OR_ZERO\0"
|
||||
"20..BR_OR_OR_NOT_ZERO\0"
|
||||
"20.NBR_BT\0"
|
||||
"20.NBR_BTS\0"
|
||||
"20.NBR_BTR\0"
|
||||
"20.NBR_BTC\0"
|
||||
"20.NBR_LBTS\0"
|
||||
"20.NBR_LBTR\0"
|
||||
"20.NBR_LBTC\0"
|
||||
"20.NBR_NOT_BT\0"
|
||||
"20.NBR_NOT_BTS\0"
|
||||
"20.NBR_NOT_BTR\0"
|
||||
"20.NBR_NOT_BTC\0"
|
||||
"20.NBR_NOT_LBTS\0"
|
||||
"20.NBR_NOT_LBTR\0"
|
||||
"20.NBR_NOT_LBTC\0"
|
||||
"20.NSWAP_U8\0"
|
||||
"20.NSWAP_U16\0"
|
||||
"20.NSWAP_U32\0"
|
||||
"20.NSWAP_U64\0"
|
||||
"10..ABS_I64\0"
|
||||
"10..SIGN_I64\0"
|
||||
"20..MIN_I64\0"
|
||||
"20..MIN_U64\0"
|
||||
"20..MAX_I64\0"
|
||||
"20..MAX_U64\0"
|
||||
"30..LIMIT_I64\0"
|
||||
"30..LIMIT_U64\0"
|
||||
"20..MOD_U64\0"
|
||||
"10..SQRI64\0"
|
||||
"10..SQRU64\0"
|
||||
"11..SQR\0"
|
||||
"11..ABS\0"
|
||||
"11..SQRT\0"
|
||||
"11..SIN\0"
|
||||
"11..COS\0"
|
||||
"11..TAN\0"
|
||||
"11..ATAN\0"
|
||||
);$AN,"Anchor for adding intermediate codes","IC_INIT_TABLE"$
|
||||
|
||||
}
|
||||
|
||||
U0 CmpFillTables()
|
||||
{
|
||||
U8 *st;
|
||||
I64 i,k;
|
||||
U32 *u,*d4;
|
||||
|
||||
assign_bitmap=CAlloc((IC_NUM_ENTRIES+7)>>3);
|
||||
deref_bitmap=CAlloc((IC_NUM_ENTRIES+7)>>3);
|
||||
cmp_bitmap=CAlloc((IC_NUM_ENTRIES+7)>>3);
|
||||
not_constant_bitmap=CAlloc((IC_NUM_ENTRIES+7)>>3);
|
||||
fpop_bitmap=CAlloc((IC_NUM_ENTRIES+7)>>3);
|
||||
cmp_arg_cnt=CAlloc(IC_NUM_ENTRIES);
|
||||
cmp_result_cnt=CAlloc(IC_NUM_ENTRIES);
|
||||
st=Define("ST_INTERMEDIATE_CODE");
|
||||
for (i=0;i<IC_NUM_ENTRIES;i++) {
|
||||
cmp_arg_cnt[i]=*st-'0';
|
||||
cmp_result_cnt[i]=st[1]-'0';
|
||||
if (st[2]=='*')
|
||||
Bts(deref_bitmap,i);
|
||||
else if (st[2]=='=')
|
||||
Bts(assign_bitmap,i);
|
||||
else if (st[2]=='^')
|
||||
Bts(cmp_bitmap,i);
|
||||
if (st[3]=='N')
|
||||
Bts(not_constant_bitmap,i);
|
||||
st+=StrLen(st)+1;
|
||||
//See $LK,"ST_INTERMEDIATE_CODE","FF:::/TempleOS/Compiler/CodeGen.CPP,ST_INTERMEDIATE_CODE"$.
|
||||
}
|
||||
|
||||
Bts(fpop_bitmap,IC_ADD);
|
||||
Bts(fpop_bitmap,IC_SUB);
|
||||
Bts(fpop_bitmap,IC_MUL);
|
||||
Bts(fpop_bitmap,IC_DIV);
|
||||
Bts(fpop_bitmap,IC__PP);
|
||||
Bts(fpop_bitmap,IC__MM);
|
||||
Bts(fpop_bitmap,IC_PP_);
|
||||
Bts(fpop_bitmap,IC_MM_);
|
||||
|
||||
Bts(fpop_bitmap,IC_SQR);
|
||||
Bts(fpop_bitmap,IC_ABS);
|
||||
Bts(fpop_bitmap,IC_SQRT);
|
||||
Bts(fpop_bitmap,IC_SIN);
|
||||
Bts(fpop_bitmap,IC_COS);
|
||||
Bts(fpop_bitmap,IC_TAN);
|
||||
Bts(fpop_bitmap,IC_ATAN);
|
||||
|
||||
to_reg_vars_map=CAlloc(NUM_REGS*sizeof(U8));
|
||||
num_reg_vars=0;
|
||||
reg_vars_mask=CREG_VARS_MASK;
|
||||
for (i=0;i<NUM_REGS;i++)
|
||||
if (Bt(®_vars_mask,i))
|
||||
to_reg_vars_map[num_reg_vars++]=i;
|
||||
|
||||
to_non_ptr_vars_map=CAlloc(NUM_REGS*sizeof(U8));
|
||||
num_non_ptr_vars=0;
|
||||
non_ptr_vars_mask=CREG_NON_PTR_MASK;
|
||||
for (i=0;i<NUM_REGS;i++)
|
||||
if (Bt(&non_ptr_vars_mask,i))
|
||||
to_non_ptr_vars_map[num_non_ptr_vars++]=i;
|
||||
|
||||
to_stk_temps_map_odd=CAlloc(NUM_REGS*sizeof(U8));
|
||||
to_stk_temps_map_even=CAlloc(NUM_REGS*sizeof(U8));
|
||||
num_stk_temps=0;
|
||||
stk_temps_mask=CSTK_TEMPS_MASK;
|
||||
for (i=0;i<NUM_REGS;i++)
|
||||
if (Bt(&stk_temps_mask,i))
|
||||
to_stk_temps_map_even[num_stk_temps++]=i;
|
||||
k=num_stk_temps;
|
||||
for (i=0;i<NUM_REGS;i++)
|
||||
if (Bt(&stk_temps_mask,i))
|
||||
to_stk_temps_map_odd[--k]=i;
|
||||
|
||||
u=CAlloc(sizeof(U32)*TK_NUM_TK);
|
||||
dual_U16_tokens1=u;
|
||||
u['!']=TK_NOT_EQUAL<<16+'=';
|
||||
u['&']=TK_AND_AND<<16+'&';
|
||||
u['*']=TK_MUL_EQUAL<<16+'=';
|
||||
u['+']=TK_PLUS_PLUS<<16+'+';
|
||||
u['-']=TK_DEREFERENCE<<16+'>';
|
||||
u['/']='*';
|
||||
u[':']=TK_DBL_COLON<<16+':';
|
||||
u['<']=TK_LESS_EQUAL<<16+'=';
|
||||
u['=']=TK_EQUAL_EQUAL<<16+'=';
|
||||
u['>']=TK_GREATER_EQUAL<<16+'=';
|
||||
u['^']=TK_XOR_EQUAL<<16+'=';
|
||||
u['|']=TK_OR_OR<<16+'|';
|
||||
u['%']=TK_MOD_EQUAL<<16+'=';
|
||||
|
||||
u=CAlloc(sizeof(U32)*TK_NUM_TK);
|
||||
dual_U16_tokens2=u;
|
||||
u['&']=TK_AND_EQUAL<<16+'=';
|
||||
u['+']=TK_ADD_EQUAL<<16+'=';
|
||||
u['-']=TK_MINUS_MINUS<<16+'-';
|
||||
u['/']='/';
|
||||
u['<']=TK_SHL<<16+'<';
|
||||
u['>']=TK_SHR<<16+'>';
|
||||
u['^']=TK_XOR_XOR<<16+'^';
|
||||
u['|']=TK_OR_EQUAL<<16+'=';
|
||||
|
||||
u=CAlloc(sizeof(U32)*TK_NUM_TK);
|
||||
dual_U16_tokens3=u;
|
||||
u['-']=TK_SUB_EQUAL<<16+'=';
|
||||
u['/']=TK_DIV_EQUAL<<16+'=';
|
||||
|
||||
//$AN,"","OP_precedence"$Here the operator precedences are
|
||||
//defined.
|
||||
d4=CAlloc(sizeof(U32)*TK_NUM_TK);
|
||||
unary_ops_table=d4;
|
||||
d4['~']=PREC_UNARY_PRE<<16+IC_COM;
|
||||
d4['!']=PREC_UNARY_PRE<<16+IC_NOT;
|
||||
d4['-']=PREC_UNARY_PRE<<16+IC_UNARY_MINUS;
|
||||
d4['&']=PREC_UNARY_PRE<<16+IC_ADDR;
|
||||
d4['*']=PREC_UNARY_PRE<<16+IC_DEREF;
|
||||
|
||||
|
||||
d4=CAlloc(sizeof(U32)*TK_NUM_TK);
|
||||
binary_ops_table=d4;
|
||||
|
||||
d4['`'] =(PREC_EXP+ASSOCF_RIGHT)<<16+IC_POWER;
|
||||
d4[TK_SHL] =(PREC_EXP+ASSOCF_LEFT)<<16+IC_SHL;
|
||||
d4[TK_SHR] =(PREC_EXP+ASSOCF_LEFT)<<16+IC_SHR;
|
||||
|
||||
d4['*'] =PREC_MUL<<16+IC_MUL;
|
||||
d4['/'] =(PREC_MUL+ASSOCF_LEFT)<<16+IC_DIV;
|
||||
d4['%'] =(PREC_MUL+ASSOCF_LEFT)<<16+IC_MOD;
|
||||
|
||||
d4['&'] =PREC_AND<<16+IC_AND;
|
||||
|
||||
d4['^'] =PREC_XOR<<16+IC_XOR;
|
||||
|
||||
d4['|'] =PREC_OR<<16+IC_OR;
|
||||
|
||||
d4['+'] =PREC_ADD<<16+IC_ADD;
|
||||
d4['-'] =(PREC_ADD+ASSOCF_LEFT)<<16+IC_SUB;
|
||||
|
||||
d4['<'] =PREC_CMP<<16+IC_LESS;
|
||||
d4['>'] =PREC_CMP<<16+IC_GREATER;
|
||||
d4[TK_LESS_EQUAL] =PREC_CMP<<16+IC_LESS_EQUAL;
|
||||
d4[TK_GREATER_EQUAL] =PREC_CMP<<16+IC_GREATER_EQUAL;
|
||||
|
||||
d4[TK_EQUAL_EQUAL] =PREC_CMP2<<16+IC_EQUAL_EQUAL;
|
||||
d4[TK_NOT_EQUAL] =PREC_CMP2<<16+IC_NOT_EQUAL;
|
||||
|
||||
d4[TK_AND_AND] =PREC_AND_AND<<16+IC_AND_AND;
|
||||
|
||||
d4[TK_XOR_XOR]=PREC_XOR_XOR<<16+IC_XOR_XOR;
|
||||
|
||||
d4[TK_OR_OR] =PREC_OR_OR<<16+IC_OR_OR;
|
||||
|
||||
d4[':'] =(PREC_QUEST+ASSOCF_LEFT)<<16+IC_COLON;
|
||||
d4['?'] =(PREC_QUEST+ASSOCF_LEFT)<<16+IC_QUESTION;
|
||||
|
||||
d4['='] =(PREC_ASSIGN+ASSOCF_RIGHT)<<16+IC_ASSIGN;
|
||||
d4[TK_SHL_EQUAL]=(PREC_ASSIGN+ASSOCF_RIGHT)<<16+IC_SHL_EQUAL;
|
||||
d4[TK_SHR_EQUAL]=(PREC_ASSIGN+ASSOCF_RIGHT)<<16+IC_SHR_EQUAL;
|
||||
d4[TK_MUL_EQUAL]=(PREC_ASSIGN+ASSOCF_RIGHT)<<16+IC_MUL_EQUAL;
|
||||
d4[TK_DIV_EQUAL]=(PREC_ASSIGN+ASSOCF_RIGHT)<<16+IC_DIV_EQUAL;
|
||||
d4[TK_MOD_EQUAL]=(PREC_ASSIGN+ASSOCF_RIGHT)<<16+IC_MOD_EQUAL;
|
||||
d4[TK_AND_EQUAL]=(PREC_ASSIGN+ASSOCF_RIGHT)<<16+IC_AND_EQUAL;
|
||||
d4[TK_OR_EQUAL] =(PREC_ASSIGN+ASSOCF_RIGHT)<<16+IC_OR_EQUAL;
|
||||
d4[TK_XOR_EQUAL]=(PREC_ASSIGN+ASSOCF_RIGHT)<<16+IC_XOR_EQUAL;
|
||||
d4[TK_ADD_EQUAL]=(PREC_ASSIGN+ASSOCF_RIGHT)<<16+IC_ADD_EQUAL;
|
||||
d4[TK_SUB_EQUAL]=(PREC_ASSIGN+ASSOCF_RIGHT)<<16+IC_SUB_EQUAL;
|
||||
}
|
||||
@@ -0,0 +1,701 @@
|
||||
U0 StreamPutS(U8 *st)
|
||||
//Inss text into the stream of
|
||||
//characters being compiled. Called
|
||||
//from withing #exe{} block.
|
||||
{
|
||||
CLex *lx=Fs->last_lex;
|
||||
CStreamBlk *tempe=lx->last_stream_blk;
|
||||
if (tempe!=&lx->next_stream_blk)
|
||||
tempe->body=StrAdd(tempe->body,st);
|
||||
else
|
||||
PrintFErr("No exe{} blk\n");
|
||||
}
|
||||
|
||||
U0 StreamPrintF(U8 *src,...)
|
||||
//Inss text into the stream of
|
||||
//characters being compiled. Called
|
||||
//from withing #exe{} block.
|
||||
{
|
||||
U8 *buf=SPrintFJoin(NULL,src,argc,argv);
|
||||
StreamPutS(buf);
|
||||
Free(buf);
|
||||
}
|
||||
|
||||
U8 *CmpStatement(CLex *lx,I64 *type)
|
||||
{
|
||||
I64 size,i,j,k,*result=INVALID_PTR;
|
||||
CIntermediateCode *tempi;
|
||||
if (type) *type=IT_I64;
|
||||
Btr(&lx->flags,Lf_OPT_TRACE_PRESENT);
|
||||
if (lx->a_depth==2)
|
||||
CBPush(lx);
|
||||
CBOutPtrsInit(lx);
|
||||
CBICAdd(lx,IC_START,0,0); //So we can scan back an instruction
|
||||
tempi=lx->cbh.cb_last_out_ptr;
|
||||
if (!PrsStatement(lx,NULL)) {
|
||||
if (tempi!=lx->cbh.cb_last_out_ptr) {
|
||||
CBICAdd(lx,IC_RETURN_VAL2,0,NULL);
|
||||
CBICAdd(lx,IC_RET,0,0);
|
||||
CBICAdd(lx,IC_END,0,0);
|
||||
if (result=CBCompile(lx,NULL,&size,NULL,NULL,type)) {
|
||||
if (lx->flags&LF_AOT_COMPILE) {
|
||||
j=lx->a->ip;
|
||||
k=(size+7)>>3;
|
||||
for (i=0;i<k;i++)
|
||||
AsmStoreCodeU64(lx,result[i]);
|
||||
Free(result);
|
||||
result=j;
|
||||
}
|
||||
}
|
||||
} else
|
||||
LinkedLstDel(lx->cbh.cb_out_first);
|
||||
} else
|
||||
LinkedLstDel(lx->cbh.cb_out_first);
|
||||
if (lx->a_depth==2)
|
||||
CBPop(lx);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
CExe *CmpJoin(CLex *lx,CHashFun *locals,Bool first_lex,Bool asm_blk=FALSE,
|
||||
U8 *map_name=NULL,U8 mapfile_drv=0)
|
||||
{
|
||||
CAsmCtrl *a,*old_a=lx->a;
|
||||
I64 i,j,l;
|
||||
CAsmCodeBlk *tempc;
|
||||
CExeImportExport *tempe;
|
||||
Bool okay=TRUE;
|
||||
CHashTable *ht1=lx->hash_table_lst,
|
||||
*ht2=lx->define_hash_table,
|
||||
*ht3=lx->glbl_hash_table,
|
||||
*ht4=lx->local_hash_table,
|
||||
*asm_hash_alias=MAllocIdentical(asm_hash);
|
||||
CHashFun *old_var_lst=lx->local_var_lst;
|
||||
CExe *result=CAlloc(sizeof(CExe));
|
||||
result->parent_exe=lx->exe_struct;
|
||||
lx->exe_struct=result;
|
||||
|
||||
result->next_ie=result->last_ie=&result->next_ie;
|
||||
lx->a=a=CAlloc(sizeof(CAsmCtrl));
|
||||
lx->a_depth++;
|
||||
|
||||
a->code=CAlloc(sizeof(CAsmCodeBlk));
|
||||
a->max_align=1;
|
||||
a->module_org=INVALID_PTR;
|
||||
|
||||
lx->local_hash_table=HashTableNew(16);
|
||||
lx->glbl_hash_table =HashTableNew(2048);
|
||||
|
||||
asm_hash_alias->next=lx->local_hash_table;
|
||||
lx->local_hash_table->next=lx->glbl_hash_table;
|
||||
|
||||
if (lx->flags&LF_AOT_COMPILE)
|
||||
lx->define_hash_table=lx->glbl_hash_table;
|
||||
else
|
||||
lx->glbl_hash_table->next=Fs->hash_table;
|
||||
lx->hash_table_lst =asm_hash_alias;
|
||||
|
||||
lx->local_var_lst=locals; //C+ local vars
|
||||
try {
|
||||
if (first_lex)
|
||||
Lex(lx);
|
||||
if (lx->flags&LF_AOT_COMPILE) {
|
||||
while (lx->token!=TK_EOF) {
|
||||
i=CmpStatement(lx,NULL);
|
||||
if (i!=INVALID_PTR) {
|
||||
tempe=CAlloc(sizeof(CExeImportExport));
|
||||
tempe->type=EIE_MAIN;
|
||||
tempe->ip=i;
|
||||
QueIns(tempe,result->last_ie);
|
||||
}
|
||||
if (asm_blk)
|
||||
break;
|
||||
}
|
||||
} else
|
||||
PrsStatement(lx,NULL);
|
||||
AsmGlblsResolve(lx,result);
|
||||
} catch {
|
||||
if (Fs->except_argc>0 && Fs->except_argv[0]==EXCEPT_COMPILER &&
|
||||
!asm_blk) {
|
||||
if (Fs->except_argc>1 && Fs->except_argv[1]) {
|
||||
"Compiler exception #%d\n",Fs->except_argv[1];
|
||||
LexPutPos(lx);
|
||||
}
|
||||
Fs->catch_except=TRUE;
|
||||
}
|
||||
okay=FALSE;
|
||||
}
|
||||
if (!okay) {
|
||||
if (lx->error_cnt<1)
|
||||
lx->error_cnt=1;
|
||||
lx->exe_struct=result->parent_exe;
|
||||
Free(result);
|
||||
LinkedLstDel(a->code);
|
||||
result=NULL;
|
||||
} else {
|
||||
if (map_name && !cmp_do_not_write_to_dsk)
|
||||
HashRep(lx->glbl_hash_table,HTG_ALL,map_name,"-r-p",mapfile_drv);
|
||||
HashTableDel(lx->local_hash_table);
|
||||
HashTableDel(lx->glbl_hash_table);
|
||||
|
||||
if (!a->num_code_U8s)
|
||||
result->code=NULL;
|
||||
else {
|
||||
if (lx->flags&LF_AOT_COMPILE)
|
||||
result->code=MAlloc(a->num_code_U8s);
|
||||
else {
|
||||
if (a->module_org==INVALID_PTR)
|
||||
result->code=MAlloc(a->num_code_U8s,Fs->code_heap);
|
||||
else
|
||||
result->code=a->module_org;
|
||||
}
|
||||
result->code_U8s=a->num_code_U8s;
|
||||
tempc=a->code;
|
||||
j=0;
|
||||
l=a->num_code_U8s;
|
||||
while (tempc) {
|
||||
i=l;
|
||||
if (i>ASM_CODE_BLK_SIZE)
|
||||
i=ASM_CODE_BLK_SIZE;
|
||||
MemCpy(result->code+j,tempc->body,i);
|
||||
j+=i;
|
||||
l-=i;
|
||||
tempc=tempc->next;
|
||||
}
|
||||
}
|
||||
LinkedLstDel(a->code);
|
||||
result->abss=a->abss;
|
||||
result->heap_glbls=a->heap_glbls;
|
||||
result->max_align =a->max_align;
|
||||
result->module_org=a->module_org;
|
||||
lx->exe_struct=result->parent_exe;
|
||||
}
|
||||
lx->hash_table_lst =ht1,
|
||||
lx->define_hash_table=ht2;
|
||||
lx->glbl_hash_table =ht3;
|
||||
lx->local_hash_table =ht4;
|
||||
lx->local_var_lst=old_var_lst;
|
||||
Free(asm_hash_alias);
|
||||
Free(a);
|
||||
lx->a=old_a;
|
||||
lx->a_depth--;
|
||||
return result;
|
||||
}
|
||||
|
||||
CExe *CmpBuf(U8 *buf,U8 *map_name=NULL,
|
||||
I64 *error_cnt=NULL, I64 *warning_cnt=NULL,U8 mapfile_drv=0)
|
||||
{
|
||||
CLex *lx;
|
||||
CExe *result=NULL;
|
||||
if (!is_first_compiler)
|
||||
"$$FG,PURPLE$$**** Not First Compiler ****$$FG$$\n";
|
||||
lx=LexNew(buf,LF_DONT_FREE_BUF,NULL);
|
||||
lx->flags|=LF_AOT_COMPILE;
|
||||
QueIns(lx,Fs->last_lex);
|
||||
result=CmpJoin(lx,NULL,TRUE,FALSE,map_name,mapfile_drv);
|
||||
if (error_cnt) *error_cnt=lx->error_cnt;
|
||||
if (warning_cnt) *warning_cnt=lx->warning_cnt;
|
||||
QueRem(lx);
|
||||
if (result)
|
||||
LexDel(lx);
|
||||
return result;
|
||||
}
|
||||
|
||||
U0 CmpFixUpJITAsm(CLex *lx,CExe *ex,I64 ip2)
|
||||
{
|
||||
I64 i,*str=NULL;
|
||||
U8 *ptr;
|
||||
CExeAbsAddr *tempa,*tempa1;
|
||||
CExeImportExport *tempe,*tempe1;
|
||||
CHashExport *tempess;
|
||||
CHashFun *tempf;
|
||||
CHashGlblVar *tempg;
|
||||
|
||||
tempa=ex->abss;
|
||||
while (tempa) {
|
||||
tempa1=tempa->next;
|
||||
nobound_switch (tempa->type) {
|
||||
case EAA_ADD_U8:
|
||||
*(ex->code(U8 *)+tempa->ip)(U8 *)+=ip2;
|
||||
break;
|
||||
case EAA_SUB_U8:
|
||||
*(ex->code(U8 *)+tempa->ip)(U8 *)-=ip2;
|
||||
break;
|
||||
case EAA_ADD_U16:
|
||||
*(ex->code(U8 *)+tempa->ip)(U16 *)+=ip2;
|
||||
break;
|
||||
case EAA_SUB_U16:
|
||||
*(ex->code(U8 *)+tempa->ip)(U16 *)-=ip2;
|
||||
break;
|
||||
case EAA_ADD_U32:
|
||||
*(ex->code(U8 *)+tempa->ip)(U32 *)+=ip2;
|
||||
break;
|
||||
case EAA_SUB_U32:
|
||||
*(ex->code(U8 *)+tempa->ip)(U32 *)-=ip2;
|
||||
break;
|
||||
case EAA_ADD_U64:
|
||||
*(ex->code(U8 *)+tempa->ip)(I64 *)+=ip2;
|
||||
break;
|
||||
case EAA_SUB_U64:
|
||||
*(ex->code(U8 *)+tempa->ip)(I64 *)-=ip2;
|
||||
break;
|
||||
}
|
||||
Free(tempa);
|
||||
tempa=tempa1;
|
||||
}
|
||||
tempe=ex->next_ie;
|
||||
while (tempe!=&ex->next_ie) {
|
||||
tempe1=tempe->next;
|
||||
if (tempe->str) {
|
||||
Free(str);
|
||||
str=tempe->str;
|
||||
}
|
||||
if (tempe->type<=EIE_LIT_EXPORT) {
|
||||
tempess=CAlloc(sizeof(CHashExport));
|
||||
tempess->str=str;
|
||||
str=NULL;
|
||||
tempess->type=HTT_EXPORT_SYS_SYM|HTF_LIT;
|
||||
if (tempe->type==EIE_LIT_EXPORT)
|
||||
tempess->val=tempe->ip;
|
||||
else
|
||||
tempess->val=tempe->ip+ip2;
|
||||
tempess->src_link=tempe->src_link;
|
||||
tempe->src_link=NULL;
|
||||
if (IsReplaceSyms)
|
||||
HashReplace(tempess,Fs->hash_table);
|
||||
else
|
||||
HashAdd(tempess,Fs->hash_table);
|
||||
SysSymImportsResolve(tempess->str);
|
||||
} else if (tempe->type<EIE_MAIN) {
|
||||
if (tempe->str && !(tempess=HashFind(str,Fs->hash_table,HTG_ALL-HTT_IMPORT_SYS_SYM)))
|
||||
"%S%s\n","ST_UNRESOLVED_REFERENCE",str;
|
||||
else {
|
||||
ptr=tempe->ip+ip2;
|
||||
if (tempess->type & HTT_FUN) {
|
||||
tempf=tempess;
|
||||
if (tempe->type & 1)
|
||||
i=tempf->executable_addr;
|
||||
else
|
||||
i=tempf->executable_addr-ex->code;
|
||||
} else if (tempess->type & HTT_GLBL_VAR) {
|
||||
tempg=tempess;
|
||||
if (tempe->type & 1)
|
||||
i=tempg->data_addr;
|
||||
else
|
||||
i=tempg->data_addr-ex->code;
|
||||
} else {
|
||||
if (tempe->type & 1)
|
||||
i=tempess->val;
|
||||
else
|
||||
i=tempess->val(U8 *)-ex->code;
|
||||
}
|
||||
if (tempe->type<=EIE_LIT_U8)
|
||||
*ptr(U8 *)+=i;
|
||||
else if (tempe->type<=EIE_LIT_U16)
|
||||
*ptr(U16 *)+=i;
|
||||
else if (tempe->type<=EIE_LIT_U32)
|
||||
*ptr(U32 *)+=i;
|
||||
else if (tempe->type<=EIE_LIT_U64)
|
||||
*ptr(I64 *)+=i;
|
||||
}
|
||||
}
|
||||
Free(tempe->src_link);
|
||||
Free(tempe);
|
||||
tempe=tempe1;
|
||||
}
|
||||
Free(str);
|
||||
if (!lx->a_depth && Bt(&lx->opts,OPTf_COMPILE_TRACE))
|
||||
Un(ex->code,ex->code_U8s,64);
|
||||
Free(ex);
|
||||
}
|
||||
|
||||
U0 CmpFixUpAOTAsm(CLex *lx,CExe *ex,I64 ip2)
|
||||
{
|
||||
CAsmCtrl *a=lx->a;
|
||||
U8 *ptr;
|
||||
CExeAbsAddr *tempa,*tempa1;
|
||||
CExeImportExport *tempe,*tempe1;
|
||||
|
||||
tempa=ex->abss;
|
||||
while (tempa) {
|
||||
tempa1=tempa->next;
|
||||
tempa->next=a->abss;
|
||||
nobound_switch (tempa->type) {
|
||||
case EAA_ADD_U8:
|
||||
*(ex->code(U8 *)+tempa->ip)(U8 *)+=ip2;
|
||||
break;
|
||||
case EAA_SUB_U8:
|
||||
*(ex->code(U8 *)+tempa->ip)(U8 *)-=ip2;
|
||||
break;
|
||||
case EAA_ADD_U16:
|
||||
*(ex->code(U8 *)+tempa->ip)(U16 *)+=ip2;
|
||||
break;
|
||||
case EAA_SUB_U16:
|
||||
*(ex->code(U8 *)+tempa->ip)(U16 *)-=ip2;
|
||||
break;
|
||||
case EAA_ADD_U32:
|
||||
*(ex->code(U8 *)+tempa->ip)(U32 *)+=ip2;
|
||||
break;
|
||||
case EAA_SUB_U32:
|
||||
*(ex->code(U8 *)+tempa->ip)(U32 *)-=ip2;
|
||||
break;
|
||||
case EAA_ADD_U64:
|
||||
*(ex->code(U8 *)+tempa->ip)(I64 *)+=ip2;
|
||||
break;
|
||||
case EAA_SUB_U64:
|
||||
*(ex->code(U8 *)+tempa->ip)(I64 *)-=ip2;
|
||||
break;
|
||||
}
|
||||
a->abss=tempa;
|
||||
tempa->ip+=ip2;
|
||||
tempa=tempa1;
|
||||
}
|
||||
|
||||
tempe=ex->next_ie;
|
||||
while (tempe!=&ex->next_ie) {
|
||||
tempe1=tempe->next;
|
||||
QueRem(tempe);
|
||||
if (tempe->type<=EIE_LIT_EXPORT)
|
||||
tempe->ip+=ip2;
|
||||
else if (tempe->type<EIE_MAIN) {
|
||||
ptr=ex->code(U8 *)+tempe->ip;
|
||||
if (tempe->type<=EIE_LIT_U8)
|
||||
*ptr(U8 *)-=ip2;
|
||||
else if (tempe->type<=EIE_LIT_U16)
|
||||
*ptr(U16 *)-=ip2;
|
||||
else if (tempe->type<=EIE_LIT_U32)
|
||||
*ptr(U32 *)-=ip2;
|
||||
else if (tempe->type<=EIE_LIT_U64)
|
||||
*ptr(I64 *)-=ip2;
|
||||
tempe->ip+=ip2;
|
||||
}
|
||||
QueIns(tempe,ex->parent_exe->last_ie);
|
||||
tempe=tempe1;
|
||||
}
|
||||
Free(ex);
|
||||
}
|
||||
|
||||
I64 Cmp(U8 *filename,U8 *map_name=NULL,U8 *out_name=NULL,U8 mapfile_drv=0)
|
||||
{ //Compile file, returns err_cnt
|
||||
U8 *ptr,*fbuf=NULL,*fbuf2=NULL,*fbuf3=NULL,
|
||||
*patch_table=MAlloc(0x20000);
|
||||
CExe *ex;
|
||||
I64 i,cnt,size=0,error_cnt=0,warning_cnt=0,code_U8s=0;
|
||||
CBinFile *bfh;
|
||||
CExeImportExport *tempe,*tempe1;
|
||||
CExeAbsAddr *tempa,*tempa1;
|
||||
CExeHeapGlblRef *temphgr,*temphgr1;
|
||||
CExeHeapGlbl *temphg,*temphg1;
|
||||
|
||||
fbuf=DftExt(filename,"PRJ.Z");
|
||||
fbuf2=MSPrintF("#include \"%s\"",fbuf);
|
||||
if (map_name)
|
||||
fbuf3=DftExt(map_name,"MAP.Z");
|
||||
ex=CmpBuf(fbuf2,fbuf3,&error_cnt,&warning_cnt,mapfile_drv);
|
||||
|
||||
if (ex) {
|
||||
code_U8s=ex->code_U8s;
|
||||
ptr=patch_table;
|
||||
//See $LK,"CBinFilePatchTableWithoutOrg","MN:CBinFilePatchTableWithoutOrg"$
|
||||
*ptr++=EIE_MODULE_ALIGNMENT; //See $LK,"Load","MN:Load"$() and $LK,"BinRep","MN:BinRep"$()
|
||||
*ptr(U32 *)++=ex->max_align;
|
||||
*ptr++=0;
|
||||
if (ex->module_org!=INVALID_PTR) {
|
||||
//See $LK,"CBinFilePatchTableWithOrg","MN:CBinFilePatchTableWithOrg"$
|
||||
*ptr++=EIE_MODULE_ORG;
|
||||
*ptr(U32 *)++=ex->module_org;
|
||||
*ptr++=0;
|
||||
}
|
||||
cnt=0;
|
||||
tempa=ex->abss;
|
||||
while (tempa) {
|
||||
if (!(tempa->type&1))
|
||||
cnt++;
|
||||
tempa=tempa->next;
|
||||
}
|
||||
if (cnt) {
|
||||
*ptr++=EIE_ABS_ADDR;
|
||||
*ptr(U32 *)++=cnt;
|
||||
*ptr++=0;
|
||||
tempa=ex->abss;
|
||||
while (tempa) {
|
||||
tempa1=tempa->next;
|
||||
if (!(tempa->type&1))
|
||||
*ptr(U32 *)++ =tempa->ip;
|
||||
Free(tempa);
|
||||
tempa=tempa1;
|
||||
}
|
||||
}
|
||||
temphg=ex->heap_glbls;
|
||||
while (temphg) {
|
||||
temphg1=temphg->next;
|
||||
cnt=0;
|
||||
temphgr=temphg->references;
|
||||
while (temphgr) {
|
||||
cnt++;
|
||||
temphgr=temphgr->next;
|
||||
}
|
||||
if (cnt) {
|
||||
*ptr++=EIE_HEAP_GLBL;
|
||||
*ptr(U32 *)++=cnt;
|
||||
if (temphg->str) {
|
||||
i=StrLen(temphg->str);
|
||||
MemCpy(ptr,temphg->str,i+1);
|
||||
Free(temphg->str);
|
||||
ptr+=i+1;
|
||||
} else
|
||||
*ptr++=0;
|
||||
*ptr(I64 *)++=temphg->size;
|
||||
temphgr=temphg->references;
|
||||
while (temphgr) {
|
||||
temphgr1=temphgr->next;
|
||||
*ptr(U32 *)++=temphgr->ip;
|
||||
Free(temphgr);
|
||||
temphgr=temphgr1;
|
||||
}
|
||||
}
|
||||
Free(temphg);
|
||||
temphg=temphg1;
|
||||
}
|
||||
|
||||
//Do exports first
|
||||
tempe=ex->next_ie;
|
||||
while (tempe!=&ex->next_ie) {
|
||||
tempe1=tempe->next;
|
||||
if (tempe->type<=EIE_LIT_EXPORT) {
|
||||
QueRem(tempe);
|
||||
*ptr++=tempe->type;
|
||||
*ptr(U32 *)++=tempe->ip;
|
||||
if (tempe->str) {
|
||||
i=StrLen(tempe->str);
|
||||
MemCpy(ptr,tempe->str,i+1);
|
||||
Free(tempe->str);
|
||||
ptr+=i+1;
|
||||
} else
|
||||
*ptr++=0;
|
||||
Free(tempe->src_link);
|
||||
Free(tempe);
|
||||
}
|
||||
tempe=tempe1;
|
||||
}
|
||||
|
||||
//Do imports second
|
||||
tempe=ex->next_ie;
|
||||
while (tempe!=&ex->next_ie) {
|
||||
tempe1=tempe->next;
|
||||
QueRem(tempe);
|
||||
*ptr++=tempe->type;
|
||||
*ptr(U32 *)++=tempe->ip;
|
||||
if (tempe->str) {
|
||||
i=StrLen(tempe->str);
|
||||
MemCpy(ptr,tempe->str,i+1);
|
||||
Free(tempe->str);
|
||||
ptr+=i+1;
|
||||
} else
|
||||
*ptr++=0;
|
||||
Free(tempe->src_link);
|
||||
Free(tempe);
|
||||
tempe=tempe1;
|
||||
}
|
||||
|
||||
*ptr++=EIE_END;
|
||||
MemSet(ptr,0,16);
|
||||
i=ptr-patch_table;
|
||||
//$LK,"NATIVE_XSUM","FF:::/TempleOS/Kernel/KStart.CPP,NATIVE_XSUM"$ needs 16 ALIGN
|
||||
size=(sizeof(CBinFile)+code_U8s+i+15)&-16;
|
||||
bfh=MAlloc(size);
|
||||
bfh->jmp=0xEB+256*(sizeof(CBinFile)-2);
|
||||
#assert sizeof(CBinFile)-2<=MAX_I8
|
||||
bfh->type=0;
|
||||
bfh->loader_patch_table_offset=sizeof(CBinFile)+code_U8s;
|
||||
bfh->file_size=size;
|
||||
bfh->xsum=NATIVE_XSUM;
|
||||
MemCpy(bfh(U8 *)+sizeof(CBinFile),ex->code,code_U8s);
|
||||
MemCpy(bfh(U8 *)+sizeof(CBinFile)+code_U8s,patch_table,
|
||||
size-code_U8s-sizeof(CBinFile));
|
||||
bfh->xsum=ArcXSum(bfh,size);
|
||||
Free(fbuf2);
|
||||
if (out_name)
|
||||
fbuf2=DftExt(out_name,"BIN.Z");
|
||||
else
|
||||
fbuf2=ChgExt(fbuf,"BIN.Z");
|
||||
if (!cmp_do_not_write_to_dsk)
|
||||
FileWrite(fbuf2,bfh,size);
|
||||
Free(bfh);
|
||||
Free(ex->code);
|
||||
Free(ex);
|
||||
}
|
||||
Free(patch_table);
|
||||
Free(fbuf);
|
||||
Free(fbuf2);
|
||||
Free(fbuf3);
|
||||
PrintF(Define("ST_ERRORS_WARNINGS"),error_cnt,warning_cnt,code_U8s,size);
|
||||
return error_cnt;
|
||||
}
|
||||
|
||||
I64 ExePutS(U8 *buf,U8 *filename=NULL,Bool just_load=FALSE)
|
||||
{
|
||||
I64 result;
|
||||
Bool okay=TRUE;
|
||||
CLex *lx;
|
||||
if (!filename)
|
||||
filename=sys_temp_filename;
|
||||
lx=LexNew(buf,LF_DONT_FREE_BUF,FileNameAbs(filename));
|
||||
if (just_load)
|
||||
lx->flags|=LF_JUST_LOAD;
|
||||
if (Fs->last_lex!=&Fs->next_lex)
|
||||
lx->opts=Fs->last_lex->opts;
|
||||
QueIns(lx,Fs->last_lex);
|
||||
try {
|
||||
Lex(lx);
|
||||
result=ExeCmdLine(lx);
|
||||
} catch {
|
||||
if (Fs->except_argc>0) {
|
||||
if (Fs->except_argv[0]==EXCEPT_COMPILER ||
|
||||
Fs->except_argv[0]==EXCEPT_BREAK) {
|
||||
Fs->catch_except=TRUE;
|
||||
okay=FALSE;
|
||||
result=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
QueRem(lx);
|
||||
if (okay)
|
||||
LexDel(lx); //TODO: can crash
|
||||
return result;
|
||||
}
|
||||
|
||||
I64 ExePrintF(U8 *fmt,...)
|
||||
{
|
||||
I64 result;
|
||||
U8 *buf=SPrintFJoin(NULL,fmt,argc,argv);
|
||||
result=ExePutS(buf);
|
||||
Free(buf);
|
||||
return result;
|
||||
}
|
||||
|
||||
I64 ExeFile(U8 *name,Bool just_load=FALSE)
|
||||
{
|
||||
I64 result;
|
||||
U8 *name2=DftExt(name,"CPP.Z"),
|
||||
*st=MSPrintF("#include \"%s\";",name2);
|
||||
result=ExePutS(st,name,just_load);
|
||||
Free(st);
|
||||
Free(name2);
|
||||
return result;
|
||||
}
|
||||
|
||||
I64 ExePutS2(U8 *buf,U8 *filename=NULL,Bool just_load=FALSE)
|
||||
{ //with REPLACE_SYMS
|
||||
I64 result;
|
||||
Bool okay=TRUE;
|
||||
CLex *lx;
|
||||
if (!filename)
|
||||
filename=sys_temp_filename;
|
||||
lx=LexNew(buf,LF_DONT_FREE_BUF,FileNameAbs(filename));
|
||||
if (just_load)
|
||||
lx->flags|=LF_JUST_LOAD;
|
||||
if (Fs->last_lex!=&Fs->next_lex)
|
||||
lx->opts=Fs->last_lex->opts|1<<OPTf_REPLACE_SYMS;
|
||||
QueIns(lx,Fs->last_lex);
|
||||
try {
|
||||
Lex(lx);
|
||||
result=ExeCmdLine(lx);
|
||||
} catch {
|
||||
if (Fs->except_argc>0) {
|
||||
if (Fs->except_argv[0]==EXCEPT_COMPILER ||
|
||||
Fs->except_argv[0]==EXCEPT_BREAK) {
|
||||
Fs->catch_except=TRUE;
|
||||
okay=FALSE;
|
||||
result=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
QueRem(lx);
|
||||
if (okay)
|
||||
LexDel(lx); //TODO: can crash
|
||||
return result;
|
||||
}
|
||||
|
||||
I64 ExePrintF2(U8 *fmt,...)
|
||||
{ //with REPLACE_SYMS
|
||||
I64 result;
|
||||
U8 *buf=SPrintFJoin(NULL,fmt,argc,argv);
|
||||
result=ExePutS2(buf);
|
||||
Free(buf);
|
||||
return result;
|
||||
}
|
||||
|
||||
I64 ExeFile2(U8 *name,Bool just_load=FALSE)
|
||||
{ //with REPLACE_SYMS
|
||||
I64 result;
|
||||
U8 *name2=DftExt(name,"CPP.Z"),
|
||||
*st=MSPrintF("#include \"%s\";",name2);
|
||||
result=ExePutS2(st,name,just_load);
|
||||
Free(st);
|
||||
Free(name2);
|
||||
return result;
|
||||
}
|
||||
|
||||
I64 ExePutS3(U8 *buf,U8 *filename=NULL,Bool just_load=FALSE)
|
||||
{ //throws exceptions
|
||||
I64 result;
|
||||
CLex *lx;
|
||||
if (!filename)
|
||||
filename=sys_temp_filename;
|
||||
lx=LexNew(buf,LF_DONT_FREE_BUF,FileNameAbs(filename));
|
||||
if (just_load)
|
||||
lx->flags|=LF_JUST_LOAD;
|
||||
if (Fs->last_lex!=&Fs->next_lex)
|
||||
lx->opts=Fs->last_lex->opts;
|
||||
QueIns(lx,Fs->last_lex);
|
||||
Lex(lx);
|
||||
result=ExeCmdLine(lx);
|
||||
QueRem(lx);
|
||||
LexDel(lx);
|
||||
return result;
|
||||
}
|
||||
|
||||
I64 ExePrintF3(U8 *fmt,...)
|
||||
{ //throws exceptions
|
||||
I64 result;
|
||||
U8 *buf=SPrintFJoin(NULL,fmt,argc,argv);
|
||||
result=ExePutS3(buf);
|
||||
Free(buf);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
I64 ExeFile3(U8 *name,Bool just_load=FALSE)
|
||||
{ //throws exceptions
|
||||
I64 result;
|
||||
U8 *name2=DftExt(name,"CPP.Z"),
|
||||
*st=MSPrintF("#include \"%s\";",name2);
|
||||
result=ExePutS3(st,name,just_load);
|
||||
Free(st);
|
||||
Free(name2);
|
||||
return result;
|
||||
}
|
||||
|
||||
U0 CmpInit()
|
||||
{
|
||||
if (!sys_num_installed_compilers++) {
|
||||
is_first_compiler=TRUE;
|
||||
fp_prs_stream_blk=&PrsStreamBlk;
|
||||
} else
|
||||
is_first_compiler=FALSE;
|
||||
compiled_lines=0;
|
||||
compiled_funs=0;
|
||||
compiled_bytes=0;
|
||||
cmp_do_not_write_to_dsk=FALSE;
|
||||
CmpLoadDefines;
|
||||
CmpFillTables;
|
||||
MemSet(&opt_nop,0,sizeof(CIntermediateCode));
|
||||
opt_nop.ic_class=sys_internal_types[IT_I64];
|
||||
|
||||
opt_nop.ic_opcode=IC_NOP;
|
||||
AsmHashLoad(is_first_compiler);
|
||||
UnasmHashLoad;
|
||||
}
|
||||
|
||||
CmpInit;
|
||||
@@ -0,0 +1,67 @@
|
||||
CQueVectU8 *QueVectU8New(I64 min_index=0)
|
||||
{
|
||||
CQueVectU8 *result=MAlloc(sizeof(CQueVectU8));
|
||||
result->next=result->last=result;
|
||||
result->total_cnt=result->node_cnt=0;
|
||||
result->min_index=min_index;
|
||||
return result;
|
||||
}
|
||||
|
||||
U0 QueVectU8Put(CQueVectU8 *v,I64 index,U8 ch)
|
||||
{
|
||||
CQueVectU8 *tempv;
|
||||
index-=v->min_index;
|
||||
if (index<0) return;
|
||||
if (index<v->total_cnt) {
|
||||
tempv=v;
|
||||
do {
|
||||
index-=tempv->node_cnt;
|
||||
if (index<0) {
|
||||
tempv->body[index+tempv->node_cnt]=ch;
|
||||
return;
|
||||
}
|
||||
tempv=tempv->next;
|
||||
} while (tempv!=v);
|
||||
} else
|
||||
index-=v->total_cnt;
|
||||
|
||||
while (TRUE) {
|
||||
tempv=v->last;
|
||||
if (tempv->node_cnt>=QUE_VECT_U8_CNT) {
|
||||
tempv=MAlloc(sizeof(CQueVectU8));
|
||||
tempv->node_cnt=0;
|
||||
QueIns(tempv,v->last);
|
||||
}
|
||||
if (index--) {
|
||||
tempv->body[tempv->node_cnt++]=0;
|
||||
v->total_cnt++;
|
||||
} else {
|
||||
tempv->body[tempv->node_cnt++]=ch;
|
||||
v->total_cnt++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
U0 QueVectU8Del(CQueVectU8 *v)
|
||||
{
|
||||
if (v) {
|
||||
QueDel(v);
|
||||
Free(v);
|
||||
}
|
||||
}
|
||||
|
||||
I64 QueVectU8Get(CQueVectU8 *v,I64 index)
|
||||
{
|
||||
CQueVectU8 *tempv;
|
||||
index-=v->min_index;
|
||||
if (!(0<=index<v->total_cnt)) return 0;
|
||||
tempv=v;
|
||||
do {
|
||||
index-=tempv->node_cnt;
|
||||
if (index<0)
|
||||
return tempv->body[index+tempv->node_cnt];
|
||||
tempv=tempv->next;
|
||||
} while (tempv!=v);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,509 @@
|
||||
U0 CBPutClass(CHashClass *c)
|
||||
{
|
||||
I64 i;
|
||||
if (!c) return;
|
||||
if (c->ptr_cnt>4) {
|
||||
PrintFErr("put_class ptrcnt=%d\n",c->ptr_cnt);
|
||||
while (TRUE)
|
||||
//TODO:
|
||||
Yield;
|
||||
}
|
||||
for (i=0;i<c->ptr_cnt;i++)
|
||||
'*';
|
||||
c-=c->ptr_cnt;
|
||||
if (c->str)
|
||||
"" c->str;
|
||||
else {
|
||||
PrintFErr("put_class str=NULL\n");
|
||||
while (TRUE)
|
||||
//TODO:
|
||||
Yield;
|
||||
}
|
||||
'' CH_SPACE;
|
||||
}
|
||||
|
||||
|
||||
U0 CBPutICArg(CICArg *p)
|
||||
{
|
||||
if (p->ptype)
|
||||
"%Z %Z %Z ",
|
||||
p->type&IT_MASK,"ST_IT_TYPES",
|
||||
p->ptype&IT_MASK,"ST_IT_TYPES",
|
||||
p->type>>4,"ST_TY_TYPES";
|
||||
else
|
||||
"%Z %Z ",
|
||||
p->type&IT_MASK,"ST_IT_TYPES",
|
||||
p->type>>4,"ST_TY_TYPES";
|
||||
switch (p->type>>4) {
|
||||
case TY_STK>>4:
|
||||
"STK";
|
||||
break;
|
||||
case TY_IMM>>4:
|
||||
"#%X",p->disp;
|
||||
break;
|
||||
case TY_REG>>4:
|
||||
"%Z",p->reg,"ST_U64_REGS";
|
||||
break;
|
||||
case TY_DISP>>4:
|
||||
"%X[%Z]",p->disp,p->reg,"ST_U64_REGS";
|
||||
break;
|
||||
case TY_RIP_DISP32>>4:
|
||||
"[%X]",p->disp;
|
||||
break;
|
||||
case TY_SIB>>4:
|
||||
if (p->disp)
|
||||
"%X",p->disp;
|
||||
if (p->reg==CREG_RIP)
|
||||
'[';
|
||||
else
|
||||
"[%Z+",p->reg&7,"ST_U64_REGS";
|
||||
"%Z",p->reg>>8&7,"ST_U64_REGS";
|
||||
switch (p->reg>>14) {
|
||||
case 0: "]"; break;
|
||||
case 1: "*2]"; break;
|
||||
case 2: "*4]"; break;
|
||||
case 3: "*8]"; break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
U0 CBPutIC(CIntermediateCode *tempi)
|
||||
{
|
||||
I64 opcode=tempi->ic_opcode,i;
|
||||
if (opcode>=IC_END_EXP && opcode!=IC_NOP1) {
|
||||
"%15ts %016X ",
|
||||
DefineSub(opcode,"ST_INTERMEDIATE_CODE")+4,
|
||||
tempi->ic_data;
|
||||
if (tempi->r.type&TY_MASK) {
|
||||
CBPutICArg(&tempi->r);
|
||||
"<-";
|
||||
}
|
||||
if (tempi->p1.type&TY_MASK)
|
||||
CBPutICArg(&tempi->p1);
|
||||
',';
|
||||
if (tempi->p2.type&TY_MASK)
|
||||
CBPutICArg(&tempi->p2);
|
||||
',';
|
||||
if (tempi->p3.type&TY_MASK)
|
||||
CBPutICArg(&tempi->p3);
|
||||
'' CH_SPACE;
|
||||
CBPutClass(tempi->ic_class);
|
||||
if (tempi->ic_flags & ICF_LOCK)
|
||||
"$$FG,BROWN$$lock$$FG$$ ";
|
||||
if (tempi->ic_flags & ICF_P3_TO_F64)
|
||||
"$$FG,LTBLUE$$p3d$$FG$$ ";
|
||||
if (tempi->ic_flags & ICF_P3_TO_INT)
|
||||
"$$FG,GREEN$$p3i$$FG$$ ";
|
||||
if (tempi->ic_flags & ICF_P2_TO_F64)
|
||||
"$$FG,LTBLUE$$p2d$$FG$$ ";
|
||||
if (tempi->ic_flags & ICF_P2_TO_INT)
|
||||
"$$FG,GREEN$$p2i$$FG$$ ";
|
||||
if (tempi->ic_flags & ICF_P1_TO_F64)
|
||||
"$$FG,LTBLUE$$p1d$$FG$$ ";
|
||||
if (tempi->ic_flags & ICF_P1_TO_INT)
|
||||
"$$FG,GREEN$$p1i$$FG$$ ";
|
||||
if (tempi->ic_flags & ICF_R_TO_F64)
|
||||
"$$FG,LTBLUE$$rd$$FG$$ ";
|
||||
if (tempi->ic_flags & ICF_R_TO_INT)
|
||||
"$$FG,GREEN$$ri$$FG$$ ";
|
||||
if (tempi->ic_flags & ICF_USE_F64)
|
||||
"[F64] ";
|
||||
if (tempi->ic_flags & ICF_USE_UNSIGNED)
|
||||
"[unsigned] ";
|
||||
if (tempi->ic_flags & ICF_USE_INT)
|
||||
"[int] ";
|
||||
if (tempi->ic_flags & ICF_NO_DEPEND_RESULT)
|
||||
"-DEP ";
|
||||
if (tempi->ic_flags & ICF_DEPEND_RESULT)
|
||||
"+DEP ";
|
||||
if (tempi->ic_flags & ICF_NOT_ADDR)
|
||||
"NOT_ADDR ";
|
||||
if (tempi->ic_flags & ICF_PUSH_RESULT)
|
||||
"PUSH ";
|
||||
if (tempi->ic_flags & ICF_PUSH_CMP)
|
||||
"PUSH_CMP ";
|
||||
if (tempi->ic_flags & ICF_POP_CMP)
|
||||
"POP_CMP ";
|
||||
if (tempi->ic_flags & ICF_DEL_PREVIOUS_INS)
|
||||
"DELINS ";
|
||||
for (i=0;i<4;i++) {
|
||||
if (Bt(&tempi->ic_flags,ICf_DONT_PUSH_FLOAT0+i))
|
||||
"DONT_PUSH#%d ",i;
|
||||
if (Bt(&tempi->ic_flags,ICf_DONT_POP_FLOAT0+i))
|
||||
"DONT_POP#%d ",i;
|
||||
}
|
||||
if (tempi->ic_flags & ICF_ALTERNATE_TEMPLATE)
|
||||
"ALT_TEMP ";
|
||||
NewLine;
|
||||
}
|
||||
}
|
||||
|
||||
CIntermediateCode *CBICAdd(CLex *lx,
|
||||
I64 opcode_and_precedence,I64 arg, CHashClass *c,I64 flags=0)
|
||||
{
|
||||
CIntermediateCode *tempi=lx->cbh.cb_out_ptr;
|
||||
CCodeBlk *cb,*cb1;
|
||||
lx->cbh.cb_last_out_ptr=tempi;
|
||||
tempi->ic_opcode=opcode_and_precedence.u16[0];
|
||||
tempi->ic_precedence=opcode_and_precedence.u16[1];
|
||||
tempi->ic_data=arg;
|
||||
tempi->ic_class=c;
|
||||
if (Bt(&lx->opts,OPTf_OPT_TRACE)) {
|
||||
Bts(&lx->flags,Lf_OPT_TRACE_PRESENT);
|
||||
flags|=ICF_TRACE;
|
||||
}
|
||||
if (lx->lock_cnt)
|
||||
flags|=ICF_LOCK;
|
||||
tempi->ic_flags=flags;
|
||||
tempi->ic_line=lx->last_line_num;
|
||||
tempi->ic_indent_level=lx->indent_level;
|
||||
if (lx->opts & OPTF_PARSE_TRACE)
|
||||
CBPutIC(tempi);
|
||||
tempi++;
|
||||
if (tempi>=lx->cbh.cb_out_end) {
|
||||
cb=MAlloc(sizeof(CCodeBlk));
|
||||
cb->next=NULL;
|
||||
cb1=lx->cbh.cb_out_last;
|
||||
cb1->next=lx->cbh.cb_out_last=cb;
|
||||
tempi=&cb->data;
|
||||
lx->cbh.cb_out_end=tempi+CB_IC_CNT;
|
||||
}
|
||||
lx->cbh.cb_out_ptr=tempi;
|
||||
return lx->cbh.cb_last_out_ptr;
|
||||
}
|
||||
|
||||
U0 CBOutPtrsInit(CLex *lx)
|
||||
{
|
||||
CLexCodeBlkCtrl *tempcbh=&lx->cbh;
|
||||
CCodeBlk *cb=MAlloc(sizeof(CCodeBlk));
|
||||
cb->next=NULL;
|
||||
tempcbh->cb_out_first=tempcbh->cb_out_last=cb;
|
||||
tempcbh->cb_misc_lst=NULL;
|
||||
tempcbh->cb_misc_lst_end=&tempcbh->cb_misc_lst;
|
||||
tempcbh->cb_out_ptr=&cb->data;
|
||||
tempcbh->cb_out_end=tempcbh->cb_out_ptr+CB_IC_CNT;
|
||||
tempcbh->cb_last_out_ptr=&cb->data;
|
||||
}
|
||||
|
||||
U0 CBInPtrsInit(CLexCodeBlkCtrl *tempcbh)
|
||||
{
|
||||
CCodeBlk *cb=tempcbh->cb_out_first;
|
||||
tempcbh->cb_in_first=cb;
|
||||
tempcbh->cb_in_ptr=&cb->data;
|
||||
tempcbh->cb_in_end=tempcbh->cb_in_ptr+CB_IC_CNT;
|
||||
}
|
||||
|
||||
U0 CBPutAllIC(CLex *lx)
|
||||
{
|
||||
CIntermediateCode *tempi;
|
||||
CBInPtrsInit(&lx->cbh);
|
||||
tempi=lx->cbh.cb_in_ptr;
|
||||
while (tempi->ic_opcode) {
|
||||
if (tempi->ic_flags&ICF_TRACE)
|
||||
CBPutIC(tempi);
|
||||
tempi++;
|
||||
}
|
||||
}
|
||||
|
||||
CIntermediateCode *CBGetIC1(CLexCodeBlkCtrl *lx)
|
||||
{
|
||||
CIntermediateCode *tempi=lx->cb_in_ptr,
|
||||
*tempi1=tempi+1;
|
||||
CCodeBlk *cb;
|
||||
if (tempi1>=lx->cb_in_end) {
|
||||
cb=tempi1(U8 *)-sizeof(CIntermediateCode)*CB_IC_CNT-offset(CCodeBlk.data);
|
||||
cb=cb->next;
|
||||
tempi1=&cb->data;
|
||||
lx->cb_in_end=tempi1+CB_IC_CNT;
|
||||
}
|
||||
lx->cb_in_ptr=tempi1;
|
||||
return tempi;
|
||||
}
|
||||
|
||||
U0 CBPush(CLex *lx)
|
||||
{
|
||||
CLexCodeBlkCtrl *tempcbh=MAlloc(sizeof(CLexCodeBlkCtrl));
|
||||
MemCpy(tempcbh,&lx->cbh,sizeof(CLexCodeBlkCtrl));
|
||||
if (lx->cbh.cb_misc_lst_end==&lx->cbh.cb_misc_lst)
|
||||
tempcbh->cb_misc_lst_end=&tempcbh->cb_misc_lst;
|
||||
lx->cbh.cb_next=tempcbh;
|
||||
}
|
||||
|
||||
U0 CBPop(CLex *lx)
|
||||
{
|
||||
CLexCodeBlkCtrl *tempcbh=lx->cbh.cb_next;
|
||||
MemCpy(&lx->cbh,tempcbh,sizeof(CLexCodeBlkCtrl));
|
||||
if (tempcbh->cb_misc_lst_end==&tempcbh->cb_misc_lst)
|
||||
lx->cbh.cb_misc_lst_end=&lx->cbh.cb_misc_lst;
|
||||
Free(tempcbh);
|
||||
}
|
||||
|
||||
CCodeBlkMisc *CBGoToLabelFind(CLex *lx,U8 *name)
|
||||
{
|
||||
CCodeBlkMisc *mc=lx->cbh.cb_misc_lst;
|
||||
while (mc) {
|
||||
if (mc->type==CBMT_GOTO_LABEL) {
|
||||
if (!StrCmp(mc->str,name))
|
||||
return mc;
|
||||
}
|
||||
mc=mc->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CCodeBlkMisc *CBMiscNew(CLex *lx,I64 ty)
|
||||
{
|
||||
CCodeBlkMisc *result=CAlloc(sizeof(CCodeBlkMisc));
|
||||
lx->cbh.cb_misc_lst_end->next=result;
|
||||
lx->cbh.cb_misc_lst_end=result;
|
||||
result->addr=INVALID_PTR;
|
||||
result->type=ty;
|
||||
return result;
|
||||
}
|
||||
|
||||
I64 CBFloatConstFind(CLex *lx,F64 d)
|
||||
{
|
||||
I64 i;
|
||||
CCodeBlkMisc *mc=lx->cbh.cb_misc_lst;
|
||||
while (mc) {
|
||||
if (mc->type==CBMT_FLOAT_CONSTS) {
|
||||
for (i=0;i<mc->num_consts;i++)
|
||||
if (mc->float_consts[i]==d)
|
||||
return mc->addr+i*sizeof(F64);
|
||||
if (mc->num_consts<CBM_MAX_CONSTS) {
|
||||
mc->float_consts[mc->num_consts++]=d;
|
||||
return mc->addr+i*sizeof(F64);
|
||||
}
|
||||
}
|
||||
mc=mc->next;
|
||||
}
|
||||
mc=CBMiscNew(lx,CBMT_FLOAT_CONSTS);
|
||||
mc->float_consts=MAlloc(CBM_MAX_CONSTS*sizeof(F64));
|
||||
mc->float_consts[mc->num_consts++]=d;
|
||||
return mc->addr;
|
||||
}
|
||||
|
||||
U0 CBMiscLstDel(CLex *lx)
|
||||
{
|
||||
CCodeBlkMisc *mc=lx->cbh.cb_misc_lst,*mc1;
|
||||
U8 *undef=NULL;
|
||||
while (mc) {
|
||||
mc1=mc->next;
|
||||
switch (mc->type) {
|
||||
case CBMT_GOTO_LABEL:
|
||||
if (!(mc->flags&CBMF_DEFINED)) {
|
||||
undef=mc->str;
|
||||
mc->str=NULL;
|
||||
} else if (!(mc->flags&CBMF_USED)) {
|
||||
PrintFWarn("%S%s\n","ST_UNUSED_LABEL",mc->str);
|
||||
LexPutWarn(lx,"ST_UNUSED_LABEL_AT");
|
||||
}
|
||||
break;
|
||||
case CBMT_JMP_TABLE:
|
||||
Free(mc->jmp_table);
|
||||
break;
|
||||
case CBMT_FLOAT_CONSTS:
|
||||
Free(mc->float_consts);
|
||||
break;
|
||||
case CBMT_ARRAY_DIM:
|
||||
LinkedLstDel(mc->dim);
|
||||
break;
|
||||
case CBMT_HASH_ENTRY:
|
||||
HashDel(mc->h);
|
||||
break;
|
||||
}
|
||||
Free(mc->str);
|
||||
Free(mc);
|
||||
mc=mc1;
|
||||
}
|
||||
if (undef) {
|
||||
PrintFErr("%S%s\n","ST_UNDEFINED_GOTO_LABEL",undef);
|
||||
Free(undef);
|
||||
LexExcept(lx,"ST_UNDEFINED_GOTO_LABEL_AT");
|
||||
}
|
||||
}
|
||||
|
||||
CLex *CBPopNoFree(CLex *lx)
|
||||
{
|
||||
CLexCodeBlkCtrl *tempcbh=lx->cbh.cb_next;
|
||||
MemCpy(&lx->cbh,tempcbh,sizeof(CLexCodeBlkCtrl));
|
||||
if (tempcbh->cb_misc_lst_end==&tempcbh->cb_misc_lst)
|
||||
lx->cbh.cb_misc_lst_end=&lx->cbh.cb_misc_lst;
|
||||
return tempcbh;
|
||||
}
|
||||
|
||||
U0 CBAppend(CLex *lx, CLexCodeBlkCtrl *tempcbh)
|
||||
{
|
||||
CIntermediateCode *tempi,*tempi1;
|
||||
CBInPtrsInit(tempcbh);
|
||||
do {
|
||||
tempi=CBGetIC1(tempcbh);
|
||||
if (tempi->ic_opcode) {
|
||||
tempi1=CBICAdd(lx,tempi->ic_opcode+tempi->ic_precedence<<16,tempi->ic_data,
|
||||
tempi->ic_class,tempi->ic_flags);
|
||||
tempi1->ic_line=tempi->ic_line;
|
||||
}
|
||||
} while (tempi->ic_opcode);
|
||||
LinkedLstDel(tempcbh->cb_out_first);
|
||||
|
||||
if (tempcbh->cb_misc_lst_end!=&tempcbh->cb_misc_lst) {
|
||||
lx->cbh.cb_misc_lst_end->next=tempcbh->cb_misc_lst;
|
||||
lx->cbh.cb_misc_lst_end=tempcbh->cb_misc_lst_end;
|
||||
}
|
||||
Free(tempcbh);
|
||||
}
|
||||
|
||||
U0 CBCombine(CLex *lx)
|
||||
{
|
||||
CCodeBlk *cb=lx->cbh.cb_out_first,*cb1,*cb2;
|
||||
I64 i=0,j=sizeof(CIntermediateCode)*CB_IC_CNT;
|
||||
U8 *ptr;
|
||||
while (cb) {
|
||||
i++;
|
||||
cb=cb->next;
|
||||
}
|
||||
if (i>1) {
|
||||
cb1=MAlloc(i*j+offset(CCodeBlk.data));
|
||||
cb1->next=NULL;
|
||||
cb=lx->cbh.cb_out_first;
|
||||
ptr=&cb1->data;
|
||||
i--;
|
||||
while (i--) {
|
||||
cb2=cb->next;
|
||||
MemCpy(ptr,&cb->data,j);
|
||||
ptr+=j;
|
||||
Free(cb);
|
||||
cb=cb2;
|
||||
}
|
||||
MemCpy(ptr,&cb->data,lx->cbh.cb_out_ptr(I64)-(&cb->data)(I64));
|
||||
Free(cb);
|
||||
lx->cbh.cb_out_first=cb1;
|
||||
}
|
||||
}
|
||||
|
||||
CIndentInfo *CBIndents(CLex *lx)
|
||||
{
|
||||
CIndentInfo *result;
|
||||
I64 i,num_lines=lx->max_line-lx->min_line+1;
|
||||
result=CAlloc(offset(CIndentInfo.body)+sizeof(U8)*(num_lines+1));
|
||||
result->min_line=lx->min_line;
|
||||
result->max_line=lx->max_line;
|
||||
for (i=0;i<num_lines;i++)
|
||||
result->body[i]=QueVectU8Get(lx->indent_que_vect,i+lx->min_line);
|
||||
return result;
|
||||
}
|
||||
|
||||
U8 *CBCompile(CLex *lx,CHashFun *fun_class,
|
||||
I64 *code_size,CDbgInfo **_dbg,CIndentInfo **_indent,I64 *type=NULL)
|
||||
{
|
||||
U8 *result;
|
||||
COptReg register_offsets[NUM_REGS];
|
||||
if (_dbg)
|
||||
*_dbg=NULL;
|
||||
if (_indent)
|
||||
*_indent=NULL;
|
||||
|
||||
CBCombine(lx);
|
||||
if (Bt(&lx->flags,Lf_OPT_TRACE_PRESENT)) {
|
||||
if (Bt(&lx->pass_trace_mask,0)) {
|
||||
"$$IV,1$$Before Pass 1:$$IV,0$$\n";
|
||||
CBPutAllIC(lx);
|
||||
}
|
||||
}
|
||||
lx->pass=1;
|
||||
OptPass012(lx,fun_class,TRUE);
|
||||
if (Bt(&lx->flags,Lf_OPT_TRACE_PRESENT)) {
|
||||
if (Bt(&lx->pass_trace_mask,1)) {
|
||||
"$$IV,1$$After Pass 1:$$IV,0$$\n";
|
||||
CBPutAllIC(lx);
|
||||
}
|
||||
}
|
||||
lx->pass=2;
|
||||
OptPass012(lx,fun_class,TRUE);
|
||||
if (Bt(&lx->flags,Lf_OPT_TRACE_PRESENT)) {
|
||||
if (Bt(&lx->pass_trace_mask,2)) {
|
||||
"$$IV,1$$After Pass 2:$$IV,0$$\n";
|
||||
CBPutAllIC(lx);
|
||||
}
|
||||
}
|
||||
lx->pass=3;
|
||||
OptPass3(lx,fun_class,register_offsets);
|
||||
if (Bt(&lx->flags,Lf_OPT_TRACE_PRESENT)) {
|
||||
if (Bt(&lx->pass_trace_mask,3)) {
|
||||
"$$IV,1$$After Pass 3:$$IV,0$$\n";
|
||||
CBPutAllIC(lx);
|
||||
}
|
||||
}
|
||||
lx->pass=4;
|
||||
OptPass4(lx,register_offsets,type);
|
||||
if (Bt(&lx->flags,Lf_OPT_TRACE_PRESENT)) {
|
||||
if (Bt(&lx->pass_trace_mask,4)) {
|
||||
"$$IV,1$$After Pass 4:$$IV,0$$\n";
|
||||
CBPutAllIC(lx);
|
||||
}
|
||||
}
|
||||
lx->pass=5;
|
||||
OptPass5(lx);
|
||||
if (Bt(&lx->flags,Lf_OPT_TRACE_PRESENT)) {
|
||||
if (Bt(&lx->pass_trace_mask,5)) {
|
||||
"$$IV,1$$After Pass 5:$$IV,0$$\n";
|
||||
CBPutAllIC(lx);
|
||||
}
|
||||
}
|
||||
lx->pass=6;
|
||||
OptPass6(lx,fun_class);
|
||||
if (Bt(&lx->flags,Lf_OPT_TRACE_PRESENT)) {
|
||||
if (Bt(&lx->pass_trace_mask,6)) {
|
||||
"$$IV,1$$After Pass 6:$$IV,0$$\n";
|
||||
CBPutAllIC(lx);
|
||||
}
|
||||
}
|
||||
|
||||
if (Bt(&lx->flags,Lf_OPT_TRACE_PRESENT))
|
||||
if (Bt(&lx->pass_trace_mask,7))
|
||||
"$$IV,1$$Pass 7:$$IV,0$$\n";
|
||||
lx->pass=7;
|
||||
OptPass789A(lx,fun_class,register_offsets,NULL,NULL);
|
||||
|
||||
if (Bt(&lx->flags,Lf_OPT_TRACE_PRESENT))
|
||||
if (Bt(&lx->pass_trace_mask,8))
|
||||
"$$IV,1$$Pass 8:$$IV,0$$\n";
|
||||
lx->pass=8;
|
||||
OptPass789A(lx,fun_class,register_offsets,NULL,NULL);
|
||||
|
||||
if (Bt(&lx->flags,Lf_OPT_TRACE_PRESENT))
|
||||
if (Bt(&lx->pass_trace_mask,9))
|
||||
"$$IV,1$$Pass 9:$$IV,0$$\n";
|
||||
lx->pass=9;
|
||||
*code_size=OptPass789A(lx,fun_class,register_offsets,NULL,NULL);
|
||||
if (lx->flags&LF_AOT_COMPILE)
|
||||
result=MAlloc(*code_size);
|
||||
else
|
||||
result=MAlloc(*code_size,Fs->code_heap);
|
||||
|
||||
if (Bt(&lx->flags,Lf_OPT_TRACE_PRESENT))
|
||||
if (Bt(&lx->pass_trace_mask,0xA))
|
||||
"$$IV,1$$Pass A:$$IV,0$$\n";
|
||||
lx->pass=0xA;
|
||||
*code_size=OptPass789A(lx,fun_class,register_offsets,result,_dbg);
|
||||
compiled_bytes+=*code_size;
|
||||
|
||||
if (_indent && lx->indent_que_vect)
|
||||
*_indent=CBIndents(lx);
|
||||
|
||||
LinkedLstDel(lx->cbh.cb_out_first);
|
||||
CBMiscLstDel(lx);
|
||||
if (Bt(&lx->opts,OPTf_COMPILE_TRACE)) {
|
||||
if (lx->flags&LF_AOT_COMPILE) {
|
||||
if (lx->a->seg_size==16)
|
||||
Un(result,*code_size,16);
|
||||
else if (lx->a->seg_size==64)
|
||||
Un(result,*code_size,64);
|
||||
else
|
||||
Un(result,*code_size,32);
|
||||
} else
|
||||
Un(result,*code_size,64);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,84 @@
|
||||
#help_index "Compiler/Lex"
|
||||
#help_file "::/TempleOS/Doc/Lex"
|
||||
public extern CLex *LexNew(U8 *buf,I64 flags,U8 *filename=NULL);
|
||||
public extern U0 LexDel(CLex *lx);
|
||||
public extern I64 LexSize(CLex *lx);
|
||||
public extern U0 SetSrcFileInfo(CLex *lx,CHashSrcSym *h);
|
||||
public extern U0 LexPutToken(CLex *lx);
|
||||
public extern I64 LexGetChar(CLex *lx);
|
||||
public extern U0 LexSkipEol(CLex *lx);
|
||||
public extern U0 LexPush(CLex *lx);
|
||||
public extern U0 LexPop(CLex *lx);
|
||||
//public extern U0 LexSubStkPtr(CLex *lx);
|
||||
public extern I64 Lex(CLex *lx);
|
||||
public extern U8 *LexExtStr(CLex *lx,I64 *_size=NULL);
|
||||
public extern U0 LexPutLine(CLex *lx,U8 *start);
|
||||
public extern U0 LexPutPos(CLex *lx);
|
||||
public extern U0 LexPutWarn(CLex *lx,U8 *name=NULL,CHashFun *fun_class=NULL);
|
||||
public extern U0 LexExcept(CLex *lx,U8 *name=NULL,CHashFun *fun_class=NULL);
|
||||
public extern U8 *CmpExpression(CLex *lx,I64 *type=NULL);
|
||||
public extern U8 *CmpStatement(CLex *lx,I64 *type);
|
||||
public extern I64 GetExpression(CLex *lx,U8 **ex); //FALSE=no err
|
||||
public extern I64 Expression(CLex *lx);
|
||||
public extern U0 ExpressionDel(U8 *code);
|
||||
public extern I64 MemberMetaData(U8 *st,CMemberLst *ml);
|
||||
extern U0 MemberLstDel(CHashClass *c);
|
||||
public extern CMemberLstMeta *MemberMetaFind(U8 *st,CMemberLst *ml);
|
||||
public extern CMemberLst *MemberFind(U8 *st,CHashClass *c);
|
||||
public extern CMemberLst *MemberFind2(CHashClass *pattern,CHashClass *tempc);
|
||||
public extern U0 LexIncludeDoc(CLex *lx,U8 *filename,CDoc *_doc);
|
||||
|
||||
#help_index "Compiler/Directive"
|
||||
#help_file "::/TempleOS/Doc/Directives"
|
||||
public extern U0 StreamPutS(U8 *st);
|
||||
public extern U0 StreamPrintF(U8 *src,...);
|
||||
public extern Bool PTrace(Bool val);
|
||||
public extern Bool OTrace(Bool val);
|
||||
public extern I64 OPassTraceMask(I64 i=0b1001111101);
|
||||
public extern Bool OptEqu(I64 num,Bool val);
|
||||
public extern Bool OptOn(I64 num);
|
||||
public extern Bool OptOff(I64 num);
|
||||
public extern Bool GetOpt(I64 num);
|
||||
public extern Bool CTrace(Bool val);
|
||||
public extern Bool LTrace(Bool val);
|
||||
public extern Bool Echo(Bool val);
|
||||
public extern Bool IsReplaceSyms();
|
||||
public extern U0 ImportHashTable(CHashTable *tempht);
|
||||
public extern I64 IncludeDepth();
|
||||
|
||||
#help_index "Hash"
|
||||
extern CHashSrcSym *HashEntryImportCopy(CHashSrcSym *temph);
|
||||
extern U0 HashTableImport(CHashTable *src,CHashTable *dst);
|
||||
public extern I64 HashEntrySize(CHashSrcSym *temph);
|
||||
public extern I64 HashEntrySize2(CHashSrcSym *temph);
|
||||
public extern I64 HashTableSize2(CHashTable *table);
|
||||
|
||||
|
||||
#help_index "Compiler;Cmd Line (Typically)"
|
||||
public extern I64 Cmp(U8 *filename,U8 *map_name=NULL,U8 *out_name=NULL,U8 mapfile_drv=0);
|
||||
|
||||
#help_index "Compiler"
|
||||
public extern I64 ExePutS(U8 *buf,U8 *filename=NULL,Bool just_load=FALSE);
|
||||
public extern I64 ExePrintF(U8 *fmt,...);
|
||||
public extern I64 ExeFile(U8 *name,Bool just_load=FALSE);
|
||||
public extern I64 ExePutS2(U8 *buf,U8 *filename=NULL,Bool just_load=FALSE);
|
||||
public extern I64 ExePrintF2(U8 *fmt,...);
|
||||
public extern I64 ExeFile2(U8 *name,Bool just_load=FALSE);
|
||||
public extern I64 ExePutS3(U8 *buf,U8 *filename=NULL,Bool just_load=FALSE);
|
||||
public extern I64 ExePrintF3(U8 *fmt,...);
|
||||
public extern I64 ExeFile3(U8 *name,Bool just_load=FALSE);
|
||||
extern CHashTable *asm_hash;
|
||||
extern U0 CmpInit(Bool first);
|
||||
extern I64 compiled_lines,compiled_funs,compiled_bytes;
|
||||
|
||||
|
||||
|
||||
//The following is for benchmarking
|
||||
extern Bool cmp_do_not_write_to_dsk;
|
||||
|
||||
#help_index "Debugging/Dump"
|
||||
public extern U0 Ui(U8 *buf,U8 **_ip,I64 seg_size=64,I64 *_jmp_dst=NULL,Bool just_ins=FALSE);
|
||||
public extern U8 *U(U8 *ip,I64 cnt=20,I64 seg_size=64);
|
||||
public extern I64 Un(U8 *ip,I64 cnt=0x80,I64 seg_size=64);
|
||||
|
||||
#help_index ""
|
||||
@@ -0,0 +1,736 @@
|
||||
$LK+BI,"AsmCodeInstruction ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,824",1$$LK+BI,"","AsmCodeInstruction",2$000000CC7E 0001 0000001423 Funct
|
||||
$LK+BI,"AsmExpressionEval ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,202",3$$LK+BI,"","AsmExpressionEval",4$000000B280 0004 00000000B8 Funct
|
||||
$LK+BI,"AsmGlblsResolve ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,290",5$$LK+BI,"","AsmGlblsResolve",6$000000B668 0001 00000005D7 Funct
|
||||
$LK+BI,"AsmHashLoad ","FL:D:/TempleOS/Compiler/CmpInit.CPP.Z,77",7$$LK+BI,"","AsmHashLoad",8$0000034C80 0001 0000000665 Funct
|
||||
$LK+BI,"AsmLineLst ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,29",9$$LK+BI,"","AsmLineLst",10$000000AC78 0001 0000000143 Funct
|
||||
$LK+BI,"AsmLocalsResolve ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,224",11$$LK+BI,"","AsmLocalsResolve",12$000000B338 0003 0000000329 Funct
|
||||
$LK+BI,"AsmMakeArgMask ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,601",13$$LK+BI,"","AsmMakeArgMask",14$000000C208 0002 000000045D Funct
|
||||
$LK+BI,"AsmPrsInsFlags ","FL:D:/TempleOS/Compiler/CmpInit.CPP.Z,27",15$$LK+BI,"","AsmPrsInsFlags",16$0000034420 0001 000000085D Funct
|
||||
$LK+BI,"AsmReserveCodeTo ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,185",17$$LK+BI,"","AsmReserveCodeTo",18$000000B200 0001 000000007D Funct
|
||||
$LK+BI,"AsmStoreCodeU32 ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,90",19$$LK+BI,"","AsmStoreCodeU32",20$000000AEC0 0001 0000000149 Funct
|
||||
$LK+BI,"AsmStoreCodeU64 ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,129",21$$LK+BI,"","AsmStoreCodeU64",22$000000B010 0005 000000014A Funct
|
||||
$LK+BI,"AsmStoreCodeU8 ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,61",23$$LK+BI,"","AsmStoreCodeU8",24$000000ADC0 001C 00000000FF Funct
|
||||
$LK+BI,"AsmStoreCodeU8At ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,168",25$$LK+BI,"","AsmStoreCodeU8At",26$000000B160 0016 00000000A0 Funct
|
||||
$LK+BI,"AsmStoreNum ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,685",27$$LK+BI,"","AsmStoreNum",28$000000C668 0004 000000060E Funct
|
||||
$LK+BI,"AsmUnresolvedAdd ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,1",29$$LK+BI,"","AsmUnresolvedAdd",30$000000AB98 0008 00000000DF Funct
|
||||
$LK+BI,"CBAppend ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,336",31$$LK+BI,"","CBAppend",32$0000009EE0 0002 000000009D Funct
|
||||
$LK+BI,"CBCombine ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,357",33$$LK+BI,"","CBCombine",34$0000009F80 0001 00000000EA Funct
|
||||
$LK+BI,"CBCompile ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,397",35$$LK+BI,"","CBCompile",36$000000A0E0 0006 00000004D6 Funct
|
||||
$LK+BI,"CBFloatConstFind ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,265",37$$LK+BI,"","CBFloatConstFind",38$0000009C40 000F 00000000BE Funct
|
||||
$LK+BI,"CBGetIC1 ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,209",39$$LK+BI,"","CBGetIC1",40$0000009AA0 0004 000000004C Funct
|
||||
$LK+BI,"CBGoToLabelFind ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,242",41$$LK+BI,"","CBGoToLabelFind",42$0000009BA8 0002 0000000048 Funct
|
||||
$LK+BI,"CBICAdd ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,142",43$$LK+BI,"","CBICAdd",44$00000098B0 00B9 0000000104 Funct
|
||||
$LK+BI,"CBInPtrsInit ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,189",45$$LK+BI,"","CBInPtrsInit",46$0000009A28 0003 0000000030 Funct
|
||||
$LK+BI,"CBIndents ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,385",47$$LK+BI,"","CBIndents",48$000000A070 0001 0000000069 Funct
|
||||
$LK+BI,"CBMiscLstDel ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,287",49$$LK+BI,"","CBMiscLstDel",50$0000009D00 0001 000000018D Funct
|
||||
$LK+BI,"CBMiscNew ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,255",51$$LK+BI,"","CBMiscNew",52$0000009BF0 001A 000000004A Funct
|
||||
$LK+BI,"CBOutPtrsInit ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,176",53$$LK+BI,"","CBOutPtrsInit",54$00000099B8 000A 000000006C Funct
|
||||
$LK+BI,"CBPop ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,233",55$$LK+BI,"","CBPop",56$0000009B50 0009 0000000051 Funct
|
||||
$LK+BI,"CBPopNoFree ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,327",57$$LK+BI,"","CBPopNoFree",58$0000009E90 0001 000000004E Funct
|
||||
$LK+BI,"CBPush ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,224",59$$LK+BI,"","CBPush",60$0000009AF0 000E 000000005D Funct
|
||||
$LK+BI,"CBPutAllIC ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,197",61$$LK+BI,"","CBPutAllIC",62$0000009A58 0007 0000000043 Funct
|
||||
$LK+BI,"CBPutClass ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,1",63$$LK+BI,"","CBPutClass",64$0000009128 0001 00000000C5 Funct
|
||||
$LK+BI,"CBPutIC ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,71",65$$LK+BI,"","CBPutIC",66$00000094E8 0006 00000003C7 Funct
|
||||
$LK+BI,"CBPutICArg ","FL:D:/TempleOS/Compiler/CodeGen.CPP.Z,26",67$$LK+BI,"","CBPutICArg",68$00000091F0 0004 00000002F3 Funct
|
||||
$LK,"CInternalType ","FL:D:/TempleOS/Compiler/CmpInit.CPP.Z,4"$007FD11CB0 0002 000000000A Class
|
||||
CMP_OPT_NOP 0000000000 0003 ExportSysSym
|
||||
$LK,"CMP_TEMPLATES ","FL:D:/TempleOS/Compiler/CmpAsm.CPP.Z,164"$0000000206 0001 ExportSysSym
|
||||
$LK,"CMP_TEMPLATES_DONT_POP ","FL:D:/TempleOS/Compiler/CmpAsm.CPP.Z,338"$000000039B 0001 ExportSysSym
|
||||
$LK,"CMP_TEMPLATES_DONT_PUSH ","FL:D:/TempleOS/Compiler/CmpAsm.CPP.Z,427"$0000000467 0001 ExportSysSym
|
||||
$LK,"CMP_TEMPLATES_DONT_PUSH2 ","FL:D:/TempleOS/Compiler/CmpAsm.CPP.Z,618"$000000063D 0001 ExportSysSym
|
||||
$LK,"CMP_TEMPLATES_DONT_PUSH_POP","FL:D:/TempleOS/Compiler/CmpAsm.CPP.Z,554"$00000005AD 0001 ExportSysSym
|
||||
$LK,"CN_MAIN ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,220"$0 0028 0000000008 DefineStr
|
||||
$LK,"CN_P1 ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,221"$1 000A 0000000008 DefineStr
|
||||
$LK,"CN_P2 ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,222"$2 0007 0000000008 DefineStr
|
||||
$LK,"CN_P3 ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,223"$3 0003 0000000008 DefineStr
|
||||
$LK,"CN_R ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,224"$4 0003 0000000008 DefineStr
|
||||
$LK,"CSwitchCase ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,1424"$007FC32130 0004 0000000018 Class
|
||||
$LK+BI,"CTrace ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,38",69$$LK+BI,"","CTrace",70$0000003A40 0000 0000000017 Funct
|
||||
$LK,"CVI2 ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,214"$007FC35730 0003 0000000010 Class
|
||||
$LK+BI,"Cmp ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,378",71$$LK+BI,"","Cmp",72$0000038FF0 0000 00000005BE Funct
|
||||
$LK+BI,"CmpBuf ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,185",73$$LK+BI,"","CmpBuf",74$00000388C0 0001 00000000F7 Funct
|
||||
$LK+BI,"CmpExpression ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,1262",75$$LK+BI,"","CmpExpression",76$0000013376 0004 00000000BB Funct
|
||||
$LK+BI,"CmpF1PushPop ","FL:D:/TempleOS/Compiler/OptPass3.CPP.Z,23",77$$LK+BI,"","CmpF1PushPop",78$000002C290 0002 0000000033 Funct
|
||||
$LK+BI,"CmpF2PushPop ","FL:D:/TempleOS/Compiler/OptPass3.CPP.Z,29",79$$LK+BI,"","CmpF2PushPop",80$000002C2C8 0005 0000000080 Funct
|
||||
$LK+BI,"CmpFillTables ","FL:D:/TempleOS/Compiler/CmpInit.CPP.Z,581",81$$LK+BI,"","CmpFillTables",82$00000379E8 0001 000000064C Funct
|
||||
$LK+BI,"CmpFixUpAOTAsm ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,312",83$$LK+BI,"","CmpFixUpAOTAsm",84$0000038D90 0000 000000025B Funct
|
||||
$LK+BI,"CmpFixUpJITAsm ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,204",85$$LK+BI,"","CmpFixUpJITAsm",86$00000389B8 0000 00000003D8 Funct
|
||||
$LK+BI,"CmpInit ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,680",87$$LK+BI,"","CmpInit",88$0000039B80 0001 00000000B9 Funct
|
||||
$LK+BI,"CmpJoin ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,60",89$$LK+BI,"","CmpJoin",90$0000038220 0001 00000006A0 Funct
|
||||
$LK+BI,"CmpLoadDefines ","FL:D:/TempleOS/Compiler/CmpInit.CPP.Z,222",91$$LK+BI,"","CmpLoadDefines",92$00000352E8 0001 0000002700 Funct
|
||||
$LK+BI,"CmpNoteFloatOp ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,226",93$$LK+BI,"","CmpNoteFloatOp",94$0000018FC6 000E 0000000251 Funct
|
||||
$LK+BI,"CmpOffset2Reg ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,133",95$$LK+BI,"","CmpOffset2Reg",96$000002720E 0005 0000000042 Funct
|
||||
$LK+BI,"CmpPType ","FL:D:/TempleOS/Compiler/OptPass3.CPP.Z,11",97$$LK+BI,"","CmpPType",98$000002C250 0006 000000003F Funct
|
||||
$LK+BI,"CmpPmt ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,1",99$$LK+BI,"","CmpPmt",100$0000003B80 0001 0000000241 Funct
|
||||
$LK+BI,"CmpSetFloatOpPushPop ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,281",101$$LK+BI,"","CmpSetFloatOpPushPop",102$000001921E 000E 000000007B Funct
|
||||
$LK+BI,"CmpStatement ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,24",103$$LK+BI,"","CmpStatement",104$00000380D0 0001 000000014C Funct
|
||||
$LK+BI,"CmpType ","FL:D:/TempleOS/Compiler/OptPass3.CPP.Z,1",105$$LK+BI,"","CmpType",106$000002C218 0007 0000000031 Funct
|
||||
$LK+BI,"DefineU8s ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,1233",107$$LK+BI,"","DefineU8s",108$000000E0A6 0004 00000002D6 Funct
|
||||
$LK+BI,"Echo ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,48",109$$LK+BI,"","Echo",110$0000003A70 0000 0000000017 Funct
|
||||
$LK+BI,"ExeFile ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,577",111$$LK+BI,"","ExeFile",112$0000039750 0000 0000000075 Funct
|
||||
$LK+BI,"ExeFile2 ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,629",113$$LK+BI,"","ExeFile2",114$0000039978 0000 0000000075 Funct
|
||||
$LK+BI,"ExeFile3 ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,669",115$$LK+BI,"","ExeFile3",116$0000039B08 0000 0000000075 Funct
|
||||
$LK+BI,"ExePrintF ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,568",117$$LK+BI,"","ExePrintF",118$0000039708 0000 0000000043 Funct
|
||||
$LK+BI,"ExePrintF2 ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,620",119$$LK+BI,"","ExePrintF2",120$0000039930 0000 0000000043 Funct
|
||||
$LK+BI,"ExePrintF3 ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,659",121$$LK+BI,"","ExePrintF3",122$0000039AC0 0000 0000000043 Funct
|
||||
$LK+BI,"ExePutS ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,536",123$$LK+BI,"","ExePutS",124$00000395B0 0002 0000000151 Funct
|
||||
$LK+BI,"ExePutS2 ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,588",125$$LK+BI,"","ExePutS2",126$00000397C8 0002 0000000161 Funct
|
||||
$LK+BI,"ExePutS3 ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,640",127$$LK+BI,"","ExePutS3",128$00000399F0 0002 00000000CC Funct
|
||||
$LK+BI,"Expression ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,1287",129$$LK+BI,"","Expression",130$0000013466 0007 000000003B Funct
|
||||
$LK+BI,"ExpressionDel ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,372",131$$LK+BI,"","ExpressionDel",132$0000005894 000B 0000000014 Funct
|
||||
$LK,"FBO1_F64 ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,3"$2 0002 0000000008 DefineStr
|
||||
$LK,"FBO1_INT ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,2"$1 0013 0000000008 DefineStr
|
||||
$LK,"FBO1_NOT_CONST ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,1"$0 0004 0000000008 DefineStr
|
||||
$LK+BI,"GetExpression ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,1282",133$$LK+BI,"","GetExpression",134$0000013436 0000 0000000029 Funct
|
||||
$LK+BI,"GetOpt ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,16",135$$LK+BI,"","GetOpt",136$00000039A8 0005 000000002B Funct
|
||||
$LK+BI,"HashEntryImportCopy ","FL:D:/TempleOS/Compiler/Hash1b.CPP.Z,1",137$$LK+BI,"","HashEntryImportCopy",138$000000A5B8 0002 0000000167 Funct
|
||||
$LK+BI,"HashEntrySize ","FL:D:/TempleOS/Compiler/Hash1b.CPP.Z,72",139$$LK+BI,"","HashEntrySize",140$000000A808 0000 0000000164 Funct
|
||||
$LK+BI,"HashEntrySize2 ","FL:D:/TempleOS/Compiler/Hash1b.CPP.Z,103",141$$LK+BI,"","HashEntrySize2",142$000000A970 0002 00000001B5 Funct
|
||||
$LK+BI,"HashTableImport ","FL:D:/TempleOS/Compiler/Hash1b.CPP.Z,41",143$$LK+BI,"","HashTableImport",144$000000A720 0000 00000000E8 Funct
|
||||
$LK+BI,"HashTableSize2 ","FL:D:/TempleOS/Compiler/Hash1b.CPP.Z,142",145$$LK+BI,"","HashTableSize2",146$000000AB28 0000 000000006B Funct
|
||||
$LK+BI,"ICAddConst ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,947",147$$LK+BI,"","ICAddConst",148$000001AEC6 000C 00000008B6 Funct
|
||||
$LK+BI,"ICAddEct ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,882",149$$LK+BI,"","ICAddEct",150$000001AB66 0005 000000035E Funct
|
||||
$LK+BI,"ICAddRSP ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,163",151$$LK+BI,"","ICAddRSP",152$0000018D3E 0016 0000000286 Funct
|
||||
$LK+BI,"ICAddSubEctEqual ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2754",153$$LK+BI,"","ICAddSubEctEqual",154$0000020286 0005 000000073F Funct
|
||||
$LK+BI,"ICAndAnd ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3050",155$$LK+BI,"","ICAndAnd",156$000002104E 0001 0000000149 Funct
|
||||
$LK+BI,"ICAndBranch ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4033",157$$LK+BI,"","ICAndBranch",158$0000023C4E 0002 000000078D Funct
|
||||
$LK+BI,"ICAndEqual ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4784",159$$LK+BI,"","ICAndEqual",160$0000025F26 0001 0000000109 Funct
|
||||
$LK+BI,"ICAssign ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4202",161$$LK+BI,"","ICAssign",162$00000243DE 0001 000000030F Funct
|
||||
$LK+BI,"ICAssignPostIncDec ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3677",163$$LK+BI,"","ICAssignPostIncDec",164$0000022D3E 0002 0000000248 Funct
|
||||
$LK+BI,"ICBEqu ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3420",165$$LK+BI,"","ICBEqu",166$000002212E 0001 0000000256 Funct
|
||||
$LK+BI,"ICBitOps ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3298",167$$LK+BI,"","ICBitOps",168$0000021B4E 000B 00000005DE Funct
|
||||
$LK+BI,"ICBrBitOps ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4252",169$$LK+BI,"","ICBrBitOps",170$00000246EE 0008 0000000AC9 Funct
|
||||
$LK+BI,"ICBuiltInFloatConst ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,607",171$$LK+BI,"","ICBuiltInFloatConst",172$0000019E5E 000F 00000000BD Funct
|
||||
$LK+BI,"ICCmp ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3178",173$$LK+BI,"","ICCmp",174$0000021666 0006 00000004E6 Funct
|
||||
$LK+BI,"ICCmpAndBranch ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3719",175$$LK+BI,"","ICCmpAndBranch",176$0000022F86 000C 0000000936 Funct
|
||||
$LK+BI,"ICColon ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3144",177$$LK+BI,"","ICColon",178$0000021456 0001 000000020F Funct
|
||||
$LK+BI,"ICCopyTemplate ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,293",179$$LK+BI,"","ICCopyTemplate",180$000001929E 0019 0000000286 Funct
|
||||
$LK+BI,"ICDeref ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,864",181$$LK+BI,"","ICDeref",182$000001AAAE 0001 00000000B5 Funct
|
||||
$LK+BI,"ICDerefPostIncDec ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3634",183$$LK+BI,"","ICDerefPostIncDec",184$0000022B0E 0002 000000022B Funct
|
||||
$LK+BI,"ICDiv ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2662",185$$LK+BI,"","ICDiv",186$000001FDB6 0001 00000000F2 Funct
|
||||
$LK+BI,"ICDivEqual ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2681",187$$LK+BI,"","ICDivEqual",188$000001FEAE 0002 00000002E0 Funct
|
||||
$LK+BI,"ICFAdd ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2533",189$$LK+BI,"","ICFAdd",190$000001F68E 0001 00000001FB Funct
|
||||
$LK+BI,"ICFCmp ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,1651",191$$LK+BI,"","ICFCmp",192$000001CD8E 0004 0000000188 Funct
|
||||
$LK+BI,"ICFCmpAndBranch ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2082",193$$LK+BI,"","ICFCmpAndBranch",194$000001E37E 0004 0000000A6E Funct
|
||||
$LK+BI,"ICFCvt ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,1217",195$$LK+BI,"","ICFCvt",196$000001BBD6 0014 0000000188 Funct
|
||||
$LK+BI,"ICFCvt2 ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,1265",197$$LK+BI,"","ICFCvt2",198$000001BD5E 0010 0000000122 Funct
|
||||
$LK+BI,"ICFDiv ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2509",199$$LK+BI,"","ICFDiv",200$000001F54E 0001 000000013D Funct
|
||||
$LK+BI,"ICFMod ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,1343",201$$LK+BI,"","ICFMod",202$000001C06E 0001 0000000142 Funct
|
||||
$LK+BI,"ICFModEqual ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,1691",203$$LK+BI,"","ICFModEqual",204$000001CF16 0001 00000003FA Funct
|
||||
$LK+BI,"ICFMul ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2469",205$$LK+BI,"","ICFMul",206$000001F316 0001 0000000235 Funct
|
||||
$LK+BI,"ICFOp ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,1452",207$$LK+BI,"","ICFOp",208$000001C4A6 0004 00000008E5 Funct
|
||||
$LK+BI,"ICFOpEqual ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,1758",209$$LK+BI,"","ICFOpEqual",210$000001D316 0004 0000001066 Funct
|
||||
$LK+BI,"ICFPostIncDec ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2383",211$$LK+BI,"","ICFPostIncDec",212$000001EEFE 0002 0000000151 Funct
|
||||
$LK+BI,"ICFPow ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,1373",213$$LK+BI,"","ICFPow",214$000001C1B6 0001 00000002ED Funct
|
||||
$LK+BI,"ICFPreIncDec ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2361",215$$LK+BI,"","ICFPreIncDec",216$000001EDEE 0002 000000010A Funct
|
||||
$LK+BI,"ICFSub ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2571",217$$LK+BI,"","ICFSub",218$000001F88E 0001 0000000120 Funct
|
||||
$LK+BI,"ICFTemplateFun ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3541",219$$LK+BI,"","ICFTemplateFun",220$0000022616 0007 00000000A8 Funct
|
||||
$LK+BI,"ICFUnaryMinus ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,1292",221$$LK+BI,"","ICFUnaryMinus",222$000001BE86 0001 00000001E8 Funct
|
||||
$LK+BI,"ICLastIns ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,135",223$$LK+BI,"","ICLastIns",224$0000018C96 0002 00000000A1 Funct
|
||||
$LK+BI,"ICLea ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,821",225$$LK+BI,"","ICLea",226$000001A876 0004 0000000233 Funct
|
||||
$LK+BI,"ICLimit ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4547",227$$LK+BI,"","ICLimit",228$00000255B6 0002 0000000227 Funct
|
||||
$LK+BI,"ICLocalVarInit ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4941",229$$LK+BI,"","ICLocalVarInit",230$0000026676 0001 0000000078 Funct
|
||||
$LK+BI,"ICMemCpy ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4953",231$$LK+BI,"","ICMemCpy",232$00000266EE 0001 000000047C Funct
|
||||
$LK+BI,"ICMemSet ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,5055",233$$LK+BI,"","ICMemSet",234$0000026B6E 0001 000000032C Funct
|
||||
$LK+BI,"ICMinMax ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4605",235$$LK+BI,"","ICMinMax",236$00000257DE 0004 00000002B7 Funct
|
||||
$LK+BI,"ICMod ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2735",237$$LK+BI,"","ICMod",238$000002018E 0001 00000000F2 Funct
|
||||
$LK+BI,"ICModU64 ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4684",239$$LK+BI,"","ICModU64",240$0000025AE6 0001 00000001BB Funct
|
||||
$LK+BI,"ICModr ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,348",241$$LK+BI,"","ICModr",242$0000019526 0018 0000000331 Funct
|
||||
$LK+BI,"ICMov ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,630",243$$LK+BI,"","ICMov",244$0000019F1E 01DD 0000000957 Funct
|
||||
$LK+BI,"ICMul ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2411",245$$LK+BI,"","ICMul",246$000001F056 0001 00000002BA Funct
|
||||
$LK+BI,"ICMulEqual ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2594",247$$LK+BI,"","ICMulEqual",248$000001F9AE 0001 0000000408 Funct
|
||||
$LK+BI,"ICNot ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3021",249$$LK+BI,"","ICNot",250$0000020EDE 0001 000000016E Funct
|
||||
$LK+BI,"ICOpSizeRex ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,46",251$$LK+BI,"","ICOpSizeRex",252$00000188BE 0006 0000000121 Funct
|
||||
$LK+BI,"ICOr ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,597",253$$LK+BI,"","ICOr",254$0000019E0E 000F 000000004A Funct
|
||||
$LK+BI,"ICOrEqual ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4807",255$$LK+BI,"","ICOrEqual",256$0000026036 0001 0000000109 Funct
|
||||
$LK+BI,"ICOrOr ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3079",257$$LK+BI,"","ICOrOr",258$000002119E 0001 000000015E Funct
|
||||
$LK+BI,"ICPop ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,548",259$$LK+BI,"","ICPop",260$0000019C46 000A 000000010B Funct
|
||||
$LK+BI,"ICPopRegs ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,575",261$$LK+BI,"","ICPopRegs",262$0000019D56 000F 0000000054 Funct
|
||||
$LK+BI,"ICPostIncDec ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3594",263$$LK+BI,"","ICPostIncDec",264$00000228D6 0002 0000000237 Funct
|
||||
$LK+BI,"ICPreIncDec ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3557",265$$LK+BI,"","ICPreIncDec",266$00000226BE 0004 0000000213 Funct
|
||||
$LK+BI,"ICPreempt ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3474",267$$LK+BI,"","ICPreempt",268$0000022386 0001 0000000122 Funct
|
||||
$LK+BI,"ICPush ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,497",269$$LK+BI,"","ICPush",270$0000019A26 0020 00000001C1 Funct
|
||||
$LK+BI,"ICPushRegs ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,535",271$$LK+BI,"","ICPushRegs",272$0000019BEE 000A 0000000052 Funct
|
||||
$LK+BI,"ICQueInit ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4435",273$$LK+BI,"","ICQueInit",274$00000251BE 0001 0000000070 Funct
|
||||
$LK+BI,"ICQueIns ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4449",275$$LK+BI,"","ICQueIns",276$000002522E 0001 0000000179 Funct
|
||||
$LK+BI,"ICQueInsRev ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4490",277$$LK+BI,"","ICQueInsRev",278$00000253AE 0001 0000000179 Funct
|
||||
$LK+BI,"ICQueRem ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4531",279$$LK+BI,"","ICQueRem",280$000002552E 0001 0000000088 Funct
|
||||
$LK+BI,"ICRex ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,32",281$$LK+BI,"","ICRex",282$0000018836 0017 0000000088 Funct
|
||||
$LK+BI,"ICShift ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2910",283$$LK+BI,"","ICShift",284$00000209C6 0004 0000000196 Funct
|
||||
$LK+BI,"ICShiftEqual ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,2944",285$$LK+BI,"","ICShiftEqual",286$0000020B5E 0002 000000030D Funct
|
||||
$LK+BI,"ICSlashOp ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,460",287$$LK+BI,"","ICSlashOp",288$000001985E 0027 00000001C4 Funct
|
||||
$LK+BI,"ICSqr ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4677",289$$LK+BI,"","ICSqr",290$0000025A96 0002 000000004A Funct
|
||||
$LK+BI,"ICSub ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,1130",291$$LK+BI,"","ICSub",292$000001B77E 0001 0000000454 Funct
|
||||
$LK+BI,"ICSwap ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4726",293$$LK+BI,"","ICSwap",294$0000025CA6 0001 000000027C Funct
|
||||
$LK+BI,"ICSwitch ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4854",295$$LK+BI,"","ICSwitch",296$000002624E 0002 0000000427 Funct
|
||||
$LK+BI,"ICTestAndBranch ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3938",297$$LK+BI,"","ICTestAndBranch",298$00000238BE 0002 0000000273 Funct
|
||||
$LK+BI,"ICToBool ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3526",299$$LK+BI,"","ICToBool",300$000002259E 0001 0000000071 Funct
|
||||
$LK+BI,"ICToF64 ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3521",301$$LK+BI,"","ICToF64",302$000002255E 0001 000000003D Funct
|
||||
$LK+BI,"ICToI64 ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3516",303$$LK+BI,"","ICToI64",304$000002251E 0001 000000003D Funct
|
||||
$LK+BI,"ICToUpper ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3505",305$$LK+BI,"","ICToUpper",306$00000224AE 0001 000000006B Funct
|
||||
$LK+BI,"ICU16 ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,72",307$$LK+BI,"","ICU16",308$00000189E6 0099 00000000AF Funct
|
||||
$LK+BI,"ICU24 ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,87",309$$LK+BI,"","ICU24",310$0000018A96 0069 00000000DA Funct
|
||||
$LK+BI,"ICU32 ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,104",311$$LK+BI,"","ICU32",312$0000018B76 007B 0000000089 Funct
|
||||
$LK+BI,"ICU64 ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,120",313$$LK+BI,"","ICU64",314$0000018C06 0009 0000000089 Funct
|
||||
$LK+BI,"ICU8 ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,20",315$$LK+BI,"","ICU8",316$00000187AE 0089 0000000083 Funct
|
||||
$LK+BI,"ICUnaries ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3012",317$$LK+BI,"","ICUnaries",318$0000020E6E 0002 0000000069 Funct
|
||||
$LK+BI,"ICXorEqual ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,4830",319$$LK+BI,"","ICXorEqual",320$0000026146 0001 0000000103 Funct
|
||||
$LK+BI,"ICXorXor ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3111",321$$LK+BI,"","ICXorXor",322$00000212FE 0001 0000000153 Funct
|
||||
$LK+BI,"ICZFlagBranch ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,3997",323$$LK+BI,"","ICZFlagBranch",324$0000023B36 0002 0000000112 Funct
|
||||
$LK+BI,"ICZero ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,588",325$$LK+BI,"","ICZero",326$0000019DAE 0018 000000005E Funct
|
||||
$LK+BI,"ImportHashTable ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,56",327$$LK+BI,"","ImportHashTable",328$0000003A98 0000 00000000B3 Funct
|
||||
$LK+BI,"IncludeDepth ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,75",329$$LK+BI,"","IncludeDepth",330$0000003B50 0000 000000002C Funct
|
||||
$LK+BI,"InstEntriesCompare ","FL:D:/TempleOS/Compiler/Unassembler.CPP.Z,1",331$$LK+BI,"","InstEntriesCompare",332$0000000A18 0001 0000000227 Funct
|
||||
$LK+BI,"InstEntryFind ","FL:D:/TempleOS/Compiler/Unassembler.CPP.Z,71",333$$LK+BI,"","InstEntryFind",334$0000000C40 0002 000000037A Funct
|
||||
$LK+BI,"IsReplaceSyms ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,52",335$$LK+BI,"","IsReplaceSyms",336$0000003A88 000A 000000000D Funct
|
||||
$LK+BI,"LTrace ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,43",337$$LK+BI,"","LTrace",338$0000003A58 0000 0000000017 Funct
|
||||
$LK+BI,"Lex ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,796",339$$LK+BI,"","Lex",340$0000006740 00FC 00000025F8 Funct
|
||||
$LK+BI,"LexBackupLastChar ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,142",341$$LK+BI,"","LexBackupLastChar",342$00000041CC 0003 000000003D Funct
|
||||
$LK+BI,"LexDel ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,67",343$$LK+BI,"","LexDel",344$0000003F10 0005 000000008D Funct
|
||||
$LK+BI,"LexDocRead ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,408",345$$LK+BI,"","LexDocRead",346$0000005950 0001 0000000090 Funct
|
||||
$LK+BI,"LexDollar ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,153",347$$LK+BI,"","LexDollar",348$000000420C 0003 000000006C Funct
|
||||
$LK+BI,"LexExcept ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,1686",349$$LK+BI,"","LexExcept",350$0000009060 00A0 00000000C6 Funct
|
||||
$LK+BI,"LexExtStr ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,1604",351$$LK+BI,"","LexExtStr",352$0000008D38 0004 00000000DB Funct
|
||||
$LK+BI,"LexGetChar ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,167",353$$LK+BI,"","LexGetChar",354$000000427C 0030 00000015EE Funct
|
||||
$LK+BI,"LexInStr ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,698",355$$LK+BI,"","LexInStr",356$0000006210 0001 000000052C Funct
|
||||
$LK+BI,"LexIncludeDoc ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,426",357$$LK+BI,"","LexIncludeDoc",358$00000059E0 0001 0000000162 Funct
|
||||
$LK+BI,"LexIncludeStr ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,377",359$$LK+BI,"","LexIncludeStr",360$00000058AC 0003 0000000095 Funct
|
||||
$LK+BI,"LexNew ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,38",361$$LK+BI,"","LexNew",362$0000003DC8 0005 0000000141 Funct
|
||||
$LK+BI,"LexPop ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,489",363$$LK+BI,"","LexPop",364$0000005BD8 0004 000000007E Funct
|
||||
$LK+BI,"LexPush ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,477",365$$LK+BI,"","LexPush",366$0000005B48 000F 0000000090 Funct
|
||||
$LK+BI,"LexPutLine ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,1629",367$$LK+BI,"","LexPutLine",368$0000008E18 0003 000000009D Funct
|
||||
$LK+BI,"LexPutPos ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,1656",369$$LK+BI,"","LexPutPos",370$0000008EB8 0003 00000000CA Funct
|
||||
$LK+BI,"LexPutToken ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,119",371$$LK+BI,"","LexPutToken",372$00000040B8 0002 0000000110 Funct
|
||||
$LK+BI,"LexPutWarn ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,1670",373$$LK+BI,"","LexPutWarn",374$0000008F88 0011 00000000D3 Funct
|
||||
$LK+BI,"LexSize ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,87",375$$LK+BI,"","LexSize",376$0000003FA0 0000 0000000098 Funct
|
||||
$LK+BI,"LexSkipEol ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,365",377$$LK+BI,"","LexSkipEol",378$000000586C 0004 0000000026 Funct
|
||||
$LK+BI,"MemberAdd ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,558",379$$LK+BI,"","MemberAdd",380$0000005D80 0004 00000001AE Funct
|
||||
$LK+BI,"MemberFind ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,523",381$$LK+BI,"","MemberFind",382$0000005CD8 0005 0000000063 Funct
|
||||
$LK+BI,"MemberFind2 ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,543",383$$LK+BI,"","MemberFind2",384$0000005D40 0001 0000000040 Funct
|
||||
$LK+BI,"MemberLstCopy ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,643",385$$LK+BI,"","MemberLstCopy",386$0000006028 0001 0000000118 Funct
|
||||
$LK+BI,"MemberLstDel ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,606",387$$LK+BI,"","MemberLstDel",388$0000005F30 0001 00000000F1 Funct
|
||||
$LK+BI,"MemberLstNew ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,81",389$$LK+BI,"","MemberLstNew",390$0000013616 0003 0000000026 Funct
|
||||
$LK+BI,"MemberLstSize ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,671",391$$LK+BI,"","MemberLstSize",392$0000006140 0002 00000000CB Funct
|
||||
$LK+BI,"MemberMetaData ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,501",393$$LK+BI,"","MemberMetaData",394$0000005C58 0000 000000003D Funct
|
||||
$LK+BI,"MemberMetaFind ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,512",395$$LK+BI,"","MemberMetaFind",396$0000005C98 0000 000000003C Funct
|
||||
$LK,"NUM_INTERNAL_TYPES ","FL:D:/TempleOS/Compiler/CmpInit.CPP.Z,1"$16 0002 0000000008 DefineStr
|
||||
$LK+BI,"OPassTraceMask ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,31",397$$LK+BI,"","OPassTraceMask",398$0000003A08 0000 0000000035 Funct
|
||||
$LK+BI,"OTrace ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,26",399$$LK+BI,"","OTrace",400$00000039F0 0000 0000000017 Funct
|
||||
$LK+BI,"OptBrNotZero ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,374",401$$LK+BI,"","OptBrNotZero",402$0000027BB8 0004 00000006C3 Funct
|
||||
$LK+BI,"OptBrZero ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,209",403$$LK+BI,"","OptBrZero",404$00000274F0 0006 00000006C3 Funct
|
||||
$LK+BI,"OptEnd ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,165",405$$LK+BI,"","OptEnd",406$00000273D0 0005 000000006F Funct
|
||||
$LK+BI,"OptEqu ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,1",407$$LK+BI,"","OptEqu",408$0000003930 0007 0000000045 Funct
|
||||
$LK+BI,"OptFixSizeOf ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,538",409$$LK+BI,"","OptFixSizeOf",410$0000028280 0003 00000000CC Funct
|
||||
$LK+BI,"OptFixupBinaryOp1 ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,6",411$$LK+BI,"","OptFixupBinaryOp1",412$0000026E9E 0013 0000000223 Funct
|
||||
$LK+BI,"OptFixupBinaryOp2 ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,80",413$$LK+BI,"","OptFixupBinaryOp2",414$00000270C6 0001 0000000058 Funct
|
||||
$LK+BI,"OptFixupUnaryOp ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,96",415$$LK+BI,"","OptFixupUnaryOp",416$000002711E 0003 00000000EF Funct
|
||||
$LK+BI,"OptIC4 ","FL:D:/TempleOS/Compiler/OptPass4.CPP.Z,1",417$$LK+BI,"","OptIC4",418$000002DD30 0001 0000000826 Funct
|
||||
$LK+BI,"OptIC6 ","FL:D:/TempleOS/Compiler/OptPass6.CPP.Z,1",419$$LK+BI,"","OptIC6",420$0000030138 0001 0000000162 Funct
|
||||
$LK+BI,"OptLag ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,175",421$$LK+BI,"","OptLag",422$0000027440 0004 0000000030 Funct
|
||||
$LK+BI,"OptLag1 ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,186",423$$LK+BI,"","OptLag1",424$0000027470 0005 000000003A Funct
|
||||
$LK+BI,"OptLead1 ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,197",425$$LK+BI,"","OptLead1",426$00000274B0 0002 0000000039 Funct
|
||||
$LK+BI,"OptMVCompare ","FL:D:/TempleOS/Compiler/OptPass3.CPP.Z,46",427$$LK+BI,"","OptMVCompare",428$000002C348 0001 000000001A Funct
|
||||
$LK,"OptMemberVar ","FL:D:/TempleOS/Compiler/OptPass3.CPP.Z,41"$007FC17530 0005 0000000020 Class
|
||||
$LK+BI,"OptMissing ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,142",429$$LK+BI,"","OptMissing",430$0000027256 0004 0000000070 Funct
|
||||
$LK,"OptNext ","FL:D:/TempleOS/Compiler/CmpAsm.CPP.Z,687"$0000000098 0002 Funct
|
||||
$LK,"OptNext2 ","FL:D:/TempleOS/Compiler/CmpAsm.CPP.Z,690"$000000010A 0001 Funct
|
||||
$LK,"OptNext3 ","FL:D:/TempleOS/Compiler/CmpAsm.CPP.Z,693"$000000017C 0001 Funct
|
||||
$LK+BI,"OptOff ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,11",431$$LK+BI,"","OptOff",432$0000003990 0000 0000000016 Funct
|
||||
$LK+BI,"OptOn ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,6",433$$LK+BI,"","OptOn",434$0000003978 0000 0000000016 Funct
|
||||
$LK+BI,"OptPass012 ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,564",435$$LK+BI,"","OptPass012",436$0000028350 0000 0000003EC1 Funct
|
||||
$LK+BI,"OptPass3 ","FL:D:/TempleOS/Compiler/OptPass3.CPP.Z,51",437$$LK+BI,"","OptPass3",438$000002C368 0000 00000019C7 Funct
|
||||
$LK+BI,"OptPass4 ","FL:D:/TempleOS/Compiler/OptPass4.CPP.Z,224",439$$LK+BI,"","OptPass4",440$000002E558 0000 0000001609 Funct
|
||||
$LK+BI,"OptPass5 ","FL:D:/TempleOS/Compiler/OptPass5.CPP.Z,1",441$$LK+BI,"","OptPass5",442$000002FB68 0000 00000005CF Funct
|
||||
$LK+BI,"OptPass6 ","FL:D:/TempleOS/Compiler/OptPass6.CPP.Z,146",443$$LK+BI,"","OptPass6",444$0000030658 0000 00000004E9 Funct
|
||||
$LK+BI,"OptPass6Lag ","FL:D:/TempleOS/Compiler/OptPass6.CPP.Z,37",445$$LK+BI,"","OptPass6Lag",446$00000302A0 0001 00000003B2 Funct
|
||||
$LK+BI,"OptPass789A ","FL:D:/TempleOS/Compiler/OptPass789A.CPP.Z,1",447$$LK+BI,"","OptPass789A",448$0000030B48 0000 0000003832 Funct
|
||||
$LK+BI,"OptStart ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,152",449$$LK+BI,"","OptStart",450$0000027360 0005 000000006D Funct
|
||||
$LK,"PRST_CHECK_BINARY_OPS ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,42"$4 0001 0000000008 DefineStr
|
||||
$LK,"PRST_DEREFERENCE ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,41"$3 0004 0000000008 DefineStr
|
||||
$LK,"PRST_MAYBE_MODIFIERS ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,39"$1 000F 0000000008 DefineStr
|
||||
$LK,"PRST_UNARY_MODIFIERS ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,40"$2 0009 0000000008 DefineStr
|
||||
$LK,"PRST_UNARY_TERM ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,38"$0 0005 0000000008 DefineStr
|
||||
$LK+BI,"PTrace ","FL:D:/TempleOS/Compiler/Directives.CPP.Z,21",451$$LK+BI,"","PTrace",452$00000039D8 0000 0000000017 Funct
|
||||
$LK+BI,"ParenWarning ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,1",453$$LK+BI,"","ParenWarning",454$000000EC56 0004 0000000055 Funct
|
||||
$LK+BI,"PrsArrayDims ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,349",455$$LK+BI,"","PrsArrayDims",456$00000140BE 0001 0000000134 Funct
|
||||
$LK+BI,"PrsAsmArg ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,460",457$$LK+BI,"","PrsAsmArg",458$000000BD88 0002 000000047E Funct
|
||||
$LK+BI,"PrsAsmBlk ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,1309",459$$LK+BI,"","PrsAsmBlk",460$000000E37E 0001 00000008D2 Funct
|
||||
$LK+BI,"PrsAsmImm ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,425",461$$LK+BI,"","PrsAsmImm",462$000000BC40 0006 0000000145 Funct
|
||||
$LK+BI,"PrsClass ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,844",463$$LK+BI,"","PrsClass",464$000001550E 0004 0000000267 Funct
|
||||
$LK+BI,"PrsClassNew ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,1",465$$LK+BI,"","PrsClassNew",466$00000134A6 0003 00000000B3 Funct
|
||||
$LK+BI,"PrsDereference ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,1232",467$$LK+BI,"","PrsDereference",468$00000132BE 0000 00000000B8 Funct
|
||||
$LK+BI,"PrsDoWhile ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,1359",469$$LK+BI,"","PrsDoWhile",470$0000016936 0001 0000000155 Funct
|
||||
$LK+BI,"PrsDotDotDot ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,387",471$$LK+BI,"","PrsDotDotDot",472$00000141F6 0001 0000000100 Funct
|
||||
$LK+BI,"PrsExpression ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,44",473$$LK+BI,"","PrsExpression",474$000000EDA6 0010 000000125F Funct
|
||||
$LK+BI,"PrsFor ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,1383",475$$LK+BI,"","PrsFor",476$0000016A8E 0001 00000001C7 Funct
|
||||
$LK+BI,"PrsFun ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,981",477$$LK+BI,"","PrsFun",478$00000159A6 0001 00000003CA Funct
|
||||
$LK+BI,"PrsFunCall ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,444",479$$LK+BI,"","PrsFunCall",480$000001035E 0003 00000008DF Funct
|
||||
$LK+BI,"PrsFunJoin ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,910",481$$LK+BI,"","PrsFunJoin",482$0000015776 0005 0000000229 Funct
|
||||
$LK+BI,"PrsFunNew ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,45",483$$LK+BI,"","PrsFunNew",484$000001355E 0001 00000000B3 Funct
|
||||
$LK+BI,"PrsGlblInit ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,303",485$$LK+BI,"","PrsGlblInit",486$0000013EC6 0002 0000000084 Funct
|
||||
$LK+BI,"PrsGlblVarLst ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,1057",487$$LK+BI,"","PrsGlblVarLst",488$0000015D76 0008 0000000958 Funct
|
||||
$LK+BI,"PrsIf ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,1305",489$$LK+BI,"","PrsIf",490$00000166CE 0001 000000015B Funct
|
||||
$LK+BI,"PrsKeyWord ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,88",491$$LK+BI,"","PrsKeyWord",492$000001363E 000B 000000003C Funct
|
||||
$LK+BI,"PrsNoUnusedWarn ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,1547",493$$LK+BI,"","PrsNoUnusedWarn",494$0000017196 0001 000000008F Funct
|
||||
$LK+BI,"PrsOffsetOf ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,413",495$$LK+BI,"","PrsOffsetOf",496$000001020E 0002 0000000149 Funct
|
||||
$LK+BI,"PrsPop ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,13",497$$LK+BI,"","PrsPop",498$000000ECD6 001B 0000000022 Funct
|
||||
$LK+BI,"PrsPop2 ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,23",499$$LK+BI,"","PrsPop2",500$000000ED36 0001 000000002D Funct
|
||||
$LK+BI,"PrsPopDeref ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,28",501$$LK+BI,"","PrsPopDeref",502$000000ED66 0004 000000003F Funct
|
||||
$LK+BI,"PrsPush ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,8",503$$LK+BI,"","PrsPush",504$000000ECAE 0017 0000000028 Funct
|
||||
$LK+BI,"PrsPush2 ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,18",505$$LK+BI,"","PrsPush2",506$000000ECFE 0004 0000000033 Funct
|
||||
$LK+BI,"PrsSizeOf ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,365",507$$LK+BI,"","PrsSizeOf",508$0000010006 0001 0000000207 Funct
|
||||
$LK+BI,"PrsStatement ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,1692",509$$LK+BI,"","PrsStatement",510$000001777E 0004 000000102C Funct
|
||||
$LK+BI,"PrsStaticInit ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,312",511$$LK+BI,"","PrsStaticInit",512$0000013F4E 0002 000000016E Funct
|
||||
$LK+BI,"PrsStreamBlk ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,1563",513$$LK+BI,"","PrsStreamBlk",514$0000017226 0001 0000000211 Funct
|
||||
$LK+BI,"PrsSwitch ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,1430",515$$LK+BI,"","PrsSwitch",516$0000016C56 0002 000000053B Funct
|
||||
$LK+BI,"PrsTryBlk ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,1613",517$$LK+BI,"","PrsTryBlk",518$000001743E 0001 0000000339 Funct
|
||||
$LK+BI,"PrsType ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,420",519$$LK+BI,"","PrsType",520$00000142F6 0002 000000039F Funct
|
||||
$LK+BI,"PrsUnaryModifier ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,1070",521$$LK+BI,"","PrsUnaryModifier",522$000001247E 0000 0000000E3A Funct
|
||||
$LK+BI,"PrsUnaryTerm ","FL:D:/TempleOS/Compiler/ExpParser.CPP.Z,666",523$$LK+BI,"","PrsUnaryTerm",524$0000010C3E 0000 000000183E Funct
|
||||
$LK+BI,"PrsVarInit ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,99",525$$LK+BI,"","PrsVarInit",526$000001367E 0001 0000000513 Funct
|
||||
$LK+BI,"PrsVarInit2 ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,220",527$$LK+BI,"","PrsVarInit2",528$0000013B96 0004 000000032A Funct
|
||||
$LK+BI,"PrsVarLst ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,518",529$$LK+BI,"","PrsVarLst",530$0000014696 0006 0000000DD1 Funct
|
||||
$LK+BI,"PrsWhile ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,1337",531$$LK+BI,"","PrsWhile",532$000001682E 0001 0000000105 Funct
|
||||
$LK+BI,"QueVectU8Del ","FL:D:/TempleOS/Compiler/CmpQueVect.CPP.Z,46",533$$LK+BI,"","QueVectU8Del",534$0000000990 0004 0000000021 Funct
|
||||
$LK+BI,"QueVectU8Get ","FL:D:/TempleOS/Compiler/CmpQueVect.CPP.Z,54",535$$LK+BI,"","QueVectU8Get",536$00000009B8 0001 000000005E Funct
|
||||
$LK+BI,"QueVectU8New ","FL:D:/TempleOS/Compiler/CmpQueVect.CPP.Z,1",537$$LK+BI,"","QueVectU8New",538$0000000868 0001 0000000040 Funct
|
||||
$LK+BI,"QueVectU8Put ","FL:D:/TempleOS/Compiler/CmpQueVect.CPP.Z,10",539$$LK+BI,"","QueVectU8Put",540$00000008A8 0001 00000000E3 Funct
|
||||
$LK,"SLASH_OP_DEC ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,440"$0x00000000 0006 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_DIV ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,445"$0x00000000 0001 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_FADD ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,449"$0x01C1DE00 0002 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_FDIV ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,453"$0x01F9DE00 0002 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_FDIVR ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,454"$0x01F1DE00 0003 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_FILD ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,458"$0x01000000 0002 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_FISTTP ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,457"$0x01000000 0002 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_FLD ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,455"$0x01000000 0008 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_FMUL ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,452"$0x01C9DE00 0002 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_FSTP ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,456"$0x01000000 000D 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_FSUB ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,450"$0x01E9DE00 0002 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_FSUBR ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,451"$0x01E1DE00 0003 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_IMUL ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,444"$0x00000000 0001 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_INC ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,439"$0x00000000 000C 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_MOV ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,446"$0x00000000 0002 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_MUL ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,443"$0x00000000 0001 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_NEG ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,442"$0x00000000 0001 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_NOT ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,441"$0x00000000 0001 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_POP ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,448"$0x00000000 0001 0000000018 DefineStr
|
||||
$LK,"SLASH_OP_PUSH ","FL:D:/TempleOS/Compiler/BackEnd.CPP.Z,447"$0x00000000 0001 0000000018 DefineStr
|
||||
$LK+BI,"SetSrcFileInfo ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,107",541$$LK+BI,"","SetSrcFileInfo",542$0000004038 0008 0000000079 Funct
|
||||
$LK+BI,"StreamPrintF ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,14",543$$LK+BI,"","StreamPrintF",544$0000038098 0000 0000000034 Funct
|
||||
$LK+BI,"StreamPutS ","FL:D:/TempleOS/Compiler/CmpMain.CPP.Z,1",545$$LK+BI,"","StreamPutS",546$0000038038 0001 0000000060 Funct
|
||||
$LK+BI,"U ","FL:D:/TempleOS/Compiler/Unassembler.CPP.Z,866",547$$LK+BI,"","U",548$00000037E8 0000 000000009B Funct
|
||||
$LK+BI,"Ui ","FL:D:/TempleOS/Compiler/Unassembler.CPP.Z,220",549$$LK+BI,"","Ui",550$00000010D0 0002 0000002711 Funct
|
||||
$LK+BI,"Un ","FL:D:/TempleOS/Compiler/Unassembler.CPP.Z,882",551$$LK+BI,"","Un",552$0000003888 0009 00000000A6 Funct
|
||||
$LK+BI,"UnasmHashLoad ","FL:D:/TempleOS/Compiler/Unassembler.CPP.Z,181",553$$LK+BI,"","UnasmHashLoad",554$0000000FC0 0001 0000000109 Funct
|
||||
$LK+BI,"UndefinedExtern ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,831",555$$LK+BI,"","UndefinedExtern",556$000001546E 0001 0000000050 Funct
|
||||
$LK+BI,"UnusedExternWarning ","FL:D:/TempleOS/Compiler/StmtParser.CPP.Z,838",557$$LK+BI,"","UnusedExternWarning",558$00000154BE 0004 000000004E Funct
|
||||
$LK,"_OPTNEXT ","FL:D:/TempleOS/Compiler/CmpAsm.CPP.Z,10"$0000000098 0001 ExportSysSym
|
||||
$LK,"_OPTNEXT2 ","FL:D:/TempleOS/Compiler/CmpAsm.CPP.Z,58"$000000010A 0001 ExportSysSym
|
||||
$LK,"_OPTNEXT3 ","FL:D:/TempleOS/Compiler/CmpAsm.CPP.Z,107"$000000017C 0001 ExportSysSym
|
||||
$LK,"asm_hash ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,2"$0000000708 0009 0000000008 GlbVar
|
||||
$LK,"asm_seg_prefixes ","FL:D:/TempleOS/Compiler/Assembler.CPP.Z,822"$000000CC78 0001 0000000006 GlbVar
|
||||
$LK,"assign_bitmap ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,8"$00000007B8 0003 0000000008 GlbVar
|
||||
$LK,"binary_ops_table ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,6"$0000000790 0003 0000000008 GlbVar
|
||||
$LK,"cmp_arg_cnt ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,7"$00000007A0 0009 0000000008 GlbVar
|
||||
$LK,"cmp_bitmap ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,8"$00000007C8 0004 0000000008 GlbVar
|
||||
$LK,"cmp_do_not_write_to_dsk ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,3"$0000000711 0003 0000000001 GlbVar
|
||||
$LK,"cmp_result_cnt ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,8"$00000007A8 0005 0000000008 GlbVar
|
||||
$LK,"cmp_templates ","FL:D:/TempleOS/Compiler/CmpExts.CPP.Z,49"$0000000206 0002 0000000004 GlbVar
|
||||
$LK,"cmp_templates_dont_pop ","FL:D:/TempleOS/Compiler/CmpExts.CPP.Z,50"$000000039B 0002 0000000004 GlbVar
|
||||
$LK,"cmp_templates_dont_push ","FL:D:/TempleOS/Compiler/CmpExts.CPP.Z,51"$0000000467 0002 0000000004 GlbVar
|
||||
$LK,"cmp_templates_dont_push2 ","FL:D:/TempleOS/Compiler/CmpExts.CPP.Z,53"$000000063D 0002 0000000004 GlbVar
|
||||
$LK,"cmp_templates_dont_push_pop","FL:D:/TempleOS/Compiler/CmpExts.CPP.Z,52"$00000005AD 0002 0000000004 GlbVar
|
||||
$LK,"compiled_bytes ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,15"$0000000838 0002 0000000008 GlbVar
|
||||
$LK,"compiled_funs ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,14"$0000000830 0002 0000000008 GlbVar
|
||||
$LK,"compiled_lines ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,14"$0000000828 0003 0000000008 GlbVar
|
||||
$LK,"deref_bitmap ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,8"$00000007B0 0004 0000000008 GlbVar
|
||||
$LK,"doc_stop_btypes ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,399"$0000005948 0001 0000000008 GlbVar
|
||||
$LK,"dual_U16_tokens1 ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,5"$0000000778 0002 0000000008 GlbVar
|
||||
$LK,"dual_U16_tokens2 ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,5"$0000000780 0002 0000000008 GlbVar
|
||||
$LK,"dual_U16_tokens3 ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,6"$0000000788 0002 0000000008 GlbVar
|
||||
$LK,"fpop_bitmap ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,9"$00000007D0 0013 0000000008 GlbVar
|
||||
$LK,"internal_types_table ","FL:D:/TempleOS/Compiler/CmpInit.CPP.Z,8"$0000034380 0001 00000000A0 GlbVar
|
||||
$LK,"is_first_compiler ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,2"$0000000710 0004 0000000001 GlbVar
|
||||
$LK,"lex_zeros ","FL:D:/TempleOS/Compiler/Lex.CPP.Z,140"$00000041C8 000B 0000000004 GlbVar
|
||||
$LK,"non_ptr_vars_mask ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,11"$0000000800 0006 0000000008 GlbVar
|
||||
$LK,"not_constant_bitmap ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,8"$00000007C0 0003 0000000008 GlbVar
|
||||
$LK,"num_non_ptr_vars ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,10"$00000007E8 0005 0000000008 GlbVar
|
||||
$LK,"num_reg_vars ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,9"$00000007E0 0006 0000000008 GlbVar
|
||||
$LK,"num_stk_temps ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,9"$00000007D8 0004 0000000008 GlbVar
|
||||
$LK,"opt_nop ","FL:D:/TempleOS/Compiler/OptPass012.CPP.Z,150"$00000272C8 0007 0000000098 GlbVar
|
||||
$LK,"reg_vars_mask ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,10"$00000007F8 0002 0000000008 GlbVar
|
||||
$LK,"stk_temps_mask ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,10"$00000007F0 0003 0000000008 GlbVar
|
||||
$LK,"sys_internal_types ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,4"$0000000718 00B5 0000000060 GlbVar
|
||||
$LK,"to_non_ptr_vars_map ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,14"$0000000820 0004 0000000008 GlbVar
|
||||
$LK,"to_reg_vars_map ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,13"$0000000818 0004 0000000008 GlbVar
|
||||
$LK,"to_stk_temps_map_even ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,13"$0000000810 0008 0000000008 GlbVar
|
||||
$LK,"to_stk_temps_map_odd ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,12"$0000000808 0008 0000000008 GlbVar
|
||||
$LK,"uasm_ins64_mask ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,19"$0000000850 000D 0000000008 GlbVar
|
||||
$LK,"uasm_mem_mask ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,20"$0000000860 0003 0000000008 GlbVar
|
||||
$LK,"uasm_signed_arg_mask ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,19"$0000000858 0003 0000000008 GlbVar
|
||||
$LK,"unary_ops_table ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,7"$0000000798 0002 0000000008 GlbVar
|
||||
$LK,"unasm_table ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,18"$0000000840 0006 0000000008 GlbVar
|
||||
$LK,"unasm_table_entries ","FL:D:/TempleOS/Compiler/CmpGlbls.CPP.Z,19"$0000000848 0003 0000000008 GlbVar
|
||||
| ||||