TempleOSCDV4.12.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:47:56 +02:00
1 parent 93ca216483
commit b84bbff6db
381 files changed
+18356 -18798

No files matched your search

+218 -219
View File
@@ -34,8 +34,8 @@ Bool PrsAsmImm(CCmpCtrl *cc,CAsmArg *arg)
U0 PrsAsmArg(CCmpCtrl *cc,CAsmArg *arg,Bool rel)
{
CHashGeneric *temph,*temph1;
CHashReg *tempr;
CHashGeneric *tmph,*tmph1;
CHashReg *tmpr;
MemSet(arg,0,sizeof(CAsmArg));
arg->seg =REG_NONE;
arg->reg1=REG_NONE;
@@ -43,11 +43,11 @@ U0 PrsAsmArg(CCmpCtrl *cc,CAsmArg *arg,Bool rel)
arg->scale=1;
while (TRUE) {
if (cc->token==TK_IDENT) {
if (temph=cc->hash_entry) {
if (temph->type&HTG_TYPE_MASK==HTT_REG) {
tempr=temph;
arg->reg1_type=tempr->reg_type;
switch (tempr->reg_type) {
if (tmph=cc->hash_entry) {
if (tmph->type&HTG_TYPE_MASK==HTT_REG) {
tmpr=tmph;
arg->reg1_type=tmpr->reg_type;
switch (tmpr->reg_type) {
start:
case REGT_R8:
arg->size=1;
@@ -62,11 +62,11 @@ U0 PrsAsmArg(CCmpCtrl *cc,CAsmArg *arg,Bool rel)
arg->size=8;
break;
end:
arg->reg1=tempr->reg_num;
arg->reg1=tmpr->reg_num;
Lex(cc);
return;
case REGT_SEG:
arg->seg=tempr->reg_num;
arg->seg=tmpr->reg_num;
if (Lex(cc)!=':') {
arg->just_seg=TRUE;
return;
@@ -77,17 +77,17 @@ U0 PrsAsmArg(CCmpCtrl *cc,CAsmArg *arg,Bool rel)
case REGT_MM:
case REGT_XMM:
arg->size=8;
arg->reg1=tempr->reg_num;
arg->reg1=tmpr->reg_num;
Lex(cc);
return;
}
} else {
if ((temph->type&HTG_TYPE_MASK==HTT_CLASS||
temph->type&HTG_TYPE_MASK==HTT_INTERNAL_TYPE) &&
(temph1=HashFind(cc->cur_str,cmp.asm_hash,HTT_ASM_KEYWORD)))
temph=temph1;
if (temph->type&HTG_TYPE_MASK==HTT_ASM_KEYWORD) {
switch (temph->user_data0) {
if ((tmph->type&HTG_TYPE_MASK==HTT_CLASS||
tmph->type&HTG_TYPE_MASK==HTT_INTERNAL_TYPE) &&
(tmph1=HashFind(cc->cur_str,cmp.asm_hash,HTT_ASM_KEYWORD)))
tmph=tmph1;
if (tmph->type&HTG_TYPE_MASK==HTT_ASM_KEYWORD) {
switch (tmph->user_data0) {
case AKW_I8:
case AKW_U8:
arg->size=1;
@@ -129,19 +129,19 @@ pa_asm_direct_imm:
Lex(cc); // skip [
while (cc->token && cc->token!=']') {
if (cc->token==TK_IDENT) {
if (temph=cc->hash_entry) {
if (temph->type&HTG_TYPE_MASK==HTT_REG &&
REGT_R16<=temph(CHashReg *)->reg_type<=REGT_R64) {
tempr=temph;
arg->reg2_type=tempr->reg_type;
if (tmph=cc->hash_entry) {
if (tmph->type&HTG_TYPE_MASK==HTT_REG &&
REGT_R16<=tmph(CHashReg *)->reg_type<=REGT_R64) {
tmpr=tmph;
arg->reg2_type=tmpr->reg_type;
if (arg->reg1==REG_NONE) {
if (tempr->reg_num&7==REG_RSP) {
if (tmpr->reg_num&7==REG_RSP) {
arg->reg1=4;
arg->reg2=tempr->reg_num;
arg->reg2=tmpr->reg_num;
} else
arg->reg1=tempr->reg_num;
arg->reg1=tmpr->reg_num;
} else
arg->reg2=tempr->reg_num;
arg->reg2=tmpr->reg_num;
Lex(cc);
} else
goto pa_asm_indirect_imm;
@@ -269,7 +269,7 @@ Bool AsmStoreNum(CCmpCtrl *cc,CAsmNum2 *num2,I64 cnt,Bool U8_avail)
{
CAOTCtrl *aotc=cc->aotc;
I64 i;
CAOTAbsAddr *tempa;
CAOTAbsAddr *tmpa;
if (!num2->imm_flag)
num2->num.i-=num2->rel;
@@ -284,19 +284,19 @@ Bool AsmStoreNum(CCmpCtrl *cc,CAsmNum2 *num2,I64 cnt,Bool U8_avail)
LexExcept(cc,"Branch out of range at ");
if (num2->imm_flag) {
if (num2->num.abs_cnts.abs_addres&1) {
tempa=CAlloc(sizeof(CAOTAbsAddr));
tempa->next=aotc->abss;
aotc->abss=tempa;
tempa->ip=aotc->ip;
tempa->type=AAT_ADD_U8;
tmpa=CAlloc(sizeof(CAOTAbsAddr));
tmpa->next=aotc->abss;
aotc->abss=tmpa;
tmpa->ip=aotc->ip;
tmpa->type=AAT_ADD_U8;
}
} else {
if (num2->num.abs_cnts.c_addres&1) {
tempa=CAlloc(sizeof(CAOTAbsAddr));
tempa->next=aotc->abss;
aotc->abss=tempa;
tempa->ip=aotc->ip;
tempa->type=AAT_SUB_U8;
tmpa=CAlloc(sizeof(CAOTAbsAddr));
tmpa->next=aotc->abss;
aotc->abss=tmpa;
tmpa->ip=aotc->ip;
tmpa->type=AAT_SUB_U8;
}
}
AOTStoreCodeU8(cc,num2->num.i);
@@ -311,19 +311,19 @@ Bool AsmStoreNum(CCmpCtrl *cc,CAsmNum2 *num2,I64 cnt,Bool U8_avail)
LexExcept(cc,"Branch out of range at ");
if (num2->imm_flag) {
if (num2->num.abs_cnts.abs_addres&1) {
tempa=CAlloc(sizeof(CAOTAbsAddr));
tempa->next=aotc->abss;
aotc->abss=tempa;
tempa->ip=aotc->ip;
tempa->type=AAT_ADD_U16;
tmpa=CAlloc(sizeof(CAOTAbsAddr));
tmpa->next=aotc->abss;
aotc->abss=tmpa;
tmpa->ip=aotc->ip;
tmpa->type=AAT_ADD_U16;
}
} else {
if (num2->num.abs_cnts.c_addres&1) {
tempa=CAlloc(sizeof(CAOTAbsAddr));
tempa->next=aotc->abss;
aotc->abss=tempa;
tempa->ip=aotc->ip;
tempa->type=AAT_SUB_U16;
tmpa=CAlloc(sizeof(CAOTAbsAddr));
tmpa->next=aotc->abss;
aotc->abss=tmpa;
tmpa->ip=aotc->ip;
tmpa->type=AAT_SUB_U16;
}
}
AOTStoreCodeU8(cc,num2->num.i.u8[0]);
@@ -338,19 +338,19 @@ Bool AsmStoreNum(CCmpCtrl *cc,CAsmNum2 *num2,I64 cnt,Bool U8_avail)
LexExcept(cc,"Branch out of range at ");
if (num2->imm_flag) {
if (num2->num.abs_cnts.abs_addres&1) {
tempa=CAlloc(sizeof(CAOTAbsAddr));
tempa->next=aotc->abss;
aotc->abss=tempa;
tempa->ip=aotc->ip;
tempa->type=AAT_ADD_U32;
tmpa=CAlloc(sizeof(CAOTAbsAddr));
tmpa->next=aotc->abss;
aotc->abss=tmpa;
tmpa->ip=aotc->ip;
tmpa->type=AAT_ADD_U32;
}
} else {
if (num2->num.abs_cnts.c_addres&1) {
tempa=CAlloc(sizeof(CAOTAbsAddr));
tempa->next=aotc->abss;
aotc->abss=tempa;
tempa->ip=aotc->ip;
tempa->type=AAT_SUB_U32;
tmpa=CAlloc(sizeof(CAOTAbsAddr));
tmpa->next=aotc->abss;
aotc->abss=tmpa;
tmpa->ip=aotc->ip;
tmpa->type=AAT_SUB_U32;
}
}
AOTStoreCodeU32(cc,num2->num.i);
@@ -362,19 +362,19 @@ Bool AsmStoreNum(CCmpCtrl *cc,CAsmNum2 *num2,I64 cnt,Bool U8_avail)
U8_avail);
if (num2->imm_flag) {
if (num2->num.abs_cnts.abs_addres&1) {
tempa=CAlloc(sizeof(CAOTAbsAddr));
tempa->next=aotc->abss;
aotc->abss=tempa;
tempa->ip=aotc->ip;
tempa->type=AAT_ADD_U64;
tmpa=CAlloc(sizeof(CAOTAbsAddr));
tmpa->next=aotc->abss;
aotc->abss=tmpa;
tmpa->ip=aotc->ip;
tmpa->type=AAT_ADD_U64;
}
} else {
if (num2->num.abs_cnts.c_addres&1) {
tempa=CAlloc(sizeof(CAOTAbsAddr));
tempa->next=aotc->abss;
aotc->abss=tempa;
tempa->ip=aotc->ip;
tempa->type=AAT_SUB_U64;
tmpa=CAlloc(sizeof(CAOTAbsAddr));
tmpa->next=aotc->abss;
aotc->abss=tmpa;
tmpa->ip=aotc->ip;
tmpa->type=AAT_SUB_U64;
}
}
AOTStoreCodeU64(cc,num2->num.i);
@@ -392,17 +392,16 @@ Bool AsmStoreNum(CCmpCtrl *cc,CAsmNum2 *num2,I64 cnt,Bool U8_avail)
U8 asm_seg_prefixes[6]={0x26,0x2E,0x36,0x3E,0x64,0x65};
Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tmpo,I64 argcnt)
{
CAOTCtrl *aotc=cc->aotc;
I64 i,j,a1,a2,om,seg,arg1mask,arg2mask;
CAsmArg *tempa1,*tempa2;
CAsmArg *tmpa1,*tmpa2;
Bool ModrM_complete,U8_avail=FALSE,found_second_possible=FALSE;
CInst *tempi;
CInst *tmpins;
CAsmIns cur,best;
best.U8_cnt=255;
best.U8_cnt=255;
if (argcnt>0)
arg1mask=AsmMakeArgMask(cc,&aotc->arg1);
else
@@ -411,38 +410,38 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
arg2mask=AsmMakeArgMask(cc,&aotc->arg2);
else
arg2mask=1;
for (i=0;i<tempo->inst_entry_cnt;i++) {
tempi=&tempo->ins[i];
if (tempi->arg1==ARGT_REL8 || tempi->arg2==ARGT_REL8)
for (i=0;i<tmpo->inst_entry_cnt;i++) {
tmpins=&tmpo->ins[i];
if (tmpins->arg1==ARGT_REL8 || tmpins->arg2==ARGT_REL8)
U8_avail=TRUE;
if (Bt(&arg1mask,tempi->arg1) && Bt(&arg2mask,tempi->arg2) &&
(!(tempi->flags&IEF_NOT_IN_64_BIT) || aotc->seg_size!=64)) {
if (Bt(&arg1mask,tmpins->arg1) && Bt(&arg2mask,tmpins->arg2) &&
(!(tmpins->flags&IEF_NOT_IN_64_BIT) || aotc->seg_size!=64)) {
MemSet(&cur,0,sizeof(CAsmIns));
cur.tempi=tempi;
cur.tmpins=tmpins;
ModrM_complete=FALSE;
cur.is_dft=ToBool(tempi->flags & IEF_DFT);
cur.is_dft=ToBool(tmpins->flags & IEF_DFT);
if (aotc->seg_size==64) {
if (tempi->flags & IEF_48_REX)
if (tmpins->flags & IEF_48_REX)
cur.REX=0x48;
else
cur.REX=0x40;
}
cur.disp.imm_flag=TRUE;
cur.imm.imm_flag=TRUE;
om=tempi->opcode_modifier;
a1=tempi->arg1;
a2=tempi->arg2;
tempa1=&aotc->arg1;
tempa2=&aotc->arg2;
cur.last_opcode_U8=tempi->opcode[tempi->opcode_cnt-1];
om=tmpins->opcode_modifier;
a1=tmpins->arg1;
a2=tmpins->arg2;
tmpa1=&aotc->arg1;
tmpa2=&aotc->arg2;
cur.last_opcode_U8=tmpins->opcode[tmpins->opcode_cnt-1];
if (tempi->slash_val<8) {
cur.ModrM|=tempi->slash_val<<3;
if (tmpins->slash_val<8) {
cur.ModrM|=tmpins->slash_val<<3;
cur.has_ModrM=TRUE;
}
if (aotc->seg_size==16 && tempi->flags & IEF_OP_SIZE32 ||
aotc->seg_size!=16 && tempi->flags & IEF_OP_SIZE16)
if (aotc->seg_size==16 && tmpins->flags & IEF_OP_SIZE32 ||
aotc->seg_size!=16 && tmpins->flags & IEF_OP_SIZE16)
cur.has_operand_prefix=TRUE;
if (om==OM_IB) cur.imm.U8_cnt=1;
@@ -468,16 +467,16 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
cc->lex_include_stk->full_name,
cc->lex_include_stk->line_num-1);
}
if (tempi->flags & IEF_PLUS_OPCODE) {
if (tempi->slash_val==SV_R_REG) {
cur.last_opcode_U8|=tempa1->reg1&7;
if (tempa1->reg1&15>7)
if (tmpins->flags & IEF_PLUS_OPCODE) {
if (tmpins->slash_val==SV_R_REG) {
cur.last_opcode_U8|=tmpa1->reg1&7;
if (tmpa1->reg1&15>7)
cur.REX|=1;
if (tempa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
} else {//SV_I_REG
if (tempa1->reg1_type==REGT_FSTK)
cur.last_opcode_U8+=tempa1->reg1;
if (tmpa1->reg1_type==REGT_FSTK)
cur.last_opcode_U8+=tmpa1->reg1;
}
}
if (a1==ARGT_R64 || a1==ARGT_RM64 || a1==ARGT_M64)
@@ -487,52 +486,52 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
cur.has_addr_prefix=TRUE;
cur.has_ModrM=TRUE;
if (tempa1->imm_or_off_present && tempa1->indirect &&
tempa1->reg1==REG_NONE) {
if (tmpa1->imm_or_off_present && tmpa1->indirect &&
tmpa1->reg1==REG_NONE) {
cur.ModrM=cur.ModrM+5;
MemCpy(&cur.disp.num,&tempa1->num,sizeof(CAsmNum));
MemCpy(&cur.disp.num,&tmpa1->num,sizeof(CAsmNum));
cur.disp.U8_cnt=4;
if (aotc->seg_size==64)
cur.disp.imm_flag=FALSE;
} else {
if (tempa1->reg2==REG_NONE && tempa1->scale==1) {
cur.ModrM|=tempa1->reg1&7;
if (tempa1->reg1&15>7)
if (tmpa1->reg2==REG_NONE && tmpa1->scale==1) {
cur.ModrM|=tmpa1->reg1&7;
if (tmpa1->reg1&15>7)
cur.REX|=1;
if (tempa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
} else {
cur.ModrM|=4;
cur.has_SIB=TRUE;
if (tempa1->scale==1)
if (tmpa1->scale==1)
cur.SIB=0;
else if (tempa1->scale==2)
else if (tmpa1->scale==2)
cur.SIB=0x40;
else if (tempa1->scale==4)
else if (tmpa1->scale==4)
cur.SIB=0x80;
else if (tempa1->scale==8)
else if (tmpa1->scale==8)
cur.SIB=0xC0;
if (tempa1->reg2==REG_NONE) {
if (tmpa1->reg2==REG_NONE) {
ModrM_complete=TRUE;
cur.SIB|=(tempa1->reg1&7)<<3+REG_RBP;
if (tempa1->reg1&15>7)
cur.SIB|=(tmpa1->reg1&7)<<3+REG_RBP;
if (tmpa1->reg1&15>7)
cur.REX|=2;
if (tempa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
MemCpy(&cur.disp.num,&tempa1->num,sizeof(CAsmNum));
MemCpy(&cur.disp.num,&tmpa1->num,sizeof(CAsmNum));
cur.disp.U8_cnt=4;
} else {
cur.SIB|=(tempa1->reg1&7)<<3+tempa1->reg2&7;
if (tempa1->reg1&15>7)
cur.SIB|=(tmpa1->reg1&7)<<3+tmpa1->reg2&7;
if (tmpa1->reg1&15>7)
cur.REX|=2;
if (tempa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
if (tempa1->reg2&15>7)
if (tmpa1->reg2&15>7)
cur.REX|=1;
if (tempa1->reg2>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa1->reg2>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
if (tempa1->reg2&7==REG_RBP &&
!tempa1->imm_or_off_present && tempa1->indirect) {
if (tmpa1->reg2&7==REG_RBP &&
!tmpa1->imm_or_off_present && tmpa1->indirect) {
cur.ModrM|=0x40;
cur.disp.U8_cnt=1;
ModrM_complete=TRUE;
@@ -540,8 +539,8 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
}
}
if (!ModrM_complete) {
if (tempa1->imm_or_off_present) {
MemCpy(&cur.disp.num,&tempa1->num,sizeof(CAsmNum));
if (tmpa1->imm_or_off_present) {
MemCpy(&cur.disp.num,&tmpa1->num,sizeof(CAsmNum));
if (!cur.disp.num.machine_code &&
MIN_I8<=cur.disp.num.i<=MAX_I8) {
cur.ModrM|=0x40;
@@ -553,11 +552,11 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
cur.ModrM|=0x80;
cur.disp.U8_cnt=4;
}
} else if (!tempa1->indirect) {
} else if (!tmpa1->indirect) {
cur.has_addr_prefix=FALSE;
cur.ModrM|=0xC0;
} else {
if (tempa1->reg1&7==REG_RBP) {
if (tmpa1->reg1&7==REG_RBP) {
cur.ModrM|=0x40;
cur.disp.U8_cnt=1;
}
@@ -568,7 +567,7 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
ARGT_UIMM8<=a1<=ARGT_UIMM64) {
if (a1==ARGT_IMM64 || a2==ARGT_UIMM64)
cur.REX|=8;
MemCpy(&cur.imm.num,&tempa1->num,sizeof(CAsmNum));
MemCpy(&cur.imm.num,&tmpa1->num,sizeof(CAsmNum));
}
} else if (argcnt==2) {
if (best.U8_cnt!=255 && !found_second_possible && !best.is_dft) {
@@ -578,26 +577,26 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
cc->lex_include_stk->full_name,
cc->lex_include_stk->line_num-1);
}
if (tempi->flags & IEF_PLUS_OPCODE) {
if (tempi->slash_val==SV_R_REG) {
if (tmpins->flags & IEF_PLUS_OPCODE) {
if (tmpins->slash_val==SV_R_REG) {
if (ARGT_AL<=a1<=ARGT_RAX) {
cur.last_opcode_U8|=tempa2->reg1&7;
if (tempa2->reg1&15>7)
cur.last_opcode_U8|=tmpa2->reg1&7;
if (tmpa2->reg1&15>7)
cur.REX|=1;
if (tempa2->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa2->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
} else {
cur.last_opcode_U8|=tempa1->reg1&7;
if (tempa1->reg1&15>7)
cur.last_opcode_U8|=tmpa1->reg1&7;
if (tmpa1->reg1&15>7)
cur.REX|=1;
if (tempa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
}
} else {//SV_I_REG
if (tempa1->reg1_type==REGT_FSTK)
cur.last_opcode_U8|=tempa1->reg1;
if (tempa2->reg1_type==REGT_FSTK)
cur.last_opcode_U8|=tempa2->reg1;
if (tmpa1->reg1_type==REGT_FSTK)
cur.last_opcode_U8|=tmpa1->reg1;
if (tmpa2->reg1_type==REGT_FSTK)
cur.last_opcode_U8|=tmpa2->reg1;
}
}
if (a1==ARGT_RM64 || a2==ARGT_RM64 || a1==ARGT_M64 || a2==ARGT_M64 ||
@@ -609,68 +608,68 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
cur.has_addr_prefix=TRUE;
cur.has_ModrM=TRUE;
if (ARGT_RM8<=a2<=ARGT_RM64 || ARGT_M8<=a2<=ARGT_M64) {
tempa1=&aotc->arg2;
tempa2=&aotc->arg1;
tmpa1=&aotc->arg2;
tmpa2=&aotc->arg1;
}
if (tempi->slash_val==SV_R_REG) {
if (tempa2->just_seg)
cur.ModrM|=tempa2->seg<<3;
if (tmpins->slash_val==SV_R_REG) {
if (tmpa2->just_seg)
cur.ModrM|=tmpa2->seg<<3;
else {
if (tempa2->reg1==REG_NONE) {
cur.ModrM|=(tempa1->reg1&7)<<3;
if (tempa1->reg1&15>7)
if (tmpa2->reg1==REG_NONE) {
cur.ModrM|=(tmpa1->reg1&7)<<3;
if (tmpa1->reg1&15>7)
cur.REX|=4;
if (tempa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
} else {
cur.ModrM|=(tempa2->reg1&7)<<3;
if (tempa2->reg1&15>7)
cur.ModrM|=(tmpa2->reg1&7)<<3;
if (tmpa2->reg1&15>7)
cur.REX|=4;
if (tempa2->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa2->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
}
}
}
if (tempa1->reg2==REG_NONE && tempa1->scale==1) {
if (tempa1->reg1!=REG_NONE) {
cur.ModrM|=tempa1->reg1&7;
if (tempa1->reg1&15>7)
if (tmpa1->reg2==REG_NONE && tmpa1->scale==1) {
if (tmpa1->reg1!=REG_NONE) {
cur.ModrM|=tmpa1->reg1&7;
if (tmpa1->reg1&15>7)
cur.REX|=1;
if (tempa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
}
} else {
cur.ModrM|=4;
cur.has_SIB=TRUE;
if (tempa1->scale==1)
if (tmpa1->scale==1)
cur.SIB=0;
else if (tempa1->scale==2)
else if (tmpa1->scale==2)
cur.SIB=0x40;
else if (tempa1->scale==4)
else if (tmpa1->scale==4)
cur.SIB=0x80;
else if (tempa1->scale==8)
else if (tmpa1->scale==8)
cur.SIB=0xC0;
if (tempa1->reg2==REG_NONE) {
if (tmpa1->reg2==REG_NONE) {
ModrM_complete=TRUE;
cur.SIB|=(tempa1->reg1&7)<<3+5;
if (tempa1->reg1&15>7)
cur.SIB|=(tmpa1->reg1&7)<<3+5;
if (tmpa1->reg1&15>7)
cur.REX|=2;
if (tempa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
MemCpy(&cur.disp.num,&tempa1->num,sizeof(CAsmNum));
MemCpy(&cur.disp.num,&tmpa1->num,sizeof(CAsmNum));
cur.disp.U8_cnt=4;
} else {
cur.SIB|=(tempa1->reg1&7)<<3+tempa1->reg2&7;
if (tempa1->reg1&15>7)
cur.SIB|=(tmpa1->reg1&7)<<3+tmpa1->reg2&7;
if (tmpa1->reg1&15>7)
cur.REX|=2;
if (tempa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa1->reg1>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
if (tempa1->reg2&15>7)
if (tmpa1->reg2&15>7)
cur.REX|=1;
if (tempa1->reg2>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
if (tmpa1->reg2>=20) //RBPu8,RSPu8,RSIu8,RDIu8?
cur.has_REX=TRUE;
if (tempa1->reg2&7==REG_RBP &&
!tempa1->imm_or_off_present && tempa1->indirect) {
if (tmpa1->reg2&7==REG_RBP &&
!tmpa1->imm_or_off_present && tmpa1->indirect) {
cur.ModrM|=0x40;
cur.disp.U8_cnt=1;
ModrM_complete=TRUE;
@@ -678,16 +677,16 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
}
}
if (!ModrM_complete) {
if (tempa1->imm_or_off_present &&
tempa1->indirect && tempa1->reg1==REG_NONE) {
if (tmpa1->imm_or_off_present &&
tmpa1->indirect && tmpa1->reg1==REG_NONE) {
cur.ModrM=cur.ModrM&0xF8+5;
MemCpy(&cur.disp.num,&tempa1->num,sizeof(CAsmNum));
MemCpy(&cur.disp.num,&tmpa1->num,sizeof(CAsmNum));
cur.disp.U8_cnt=4;
if (aotc->seg_size==64)
cur.disp.imm_flag=FALSE;
} else {
if (tempa1->imm_or_off_present) {
MemCpy(&cur.disp.num,&tempa1->num,sizeof(CAsmNum));
if (tmpa1->imm_or_off_present) {
MemCpy(&cur.disp.num,&tmpa1->num,sizeof(CAsmNum));
if (!cur.disp.num.machine_code &&
MIN_I8<=cur.disp.num.i<=MAX_I8) {
cur.ModrM|=0x40;
@@ -699,11 +698,11 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
cur.ModrM|=0x80;
cur.disp.U8_cnt=4;
}
} else if (!tempa1->indirect) {
} else if (!tmpa1->indirect) {
cur.has_addr_prefix=FALSE;
cur.ModrM|=0xC0;
} else {
if (tempa1->reg1&7==REG_RBP) {
if (tmpa1->reg1&7==REG_RBP) {
cur.ModrM|=0x40;
cur.disp.U8_cnt=1;
}
@@ -711,14 +710,14 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
}
}
} else if (ARGT_MOFFS8<=a1<=ARGT_MOFFS64) {
MemCpy(&cur.disp.num,&tempa1->num,sizeof(CAsmNum));
MemCpy(&cur.disp.num,&tmpa1->num,sizeof(CAsmNum));
if (aotc->seg_size==16)
cur.disp.U8_cnt=2;
else
cur.disp.U8_cnt=4;
cur.has_addr_prefix=FALSE;
} else if (ARGT_MOFFS8<=a2<=ARGT_MOFFS64) {
MemCpy(&cur.disp.num,&tempa2->num,sizeof(CAsmNum));
MemCpy(&cur.disp.num,&tmpa2->num,sizeof(CAsmNum));
if (aotc->seg_size==16)
cur.disp.U8_cnt=2;
else
@@ -726,7 +725,7 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
cur.has_addr_prefix=FALSE;
} else if (ARGT_IMM8<=a1<=ARGT_IMM64 ||
ARGT_UIMM8<=a1<=ARGT_UIMM64) {
MemCpy(&cur.imm.num,&tempa1->num,sizeof(CAsmNum));
MemCpy(&cur.imm.num,&tmpa1->num,sizeof(CAsmNum));
if (a1==ARGT_IMM8 || a1==ARGT_UIMM8) cur.imm.U8_cnt=1;
else if (a1==ARGT_IMM16 || a1==ARGT_UIMM16) cur.imm.U8_cnt=2;
else if (a1==ARGT_IMM32 || a1==ARGT_UIMM32) cur.imm.U8_cnt=4;
@@ -737,12 +736,12 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
}
if (ARGT_IMM8<=a2<=ARGT_IMM64 ||
ARGT_UIMM8<=a2<=ARGT_UIMM64) {
MemCpy(&cur.imm.num,&tempa2->num,sizeof(CAsmNum));
MemCpy(&cur.imm.num,&tmpa2->num,sizeof(CAsmNum));
if (a2==ARGT_IMM8 || a2==ARGT_UIMM8) cur.imm.U8_cnt=1;
else if (a2==ARGT_IMM16 || a2==ARGT_UIMM16) cur.imm.U8_cnt=2;
else if (a2==ARGT_IMM32 || a2==ARGT_UIMM32) {
cur.imm.U8_cnt=4;
if (tempi->flags&IEF_REX_ONLY_R8_R15 && a2==ARGT_UIMM32)
if (tmpins->flags&IEF_REX_ONLY_R8_R15 && a2==ARGT_UIMM32)
cur.REX&=~8;
} else {
cur.imm.U8_cnt=8;
@@ -750,23 +749,23 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
}
}
}
cur.U8_cnt=tempi->opcode_cnt+cur.disp.U8_cnt+cur.imm.U8_cnt;
cur.U8_cnt=tmpins->opcode_cnt+cur.disp.U8_cnt+cur.imm.U8_cnt;
if (cur.has_ModrM) cur.U8_cnt++;
if (cur.has_SIB) cur.U8_cnt++;
if (aotc->seg_size==64 && cur.REX&0x40==0x40 &&
(cur.REX!=0x40 || cur.has_REX) &&
(cur.REX&7 || !(tempi->flags&IEF_REX_ONLY_R8_R15 ||
tempi->flags&IEF_REX_XOR_LIKE && tempa1->reg1==tempa2->reg1 &&
(cur.REX&7 || !(tmpins->flags&IEF_REX_ONLY_R8_R15 ||
tmpins->flags&IEF_REX_XOR_LIKE && tmpa1->reg1==tmpa2->reg1 &&
cur.ModrM&0xC0==0xC0)))
cur.U8_cnt++;
if (cur.U8_cnt<best.U8_cnt &&
!(tempi->flags & IEF_DONT_SWITCH_MODES &&
!(tmpins->flags & IEF_DONT_SWITCH_MODES &&
(cur.has_addr_prefix || cur.has_operand_prefix)))
MemCpy(&best,&cur,sizeof(CAsmIns));
}
}
if (best.U8_cnt<255) {
tempi=best.tempi;
tmpins=best.tmpins;
seg=REG_NONE;
if (argcnt>1 && aotc->arg2.seg!=REG_NONE && !aotc->arg2.just_seg)
seg=aotc->arg2.seg;
@@ -780,12 +779,12 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
AOTStoreCodeU8(cc,OC_ADDR_SIZE_PREFIX); //Operand size override
if (aotc->seg_size==64 && best.REX&0x40==0x40 &&
(best.REX!=0x40 || best.has_REX) &&
(best.REX&7||!(tempi->flags&IEF_REX_ONLY_R8_R15 ||
tempi->flags&IEF_REX_XOR_LIKE && tempa1->reg1==tempa2->reg1 &&
(best.REX&7||!(tmpins->flags&IEF_REX_ONLY_R8_R15 ||
tmpins->flags&IEF_REX_XOR_LIKE && tmpa1->reg1==tmpa2->reg1 &&
best.ModrM&0xC0==0xC0)))
AOTStoreCodeU8(cc,best.REX);
for (j=0;j<tempi->opcode_cnt-1;j++)
AOTStoreCodeU8(cc,tempi->opcode[j]);
for (j=0;j<tmpins->opcode_cnt-1;j++)
AOTStoreCodeU8(cc,tmpins->opcode[j]);
AOTStoreCodeU8(cc,best.last_opcode_U8);
if (best.has_ModrM)
@@ -804,7 +803,7 @@ Bool PrsAsmInst(CCmpCtrl *cc,CHashOpcode *tempo,I64 argcnt)
if (!AsmStoreNum(cc,&best.imm,1,U8_avail))
return FALSE;
}
if (tempi->flags&IEF_ENDING_ZERO) //ENTER inst
if (tmpins->flags&IEF_ENDING_ZERO) //ENTER inst
AOTStoreCodeU8(cc,0);
return TRUE;
}
@@ -906,8 +905,8 @@ U0 PrsAsmBlk(CCmpCtrl *cc,I64 cmp_flags)
CAOTCtrl *aotc=cc->aotc;
I64 i,j,k,argcnt,
old_flags=cc->flags & CCF_ASM_EXPRESSIONS;
CHashOpcode *tempo;
CHashExport *tempex;
CHashOpcode *tmpo;
CHashExport *tmpex;
U8 *next_last_label;
CCodeMisc *g_lb;
@@ -930,13 +929,13 @@ U0 PrsAsmBlk(CCmpCtrl *cc,I64 cmp_flags)
if (cc->token!=TK_IDENT)
LexExcept(cc,"Expecting identifier at ");
else {
tempex=NULL;
tempex=CAlloc(sizeof(CHashExport));
tempex->str=cc->cur_str;
tmpex=NULL;
tmpex=CAlloc(sizeof(CHashExport));
tmpex->str=cc->cur_str;
cc->cur_str=0;
tempex->type=HTT_EXPORT_SYS_SYM|HTF_UNRESOLVED;
HashAdd(tempex,cc->htc.glbl_hash_table);
tempex->type|=HTF_IMPORT;
tmpex->type=HTT_EXPORT_SYS_SYM|HTF_UNRESOLVED;
HashAdd(tmpex,cc->htc.glbl_hash_table);
tmpex->type|=HTF_IMPORT;
if (Lex(cc)==',')
Lex(cc); //skip ','
}
@@ -1006,29 +1005,29 @@ U0 PrsAsmBlk(CCmpCtrl *cc,I64 cmp_flags)
LexExcept(cc,"Syntax error at ");
}
} else if (cc->hash_entry->type & HTT_OPCODE) {
tempo=cc->hash_entry;
tmpo=cc->hash_entry;
Lex(cc); //skip opcode
argcnt=0;
if (tempo->ins[0].arg1) {
if (tmpo->ins[0].arg1) {
argcnt++;
if (ARGT_REL8<=tempo->ins[0].arg1<=ARGT_REL32)
if (ARGT_REL8<=tmpo->ins[0].arg1<=ARGT_REL32)
PrsAsmArg(cc,&aotc->arg1,TRUE);
else
PrsAsmArg(cc,&aotc->arg1,FALSE);
if (tempo->ins[0].arg2) {
if (tmpo->ins[0].arg2) {
argcnt++;
if (cc->token!=',')
LexExcept(cc,"Expecting ',' at ");
else {
Lex(cc); //skip ','
if (ARGT_REL8<=tempo->ins[0].arg2<=ARGT_REL32)
if (ARGT_REL8<=tmpo->ins[0].arg2<=ARGT_REL32)
PrsAsmArg(cc,&aotc->arg2,TRUE);
else
PrsAsmArg(cc,&aotc->arg2,FALSE);
}
}
}
PrsAsmInst(cc,tempo,argcnt);
PrsAsmInst(cc,tmpo,argcnt);
} else if (cc->hash_entry->type & HTT_EXPORT_SYS_SYM) {
if (Btr(&cc->hash_entry->type,HTf_UNRESOLVED)) {
if (cc->hash_entry->type & HTF_LOCAL) {
@@ -1063,25 +1062,25 @@ U0 PrsAsmBlk(CCmpCtrl *cc,I64 cmp_flags)
} else
LexExcept(cc,"Syntax error at ");
} else if (cc->token==TK_IDENT) {
tempex=CAlloc(sizeof(CHashExport));
tempex->str=cc->cur_str;
tmpex=CAlloc(sizeof(CHashExport));
tmpex->str=cc->cur_str;
cc->cur_str=0;
tempex->type=HTT_EXPORT_SYS_SYM;
tempex->val=aotc->ip;
tmpex->type=HTT_EXPORT_SYS_SYM;
tmpex->val=aotc->ip;
Lex(cc); //Skip cur_str
if (cc->token!=':' && cc->token!=TK_DBL_COLON)
LexExcept(cc,"Expecting ':' at ");
else {
if (*tempex->str=='@' && tempex->str[1]=='@') {
if (*tmpex->str=='@' && tmpex->str[1]=='@') {
if (cc->token==TK_DBL_COLON)
LexExcept(cc,"No local glbl exports at ");
HashAdd(tempex,cc->htc.local_hash_table);
HashAdd(tmpex,cc->htc.local_hash_table);
} else
HashAdd(tempex,cc->htc.glbl_hash_table);
HashAdd(tmpex,cc->htc.glbl_hash_table);
if (cc->htc.local_var_lst) {//AsmBlk in fun? Also add goto-like label.
if (!(g_lb=COCGoToLabelFind(cc,tempex->str))) {
if (!(g_lb=COCGoToLabelFind(cc,tmpex->str))) {
g_lb=COCMiscNew(cc,CMT_ASM_LABEL);
g_lb->str=StrNew(tempex->str);
g_lb->str=StrNew(tmpex->str);
} else if (g_lb->flags&CMF_DEFINED)
LexExcept(cc,"Duplicate goto label at ");
g_lb->type=CMT_ASM_LABEL;
@@ -1091,11 +1090,11 @@ U0 PrsAsmBlk(CCmpCtrl *cc,I64 cmp_flags)
ICAdd(cc,IC_LABEL,g_lb,0);
}
if (cc->token==TK_DBL_COLON) {
tempex->type|=HTF_EXPORT;
HashSrcFileSet(cc,tempex);
tmpex->type|=HTF_EXPORT;
HashSrcFileSet(cc,tmpex);
AOTLocalsResolve(cc);
aotc->last_label=tempex->str;
aotc->last_label=tmpex->str;
}
Lex(cc);
}
@@ -1104,8 +1103,8 @@ U0 PrsAsmBlk(CCmpCtrl *cc,I64 cmp_flags)
else
LexExcept(cc,"Syntax error at ");
if (cmp_flags&CMPF_ONE_ASM_INS && (cc->token!=TK_IDENT ||
!(tempo=cc->hash_entry) ||
!(tempo->type&(HTT_OPCODE|HTT_ASM_KEYWORD))))
!(tmpo=cc->hash_entry) ||
!(tmpo->type&(HTT_OPCODE|HTT_ASM_KEYWORD))))
break;
}
AOTLocalsResolve(cc);
+79 -79
View File
@@ -1,45 +1,45 @@
U0 AsmPrsInsFlags(CCmpCtrl *cc,CInst *tempi)
U0 AsmPrsInsFlags(CCmpCtrl *cc,CInst *tmpins)
{
I64 i;
while (TRUE) {
switch (cc->token) {
case TK_IDENT:
if ((i=LstMatch(cc->cur_str,"NO\0CB\0CW\0CD\0CP\0IB\0IW\0ID\0"))>=0) {
tempi->opcode_modifier=i;
tmpins->opcode_modifier=i;
break;
} else
return;
case TK_I64:
if (cc->cur_i64==16)
tempi->flags|=IEF_OP_SIZE16;
tmpins->flags|=IEF_OP_SIZE16;
else if (cc->cur_i64==32)
tempi->flags|=IEF_OP_SIZE32;
tmpins->flags|=IEF_OP_SIZE32;
else
return;
break;
case '+':
tempi->flags|=IEF_PLUS_OPCODE;
tmpins->flags|=IEF_PLUS_OPCODE;
case '/':
if (Lex(cc)==TK_I64 && cc->cur_i64<8)
tempi->slash_val=cc->cur_i64;
tmpins->slash_val=cc->cur_i64;
else if (cc->token==TK_IDENT) {
if (!StrCmp(cc->cur_str,"R"))
tempi->slash_val=SV_R_REG;
tmpins->slash_val=SV_R_REG;
else if (!StrCmp(cc->cur_str,"I"))
tempi->slash_val=SV_I_REG;
tmpins->slash_val=SV_I_REG;
else
return;
} else
return;
break;
case '!': tempi->flags|=IEF_DONT_SWITCH_MODES; break;
case '&': tempi->flags|=IEF_DFT; break;
case '%': tempi->flags|=IEF_NOT_IN_64_BIT; 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_STI_LIKE; break;
case '$$': tempi->flags|=IEF_ENDING_ZERO; break;
case '!': tmpins->flags|=IEF_DONT_SWITCH_MODES; break;
case '&': tmpins->flags|=IEF_DFT; break;
case '%': tmpins->flags|=IEF_NOT_IN_64_BIT; break;
case '=': tmpins->flags|=IEF_48_REX; break;
case '`': tmpins->flags|=IEF_REX_ONLY_R8_R15; break;
case '^': tmpins->flags|=IEF_REX_XOR_LIKE; break;
case '*': tmpins->flags|=IEF_STI_LIKE; break;
case '$$': tmpins->flags|=IEF_ENDING_ZERO; break;
default:
return;
}
@@ -50,13 +50,13 @@ U0 AsmPrsInsFlags(CCmpCtrl *cc,CInst *tempi)
U0 AsmHashLoad()
{//See $LK,"::/Compiler/OpCodes.DD"$.
I64 i,j,size,size_max;
CInternalType *tempit;
CInternalType *tmpit;
CCmpCtrl *cc;
CHashGeneric *temph;
CHashReg *tempr;
CHashOpcode *tempo,*tempo2,*tempo_max;
CInst *tempi;
CHashClass *tempc;
CHashGeneric *tmph;
CHashReg *tmpr;
CHashOpcode *tmpo,*tmpo2,*tmpo_max;
CInst *tmpins;
CHashClass *tmpc;
cmp.size_arg_mask[0]=0x3FF0FFFFFE;
cmp.size_arg_mask[1]=0x1110111112;
@@ -66,7 +66,7 @@ U0 AsmHashLoad()
cmp.asm_hash=HashTableNew(1024);
size_max=offset(CHashOpcode.ins)+sizeof(CInst)<<5;
tempo_max=MAlloc(size_max);
tmpo_max=MAlloc(size_max);
cc=CmpCtrlNew(FileRead("OpCodes.DD"),,"OpCodes.DD.Z");
cc->htc.hash_table_lst=NULL;
@@ -83,33 +83,33 @@ U0 AsmHashLoad()
LexExcept(cc,"Expecting identifier at ");
switch (i) {
case REGT_R8...REGT_XMM:
tempr=CAlloc(sizeof(CHashReg));
tempr->str=cc->cur_str;
tmpr=CAlloc(sizeof(CHashReg));
tmpr->str=cc->cur_str;
cc->cur_str=NULL;
Lex(cc); //skip keyword name
if (cc->token!=TK_I64)
LexExcept(cc,"Expecting int at ");
tempr->type=HTT_REG;
tempr->reg_type=i;
tempr->reg_num=cc->cur_i64;
HashAdd(tempr,cmp.asm_hash);
tmpr->type=HTT_REG;
tmpr->reg_type=i;
tmpr->reg_num=cc->cur_i64;
HashAdd(tmpr,cmp.asm_hash);
Lex(cc); //Skip INT
break;
case: //OPCODE
if (cc->token!=TK_IDENT)
LexExcept(cc,"Expecting opcode at ");
MemSet(tempo_max,0,size_max);
tempo_max->type=HTT_OPCODE;
tempo_max->inst_entry_cnt=0;
tempo_max->str=cc->cur_str;
MemSet(tmpo_max,0,size_max);
tmpo_max->type=HTT_OPCODE;
tmpo_max->inst_entry_cnt=0;
tmpo_max->str=cc->cur_str;
cc->cur_str=0;
Lex(cc); //Skip OPCODE
while (cc->token && cc->token!=';' && cc->token!=':') {
tempi=&tempo_max->ins[tempo_max->inst_entry_cnt];
tempi->ins_entry_num=tempo_max->inst_entry_cnt++;
tempi->slash_val=SV_NONE; //Not zero!!
tmpins=&tmpo_max->ins[tmpo_max->inst_entry_cnt];
tmpins->ins_entry_num=tmpo_max->inst_entry_cnt++;
tmpins->slash_val=SV_NONE; //Not zero!!
while (cc->token==TK_I64) {
tempi->opcode[tempi->opcode_cnt++]=cc->cur_i64;
tmpins->opcode[tmpins->opcode_cnt++]=cc->cur_i64;
Lex(cc);
}
if (cc->token==',')
@@ -117,74 +117,74 @@ U0 AsmHashLoad()
else if (cc->token!=';')
LexExcept(cc,"Expecting ',' at ");
AsmPrsInsFlags(cc,tempi);
AsmPrsInsFlags(cc,tmpins);
tempi->uasm_slash_val=tempi->slash_val;
if (tempi->flags&IEF_STI_LIKE && tempi->slash_val!=SV_I_REG)
tempi->uasm_slash_val=SV_STI_LIKE;
tmpins->uasm_slash_val=tmpins->slash_val;
if (tmpins->flags&IEF_STI_LIKE && tmpins->slash_val!=SV_I_REG)
tmpins->uasm_slash_val=SV_STI_LIKE;
tempi->arg1=tempi->arg2=tempi->size1=tempi->size2=0;
tmpins->arg1=tmpins->arg2=tmpins->size1=tmpins->size2=0;
if (cc->token==TK_IDENT) {
j=DefineMatch(cc->cur_str,"ST_ARG_TYPES");
tempi->arg1=j;
tmpins->arg1=j;
if (Bt(&cmp.size_arg_mask[1],j))
tempi->size1=8;
tmpins->size1=8;
else if (Bt(&cmp.size_arg_mask[2],j))
tempi->size1=16;
tmpins->size1=16;
else if (Bt(&cmp.size_arg_mask[4],j))
tempi->size1=32;
tmpins->size1=32;
else if (Bt(&cmp.size_arg_mask[8],j))
tempi->size1=64;
tmpins->size1=64;
if (Lex(cc)==TK_IDENT) {
j=DefineMatch(cc->cur_str,"ST_ARG_TYPES");
Lex(cc);
tempi->arg2=j;
tmpins->arg2=j;
if (Bt(&cmp.size_arg_mask[1],j))
tempi->size2=8;
tmpins->size2=8;
else if (Bt(&cmp.size_arg_mask[2],j))
tempi->size2=16;
tmpins->size2=16;
else if (Bt(&cmp.size_arg_mask[4],j))
tempi->size2=32;
tmpins->size2=32;
else if (Bt(&cmp.size_arg_mask[8],j))
tempi->size2=64;
tmpins->size2=64;
}
}
}
size=offset(CHashOpcode.ins)+sizeof(CInst)*tempo_max->inst_entry_cnt;
tempo=MAlloc(size);
MemCpy(tempo,tempo_max,size);
tempo->use_cnt=0;
if (HashFind(tempo->str,cmp.asm_hash,HTT_OPCODE))
size=offset(CHashOpcode.ins)+sizeof(CInst)*tmpo_max->inst_entry_cnt;
tmpo=MAlloc(size);
MemCpy(tmpo,tmpo_max,size);
tmpo->use_cnt=0;
if (HashFind(tmpo->str,cmp.asm_hash,HTT_OPCODE))
LexExcept(cc,"Duplicate OPCODE entry ");
HashAdd(tempo,cmp.asm_hash);
HashAdd(tmpo,cmp.asm_hash);
//Parse aliases.
if (cc->token==':') {
while (Lex(cc)==TK_IDENT) {
tempo2=MAllocIdent(tempo);
tempo2->str=cc->cur_str;
tmpo2=MAllocIdent(tmpo);
tmpo2->str=cc->cur_str;
cc->cur_str=0;
tempo2->oc_flags|=OCF_ALIAS;
if (HashFind(tempo2->str,cmp.asm_hash,HTT_OPCODE))
tmpo2->oc_flags|=OCF_ALIAS;
if (HashFind(tmpo2->str,cmp.asm_hash,HTT_OPCODE))
LexExcept(cc,"Duplicate OPCODE ALIAS entry ");
HashAdd(tempo2,cmp.asm_hash);
HashAdd(tmpo2,cmp.asm_hash);
}
}
break;
case: //KEYWORD
case: //ASM_KEYWORD
temph=CAlloc(sizeof(CHashGeneric));
temph->str=cc->cur_str;
tmph=CAlloc(sizeof(CHashGeneric));
tmph->str=cc->cur_str;
cc->cur_str=NULL;
Lex(cc); //skip keyword name
if (cc->token!=TK_I64)
LexExcept(cc,"Expecting int at ");
temph->user_data0=cc->cur_i64;
tmph->user_data0=cc->cur_i64;
if (i==10)
temph->type=HTT_KEYWORD;
tmph->type=HTT_KEYWORD;
else
temph->type=HTT_ASM_KEYWORD;
HashAdd(temph,cmp.asm_hash);
tmph->type=HTT_ASM_KEYWORD;
HashAdd(tmph,cmp.asm_hash);
Lex(cc); //Skip INT
break;
}
@@ -192,18 +192,18 @@ U0 AsmHashLoad()
LexExcept(cc,"Missing ';' at");
Lex(cc); //Skip ';'
}
Free(tempo_max);
Free(tmpo_max);
CmpCtrlDel(cc);
for (i=0;i<NUM_INTERNAL_TYPES;i++) {
tempit=&internal_types_table[i];
tempc=PrsClassNew;
tempc->type=HTT_INTERNAL_TYPE;
tempc->raw_type=tempit->type;
Bts(&tempc->flags,Cf_INTERNAL_TYPE);
tempc->size=tempit->size;
tempc->str=AStrNew(tempit->name);
HashAdd(tempc,cmp.asm_hash);
cmp.internal_types[tempc->raw_type]=tempc;
tmpit=&internal_types_table[i];
tmpc=PrsClassNew;
tmpc->type=HTT_INTERNAL_TYPE;
tmpc->raw_type=tmpit->type;
Bts(&tmpc->flags,Cf_INTERNAL_TYPE);
tmpc->size=tmpit->size;
tmpc->str=AStrNew(tmpit->name);
HashAdd(tmpc,cmp.asm_hash);
cmp.internal_types[tmpc->raw_type]=tmpc;
}
adam_task->hash_table->next=cmp.asm_hash;
}
+35 -35
View File
@@ -2,19 +2,19 @@ U0 AOTStoreCodeU8(CCmpCtrl *cc,U8 b)
{
CAOTCtrl *aotc=cc->aotc;
I64 i=aotc->ip>>AOT_BIN_BLK_BITS;
CAOTBinBlk *tempbin=aotc->bin;
CAOTBinBlk *tmpbin=aotc->bin;
while (i--)
if (!(tempbin=tempbin->next)) {
if (!(tmpbin=tmpbin->next)) {
i=aotc->ip>>AOT_BIN_BLK_BITS+1;
tempbin=&aotc->bin;
tmpbin=&aotc->bin;
while (i--) {
if (!tempbin->next)
tempbin->next=CAlloc(sizeof(CAOTBinBlk));
tempbin=tempbin->next;
if (!tmpbin->next)
tmpbin->next=CAlloc(sizeof(CAOTBinBlk));
tmpbin=tmpbin->next;
}
break;
}
tempbin->body[aotc->ip++ & (AOT_BIN_BLK_SIZE-1)]=b;
tmpbin->body[aotc->ip++ & (AOT_BIN_BLK_SIZE-1)]=b;
if (aotc->lst) {
if (aotc->lst_col>=24) {
'\n';
@@ -32,24 +32,24 @@ U0 AOTStoreCodeU32(CCmpCtrl *cc,U32 d)
CAOTCtrl *aotc=cc->aotc;
I64 i=aotc->ip>>AOT_BIN_BLK_BITS,j=(aotc->ip+sizeof(U32))>>AOT_BIN_BLK_BITS;
U32 *_d;
CAOTBinBlk *tempbin;
CAOTBinBlk *tmpbin;
if (i!=j)
for (i=0;i<sizeof(U32);i++)
AOTStoreCodeU8(cc,d.u8[i]);
else {
tempbin=aotc->bin;
tmpbin=aotc->bin;
while (i--)
if (!(tempbin=tempbin->next)) {
if (!(tmpbin=tmpbin->next)) {
i=aotc->ip>>AOT_BIN_BLK_BITS+1;
tempbin=&aotc->bin;
tmpbin=&aotc->bin;
while (i--) {
if (!tempbin->next)
tempbin->next=CAlloc(sizeof(CAOTBinBlk));
tempbin=tempbin->next;
if (!tmpbin->next)
tmpbin->next=CAlloc(sizeof(CAOTBinBlk));
tmpbin=tmpbin->next;
}
break;
}
_d=tempbin->body+ aotc->ip&(AOT_BIN_BLK_SIZE-1);
_d=tmpbin->body+ aotc->ip&(AOT_BIN_BLK_SIZE-1);
*_d=d;
aotc->ip+=sizeof(U32);
if (aotc->lst) {
@@ -70,24 +70,24 @@ U0 AOTStoreCodeU64(CCmpCtrl *cc,U64 q)
CAOTCtrl *aotc=cc->aotc;
I64 i=aotc->ip>>AOT_BIN_BLK_BITS,j=(aotc->ip+sizeof(I64))>>AOT_BIN_BLK_BITS,
*_q;
CAOTBinBlk *tempbin;
CAOTBinBlk *tmpbin;
if (i!=j)
for (i=0;i<sizeof(I64);i++)
AOTStoreCodeU8(cc,q.u8[i]);
else {
tempbin=aotc->bin;
tmpbin=aotc->bin;
while (i--)
if (!(tempbin=tempbin->next)) {
if (!(tmpbin=tmpbin->next)) {
i=aotc->ip>>AOT_BIN_BLK_BITS+1;
tempbin=&aotc->bin;
tmpbin=&aotc->bin;
while (i--) {
if (!tempbin->next)
tempbin->next=CAlloc(sizeof(CAOTBinBlk));
tempbin=tempbin->next;
if (!tmpbin->next)
tmpbin->next=CAlloc(sizeof(CAOTBinBlk));
tmpbin=tmpbin->next;
}
break;
}
_q=tempbin->body+ aotc->ip&(AOT_BIN_BLK_SIZE-1);
_q=tmpbin->body+ aotc->ip&(AOT_BIN_BLK_SIZE-1);
*_q=q;
aotc->ip+=sizeof(I64);
if (aotc->lst) {
@@ -106,19 +106,19 @@ U0 AOTStoreCodeU64(CCmpCtrl *cc,U64 q)
U0 AOTStoreCodeU8At(CCmpCtrl *cc,I64 ip,...)
{
CAOTCtrl *aotc=cc->aotc;
CAOTBinBlk *tempbin;
CAOTBinBlk *tmpbin;
I64 i,j;
for (j=0;j<argc;j++) {
i=ip>>AOT_BIN_BLK_BITS+1;
tempbin=&aotc->bin;
tmpbin=&aotc->bin;
while (i--) {
if (!tempbin->next) {
tempbin->next=CAlloc(sizeof(CAOTBinBlk));
tempbin->next->next=NULL;
if (!tmpbin->next) {
tmpbin->next=CAlloc(sizeof(CAOTBinBlk));
tmpbin->next->next=NULL;
}
tempbin=tempbin->next;
tmpbin=tmpbin->next;
}
tempbin->body[ip++ & (AOT_BIN_BLK_SIZE-1)]=argv[j];
tmpbin->body[ip++ & (AOT_BIN_BLK_SIZE-1)]=argv[j];
}
if (ip>aotc->num_bin_U8s)
aotc->num_bin_U8s=ip;
@@ -147,11 +147,11 @@ I64 AsmLexExpression(CCmpCtrl *cc)
U0 AsmLineLst(CCmpCtrl *cc)
{
CAOTCtrl *aotc=cc->aotc;
CLexFile *tempf=cc->lex_include_stk;
CDocEntry *doc_e=tempf->line_start,*doc_e2;
if (aotc->lst && aotc->lst_last_lfn==tempf && doc_e) {
CLexFile *tmpf=cc->lex_include_stk;
CDocEntry *doc_e=tmpf->line_start,*doc_e2;
if (aotc->lst && aotc->lst_last_lfn==tmpf && doc_e) {
if (doc_e2=aotc->lst_last_line) {
if (tempf->flags& LFSF_DOC) {
if (tmpf->flags& LFSF_DOC) {
while (doc_e2->y<doc_e->y) {
"%h*c%08X ",24-aotc->lst_col,CH_SPACE,aotc->lst_last_ip;
aotc->lst_col=0;
@@ -169,7 +169,7 @@ U0 AsmLineLst(CCmpCtrl *cc)
aotc->lst_last_line=doc_e;
} else {
aotc->lst_last_line=NULL;
aotc->lst_last_lfn=tempf;
aotc->lst_last_lfn=tmpf;
}
aotc->lst_last_ip=aotc->ip;
}
+133 -133
View File
@@ -1,40 +1,40 @@
U0 AsmResolve(CCmpCtrl *cc,CAsmUnresolvedRef *tempu,U8 *label,Bool undefined)
U0 AsmResolve(CCmpCtrl *cc,CAsmUnresolvedRef *tmpu,U8 *label,Bool undefined)
{
CAOTImportExport *tempie;
CAsmUndefHash *tempauh;
I64 r=Call(tempu->machine_code);
CAOTImportExport *tmpie;
CAsmUndefHash *tmpauh;
I64 r=Call(tmpu->machine_code);
if (undefined) {
tempauh=tempu->asm_undef_hash;
while (tempauh) {
if (tempauh->hash->type & HTF_UNRESOLVED) {
tempie=CAlloc(sizeof(CAOTImportExport));
tempie->next=tempauh->hash->ie_lst;
tempauh->hash->ie_lst=tempie;
tempie->ip=tempu->ip;
tempie->aot=cc->aot;
tempie->type=tempu->type;
tmpauh=tmpu->asm_undef_hash;
while (tmpauh) {
if (tmpauh->hash->type & HTF_UNRESOLVED) {
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->next=tmpauh->hash->ie_lst;
tmpauh->hash->ie_lst=tmpie;
tmpie->ip=tmpu->ip;
tmpie->aot=cc->aot;
tmpie->type=tmpu->type;
}
tempauh=tempauh->next; //Technically, more than one won't work.
tmpauh=tmpauh->next; //Technically, more than one won't work.
}
} else if (!(tempu->type&IEF_IMM_NOT_REL)) {
r-=tempu->rel_ip;
if (tempu->type==IET_REL_I8 && !(MIN_I8<=r<=MAX_I8) ||
tempu->type==IET_REL_I16 && !(MIN_I16<=r<=MAX_I16)) {
} else if (!(tmpu->type&IEF_IMM_NOT_REL)) {
r-=tmpu->rel_ip;
if (tmpu->type==IET_REL_I8 && !(MIN_I8<=r<=MAX_I8) ||
tmpu->type==IET_REL_I16 && !(MIN_I16<=r<=MAX_I16)) {
PrintErr("Branch out of range at line:%04d %s\n",
tempu->line_num,label);
tmpu->line_num,label);
LexExcept(cc);
}
if (tempu->U8_avail && tempu->type>IET_IMM_U8 && -124<=r<=123)
if (tmpu->U8_avail && tmpu->type>IET_IMM_U8 && -124<=r<=123)
PrintWarn("could use I8 displacement at line:%04d %s %s\n",
tempu->line_num,cc->aotc->last_label,label);
tmpu->line_num,cc->aotc->last_label,label);
}
AOTStoreCodeU8At(cc,tempu->ip,r.u8[0]);
if (tempu->type>=IET_REL_I16) {
AOTStoreCodeU8At(cc,tempu->ip+1,r.u8[1]);
if (tempu->type>=IET_REL_I32) {
AOTStoreCodeU8At(cc,tempu->ip+2,r.u8[2],r.u8[3]);
if (tempu->type>=IET_REL_I64)
AOTStoreCodeU8At(cc,tempu->ip+4,r.u8[4],r.u8[5],r.u8[6],r.u8[7]);
AOTStoreCodeU8At(cc,tmpu->ip,r.u8[0]);
if (tmpu->type>=IET_REL_I16) {
AOTStoreCodeU8At(cc,tmpu->ip+1,r.u8[1]);
if (tmpu->type>=IET_REL_I32) {
AOTStoreCodeU8At(cc,tmpu->ip+2,r.u8[2],r.u8[3]);
if (tmpu->type>=IET_REL_I64)
AOTStoreCodeU8At(cc,tmpu->ip+4,r.u8[4],r.u8[5],r.u8[6],r.u8[7]);
}
}
}
@@ -42,30 +42,30 @@ U0 AsmResolve(CCmpCtrl *cc,CAsmUnresolvedRef *tempu,U8 *label,Bool undefined)
U0 AOTLocalsResolve(CCmpCtrl *cc)
{
CAOTCtrl *aotc=cc->aotc;
CAsmUnresolvedRef *tempu=aotc->local_unresolved,*tempu1;
CAsmUndefHash *tempauh;
CAsmUnresolvedRef *tmpu=aotc->local_unresolved,*tmpu1;
CAsmUndefHash *tmpauh;
Bool undefined;
U8 *label=NULL;
while (tempu) {
while (tmpu) {
undefined=FALSE;
tempu1=tempu->next;
tempauh=tempu->asm_undef_hash;
while (tempauh) {
if (tempauh->hash->type & HTF_UNRESOLVED) {
tmpu1=tmpu->next;
tmpauh=tmpu->asm_undef_hash;
while (tmpauh) {
if (tmpauh->hash->type & HTF_UNRESOLVED) {
PrintErr("Undefined sym at line:%04d %s %s\n",
tempu->line_num,aotc->last_label,tempauh->hash->str);
tmpu->line_num,aotc->last_label,tmpauh->hash->str);
LexExcept(cc);
}
label=tempauh->hash->str;
tempauh=tempauh->next;
label=tmpauh->hash->str;
tmpauh=tmpauh->next;
}
if (!undefined)
AsmResolve(cc,tempu,label,FALSE);
Free(tempu->machine_code);
LinkedLstDel(tempu->asm_undef_hash);
Free(tempu);
tempu=tempu1;
AsmResolve(cc,tmpu,label,FALSE);
Free(tmpu->machine_code);
LinkedLstDel(tmpu->asm_undef_hash);
Free(tmpu);
tmpu=tmpu1;
}
HashTableDel(cc->htc.local_hash_table);
cc->htc.hash_table_lst=cc->htc.local_hash_table=HashTableNew(16);
@@ -73,114 +73,114 @@ U0 AOTLocalsResolve(CCmpCtrl *cc)
aotc->local_unresolved=NULL;
}
U0 AOTGlblsResolve(CCmpCtrl *cc,CAOT *tempaot)
U0 AOTGlblsResolve(CCmpCtrl *cc,CAOT *tmpaot)
{
CAOTCtrl *aotc=cc->aotc;
CHashFun *tempf;
CAsmUnresolvedRef *tempu=aotc->glbl_unresolved,*tempu1;
CHashFun *tmpf;
CAsmUnresolvedRef *tmpu=aotc->glbl_unresolved,*tmpu1;
I64 i,j;
CAOTImportExport *tempie,*tempie1;
CAsmUndefHash *tempauh;
CHashExport *tempex;
CAOTImportExport *tmpie,*tmpie1;
CAsmUndefHash *tmpauh;
CHashExport *tmpex;
U8 *label;
Bool undefined;
CExternUsage *tempeu,*tempeu8;
CExternUsage *tmpeu,*tmpeu8;
while (tempu) {
while (tmpu) {
label=NULL;
undefined=FALSE;
tempu1=tempu->next;
tempauh=tempu->asm_undef_hash;
while (tempauh) {
if (tempauh->hash->type & HTF_UNRESOLVED) {
tempex=tempauh->hash;
if (tempex->type & HTT_EXPORT_SYS_SYM&& tempex->type & HTF_UNRESOLVED &&
!(tempex->type & HTF_IMPORT) &&
(tempf=HashFind(tempex->str,cc->htc.hash_table_lst,HTT_FUN)) &&
!Bt(&tempf->flags,Cf_EXTERN)) {
tempex->val=tempf->exe_addr;
tempex->type&=~HTF_UNRESOLVED;
label=tempauh->hash->str;
tmpu1=tmpu->next;
tmpauh=tmpu->asm_undef_hash;
while (tmpauh) {
if (tmpauh->hash->type & HTF_UNRESOLVED) {
tmpex=tmpauh->hash;
if (tmpex->type & HTT_EXPORT_SYS_SYM&& tmpex->type & HTF_UNRESOLVED &&
!(tmpex->type & HTF_IMPORT) &&
(tmpf=HashFind(tmpex->str,cc->htc.hash_table_lst,HTT_FUN)) &&
!Bt(&tmpf->flags,Cf_EXTERN)) {
tmpex->val=tmpf->exe_addr;
tmpex->type&=~HTF_UNRESOLVED;
label=tmpauh->hash->str;
} else {
if (!(tempex->type & HTF_IMPORT)) {
if (!(tmpex->type & HTF_IMPORT)) {
if (cc->htc.local_var_lst) {
tempex->type|=HTF_GOTO_LABEL;
tempex->use_cnt++;
tmpex->type|=HTF_GOTO_LABEL;
tmpex->use_cnt++;
} else {
PrintErr("Undefined sym at line:%04d %s\n",
tempu->line_num,tempex->str);
tmpu->line_num,tmpex->str);
LexExcept(cc);
}
} else if (undefined) {
PrintErr("Two imports in same expression "
"not allowed at line:%04d %s\n",
tempu->line_num,tempex->str);
tmpu->line_num,tmpex->str);
LexExcept(cc);
}
undefined=TRUE;
}
} else
label=tempauh->hash->str;
tempauh=tempauh->next;
label=tmpauh->hash->str;
tmpauh=tmpauh->next;
}
AsmResolve(cc,tempu,label,undefined);
Free(tempu->machine_code);
LinkedLstDel(tempu->asm_undef_hash);
Free(tempu);
tempu=tempu1;
AsmResolve(cc,tmpu,label,undefined);
Free(tmpu->machine_code);
LinkedLstDel(tmpu->asm_undef_hash);
Free(tmpu);
tmpu=tmpu1;
}
for (i=0;i<=cc->htc.glbl_hash_table->mask;i++) {
tempex=cc->htc.glbl_hash_table->body[i];
while (tempex) {
if (tempex->type & (HTF_IMPORT|HTF_GOTO_LABEL)) {
if (tempex->use_cnt && (tempie=tempex->ie_lst)) {
if (tempex->type&HTF_GOTO_LABEL)
tempie->flags|=IEF_GOTO_LABEL;
if (tempex->import_name)
tempie->str=StrNew(tempex->import_name);
tmpex=cc->htc.glbl_hash_table->body[i];
while (tmpex) {
if (tmpex->type & (HTF_IMPORT|HTF_GOTO_LABEL)) {
if (tmpex->use_cnt && (tmpie=tmpex->ie_lst)) {
if (tmpex->type&HTF_GOTO_LABEL)
tmpie->flags|=IEF_GOTO_LABEL;
if (tmpex->import_name)
tmpie->str=StrNew(tmpex->import_name);
else
tempie->str=StrNew(tempex->str);
tmpie->str=StrNew(tmpex->str);
do {
tempie1=tempie->next;
QueIns(tempie,tempaot->last_ie);
} while (tempie=tempie1);
tempex->ie_lst=NULL;
tmpie1=tmpie->next;
QueIns(tmpie,tmpaot->last_ie);
} while (tmpie=tmpie1);
tmpex->ie_lst=NULL;
}
} else if (tempex->type & (HTF_EXPORT|HTF_RESOLVE)) {
if (tempex->type & HTF_UNRESOLVED) {
PrintErr("Undefined sym at %s\n",tempex->str);
} else if (tmpex->type & (HTF_EXPORT|HTF_RESOLVE)) {
if (tmpex->type & HTF_UNRESOLVED) {
PrintErr("Undefined sym at %s\n",tmpex->str);
LexExcept(cc);
}
if (tempex->type & HTF_RESOLVE) {
tempf=tempex;
tempeu=tempf->ext_lst;
while (tempeu) {
tempeu8=tempeu->next;
j=tempf->exe_addr-(tempeu->ip+4);
AOTStoreCodeU8At(cc,tempeu->ip,j.u8[0],j.u8[1],j.u8[2],j.u8[3]);
Free(tempeu);
tempeu=tempeu8;
if (tmpex->type & HTF_RESOLVE) {
tmpf=tmpex;
tmpeu=tmpf->ext_lst;
while (tmpeu) {
tmpeu8=tmpeu->next;
j=tmpf->exe_addr-(tmpeu->ip+4);
AOTStoreCodeU8At(cc,tmpeu->ip,j.u8[0],j.u8[1],j.u8[2],j.u8[3]);
Free(tmpeu);
tmpeu=tmpeu8;
}
}
if (tempex->type & HTF_EXPORT) {
tempie=CAlloc(sizeof(CAOTImportExport));
tempie->type=IET_REL32_EXPORT;
if (tempex->type & HTT_FUN)
tempie->ip=tempf->exe_addr;
else if (tempex->type & HTT_GLBL_VAR)
tempie->ip=tempex(CHashGlblVar *)->data_addr_ip;
if (tmpex->type & HTF_EXPORT) {
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->type=IET_REL32_EXPORT;
if (tmpex->type & HTT_FUN)
tmpie->ip=tmpf->exe_addr;
else if (tmpex->type & HTT_GLBL_VAR)
tmpie->ip=tmpex(CHashGlblVar *)->data_addr_ip;
else
tempie->ip=tempex->val;
tempie->aot=cc->aot;
if (tempex->type & HTF_IMM)
tempie->type++;
tempie->str=StrNew(tempex->str);
tempie->src_link=StrNew(tempex->src_link);
QueIns(tempie,tempaot->last_ie);
tmpie->ip=tmpex->val;
tmpie->aot=cc->aot;
if (tmpex->type & HTF_IMM)
tmpie->type++;
tmpie->str=StrNew(tmpex->str);
tmpie->src_link=StrNew(tmpex->src_link);
QueIns(tmpie,tmpaot->last_ie);
}
}
tempex=tempex->next;
tmpex=tmpex->next;
}
}
}
@@ -189,28 +189,28 @@ U0 AsmUnresolvedAdd(CCmpCtrl *cc,U8 *machine_code,I64 type,I64 ip,I64 rel_ip,
CAsmUndefHash *local_asm_undef_hash,CAsmUndefHash *glbl_asm_undef_hash,
I64 line_num,Bool U8_avail)
{
CAsmUnresolvedRef *tempu=MAlloc(sizeof(CAsmUnresolvedRef));
tempu->machine_code=machine_code;
tempu->type=type;
tempu->ip=ip;
tempu->rel_ip=rel_ip;
tempu->aot=cc->aot;
tempu->imm_flag=FALSE;
tempu->line_num=line_num;
tempu->U8_avail=U8_avail;
tempu->str=NULL;
CAsmUnresolvedRef *tmpu=MAlloc(sizeof(CAsmUnresolvedRef));
tmpu->machine_code=machine_code;
tmpu->type=type;
tmpu->ip=ip;
tmpu->rel_ip=rel_ip;
tmpu->aot=cc->aot;
tmpu->imm_flag=FALSE;
tmpu->line_num=line_num;
tmpu->U8_avail=U8_avail;
tmpu->str=NULL;
if (local_asm_undef_hash) {
tempu->asm_undef_hash=local_asm_undef_hash;
tempu->next=cc->aotc->local_unresolved;
cc->aotc->local_unresolved=tempu;
tmpu->asm_undef_hash=local_asm_undef_hash;
tmpu->next=cc->aotc->local_unresolved;
cc->aotc->local_unresolved=tmpu;
} else {
tempu->asm_undef_hash=glbl_asm_undef_hash;
tempu->next=cc->aotc->glbl_unresolved;
cc->aotc->glbl_unresolved=tempu;
tmpu->asm_undef_hash=glbl_asm_undef_hash;
tmpu->next=cc->aotc->glbl_unresolved;
cc->aotc->glbl_unresolved=tmpu;
if (glbl_asm_undef_hash->hash->type & HTF_IMPORT) {
tempu->str=StrNew(glbl_asm_undef_hash->hash->str);
tmpu->str=StrNew(glbl_asm_undef_hash->hash->str);
if (glbl_asm_undef_hash->hash->type & HTF_IMM)
tempu->imm_flag=TRUE;
tmpu->imm_flag=TRUE;
}
}
}
+296 -296
View File
@@ -1,7 +1,7 @@
U0 ICAddEct(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
U0 ICAddEct(CIntermediateCode *tmpi,CICType t1,I64 r1,I64 d1,
CICType t2,I64 r2,I64 d2,CICType t3,I64 r3,I64 d3,I64 op,I64 ip)
{
I64 i,temp,res_reg=REG_RAX;
I64 i,tmp,res_reg=REG_RAX;
Bool swap=FALSE;
if (r3!=res_reg) {
swap^=TRUE;
@@ -12,48 +12,48 @@ U0 ICAddEct(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
if (t2.raw_type>=RT_I64 && r2!=res_reg && t2&MDG_REG_DISP_SIB_RIP) {
if (t1&MDF_REG && !(r2==r1 && t2&MDG_REG_DISP_SIB))
res_reg=r1;
ICMov(tempi,MDF_REG+RT_I64,res_reg,0,t3,r3,d3,ip);
ICMov(tmpi,MDF_REG+RT_I64,res_reg,0,t3,r3,d3,ip);
i=ICModr1(res_reg,t2,r2,d2);
if (tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+op);
ICModr2(tempi,i,d2,ip+4);
if (tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+op);
ICModr2(tmpi,i,d2,ip+4);
} else {
if (t2&MDF_REG)
temp=r2;
tmp=r2;
else
temp=REG_RCX;
tmp=REG_RCX;
if (t1&MDF_REG)
res_reg=r1;
if (temp==res_reg)
if (tmp==res_reg)
res_reg=REG_RDX;
if (swap) {
if (r3==temp && t3&MDG_REG_DISP_SIB)
temp=REG_RCX;
ICMov(tempi,MDF_REG+RT_I64,temp,0,t2,r2,d2,ip);
ICMov(tempi,MDF_REG+RT_I64,res_reg,0,t3,r3,d3,ip);
if (r3==tmp && t3&MDG_REG_DISP_SIB)
tmp=REG_RCX;
ICMov(tmpi,MDF_REG+RT_I64,tmp,0,t2,r2,d2,ip);
ICMov(tmpi,MDF_REG+RT_I64,res_reg,0,t3,r3,d3,ip);
} else {
if (r2==res_reg && t2&MDG_REG_DISP_SIB)
res_reg=REG_RDX;
ICMov(tempi,MDF_REG+RT_I64,res_reg,0,t3,r3,d3,ip);
ICMov(tempi,MDF_REG+RT_I64,temp,0,t2,r2,d2,ip);
ICMov(tmpi,MDF_REG+RT_I64,res_reg,0,t3,r3,d3,ip);
ICMov(tmpi,MDF_REG+RT_I64,tmp,0,t2,r2,d2,ip);
}
i=0x48;
if (res_reg>7)
i+=4;
if (temp>7)
if (tmp>7)
i++;
if (tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
ICU24(tempi,0xC00000+i+(temp&7)<<16+(res_reg&7)<<19+op<<8);
if (tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
ICU24(tmpi,0xC00000+i+(tmp&7)<<16+(res_reg&7)<<19+op<<8);
}
ICMov(tempi,t1,r1,d1,MDF_REG+RT_I64,res_reg,0,ip);
ICMov(tmpi,t1,r1,d1,MDF_REG+RT_I64,res_reg,0,ip);
}
U0 ICAddSubEctImm(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
U0 ICAddSubEctImm(CIntermediateCode *tmpi,CICType t1,I64 r1,I64 d1,
CICType t2,I64 r2,I64 d2,I64 d,I64 op,I64 ip)
{
I64 i,r;
@@ -63,7 +63,7 @@ U0 ICAddSubEctImm(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
}
if (t1&MDF_REG) {
if (!(t2&MDF_REG)) {
ICMov(tempi,t1,r1,d1,t2,r2,d2,ip);
ICMov(tmpi,t1,r1,d1,t2,r2,d2,ip);
t2=t1;
r2=r1;
d2=d1;
@@ -77,18 +77,18 @@ U0 ICAddSubEctImm(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
(op.u8[0]==0x03||op.u8[0]==0x2B||op.u8[0]==0x33||op.u8[0]==0x0B))
return;
else if (d==1 && op.u8[0]==0x03) {
ICU24(tempi,0xC0FF00+op.u8[1]<<19+i+(r1&7)<<16);
ICU24(tmpi,0xC0FF00+op.u8[1]<<19+i+(r1&7)<<16);
return;
} else if (d==-1 && op.u8[0]==0x03) {
ICU24(tempi,0xC8FF00+i+(r1&7)<<16);
ICU24(tmpi,0xC8FF00+i+(r1&7)<<16);
return;
} else if (MIN_I8<=d<=MAX_I8) {
ICU24(tempi,0xC08300+op.u8[1]<<19+i+(r1&7)<<16);
ICU8(tempi,d);
ICU24(tmpi,0xC08300+op.u8[1]<<19+i+(r1&7)<<16);
ICU8(tmpi,d);
return;
} else if (MIN_I32<=d<=MAX_I32) {
ICU24(tempi,0xC08100+op.u8[1]<<19+i+(r1&7)<<16);
ICU32(tempi,d);
ICU24(tmpi,0xC08100+op.u8[1]<<19+i+(r1&7)<<16);
ICU32(tmpi,d);
return;
}
}
@@ -96,8 +96,8 @@ U0 ICAddSubEctImm(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
!Bt(&cmp.non_ptr_vars_mask,r2)) {
i=ICModr1(r1,MDF_DISP+RT_I64,r2,d);
i.u8[1]|=0x48;
ICU24(tempi,i.u8[2]<<16+0x8D00+i.u8[1]);
ICModr2(tempi,i,d,ip+4);
ICU24(tmpi,i.u8[2]<<16+0x8D00+i.u8[1]);
ICModr2(tmpi,i,d,ip+4);
return;
}
}
@@ -107,7 +107,7 @@ U0 ICAddSubEctImm(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
case MDf_SIB:
case MDf_RIP_DISP32:
if (t1!=t2 || r1!=r2 || d1!=d2) {
ICMov(tempi,t1,r1,d1,t2,r2,d2,ip);
ICMov(tmpi,t1,r1,d1,t2,r2,d2,ip);
t2=t1;
r2=r1;
d2=d1;
@@ -121,88 +121,88 @@ U0 ICAddSubEctImm(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
if (op.u8[0]==0x03 && (d==1 || d==-1)) { //Add
i=ICModr1(r,t1,r1,d1);
if (!(t1&MDF_REG) && tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
if (!(t1&MDF_REG) && tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
switch (t1.raw_type) {
case RT_I8:
case RT_U8:
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0xFE);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0xFE);
break;
case RT_I16:
case RT_U16:
ICOpSizeRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0xFF);
ICOpSizeRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0xFF);
break;
default:
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0xFF);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0xFF);
}
ICModr2(tempi,i,d1,ip+4);
ICModr2(tmpi,i,d1,ip+4);
return;
}
if (MIN_I8<=d<=MAX_I8 || t1&(RTG_MASK-RTF_UNSIGNED)==RT_I8) {
i=ICModr1(r,t1,r1,d1);
if (tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
if (tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
switch (t1.raw_type) {
case RT_I8:
case RT_U8:
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0x80);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0x80);
break;
case RT_I16:
case RT_U16:
ICOpSizeRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0x83);
ICOpSizeRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0x83);
break;
default:
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0x83);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0x83);
}
ICModr2(tempi,i,d1,ip+5);
ICU8(tempi,d);
ICModr2(tmpi,i,d1,ip+5);
ICU8(tmpi,d);
return;
}
if (MIN_I32<=d<=MAX_I32 || t1.raw_type<RT_I64) {
i=ICModr1(r,t1,r1,d1);
if (tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
if (tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
switch (t1.raw_type) {
case RT_I16:
case RT_U16:
ICOpSizeRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0x81);
ICOpSizeRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0x81);
break;
default:
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0x81);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0x81);
}
if (i.u8[0]!=MODR_RIP_REL)
ICModr2(tempi,i,d1,);
ICModr2(tmpi,i,d1,);
else {
if (t1&(RTG_MASK-RTF_UNSIGNED)==RT_I16)
ICU32(tempi,d1-(ip+tempi->ic_cnt+6));
ICU32(tmpi,d1-(ip+tmpi->ic_cnt+6));
else
ICU32(tempi,d1-(ip+tempi->ic_cnt+8));
tempi->ic_flags&=~ICF_CODE_FINAL;
ICU32(tmpi,d1-(ip+tmpi->ic_cnt+8));
tmpi->ic_flags&=~ICF_CODE_FINAL;
}
if (t1&(RTG_MASK-RTF_UNSIGNED)==RT_I16)
ICU16(tempi,d);
ICU16(tmpi,d);
else
ICU32(tempi,d);
ICU32(tmpi,d);
return;
}
break;
case MDf_STK:
ICAddSubEctImm(tempi,MDF_REG+RT_I64,REG_RAX,0,t2,r2,d2,d,op,ip);
ICPushRegs(tempi,1<<REG_RAX);
ICAddSubEctImm(tmpi,MDF_REG+RT_I64,REG_RAX,0,t2,r2,d2,d,op,ip);
ICPushRegs(tmpi,1<<REG_RAX);
return;
}
ICAddEct(tempi,t1,r1,d1,MDF_IMM+RT_I64,0,d,t2,r2,d2,op.u8[0],ip);
ICAddEct(tmpi,t1,r1,d1,MDF_IMM+RT_I64,0,d,t2,r2,d2,op.u8[0],ip);
}
U0 ICSub(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
U0 ICSub(CIntermediateCode *tmpi,CICType t1,I64 r1,I64 d1,
CICType t2,I64 r2,I64 d2,CICType t3,I64 r3,I64 d3,I64 ip)
{
I64 i=0x48,op=0x2B;
@@ -215,97 +215,97 @@ U0 ICSub(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
}
if (t2.raw_type>=RT_I64 && r2.u8[0]!=REG_RAX &&
(!(t2&MDF_SIB) || r2.u8[1]&15!=REG_RAX) && t2&MDG_REG_DISP_SIB_RIP) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,t3,r3,d3,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,t3,r3,d3,ip);
if (!swap) {
op=0x03;
ICU24(tempi,0xD8F748);
ICU24(tmpi,0xD8F748);
}
i=ICModr1(REG_RAX,t2,r2,d2);
if (tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+op);
ICModr2(tempi,i,d2,ip+4);
ICMov(tempi,t1,r1,d1,MDF_REG+RT_I64,REG_RAX,0,ip);
if (tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+op);
ICModr2(tmpi,i,d2,ip+4);
ICMov(tmpi,t1,r1,d1,MDF_REG+RT_I64,REG_RAX,0,ip);
} else {
if (!(t3&MDF_REG) || t3.raw_type<RT_I64) {
if (swap) {
swap=FALSE;
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,t3,r3,d3,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,t3,r3,d3,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
r2=REG_RAX;
r3=REG_RCX;
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,t3,r3,d3,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,t3,r3,d3,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
r3=REG_RAX;
r2=REG_RCX;
}
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
r2=REG_RCX;
}
if (swap) {
op=0x03;
ICU24(tempi,0xD9F748);
ICU24(tmpi,0xD9F748);
}
if (r3>7)
i++;
if (r2>7)
i+=4;
if (tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
ICU24(tempi,0xC00000+i+(r3&7)<<16+(r2&7)<<19+op<<8);
ICMov(tempi,t1,r1,d1,MDF_REG+RT_I64,r2,0,ip);
if (tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
ICU24(tmpi,0xC00000+i+(r3&7)<<16+(r2&7)<<19+op<<8);
ICMov(tmpi,t1,r1,d1,MDF_REG+RT_I64,r2,0,ip);
}
}
U0 ICMul(CIntermediateCode *tempi,I64 ip)
U0 ICMul(CIntermediateCode *tmpi,I64 ip)
{
I64 i,r2,r=REG_RAX,j;
CICArg *a1,*a2;
Bool alt;
if (tempi->a1.type&MDF_IMM) {
a1=&tempi->a2;
a2=&tempi->a1;
if (tmpi->a1.type&MDF_IMM) {
a1=&tmpi->a2;
a2=&tmpi->a1;
alt=TRUE;
} else {
a1=&tempi->a1;
a2=&tempi->a2;
a1=&tmpi->a1;
a2=&tmpi->a2;
alt=FALSE;
}
i=a2->disp;
if (!(tempi->ic_class->raw_type&RTF_UNSIGNED) &&
if (!(tmpi->ic_class->raw_type&RTF_UNSIGNED) &&
a2->type&MDF_IMM && MIN_I32<=i<=MAX_I32) {
if (tempi->r.type==MDF_REG+RT_I64) {
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
if (tmpi->r.type==MDF_REG+RT_I64) {
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
a1->type,a1->reg,a1->disp,ip);
r=tempi->r.reg;
r=tmpi->r.reg;
} else
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,a1->type,a1->reg,a1->disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,a1->type,a1->reg,a1->disp,ip);
if (r>7)
j=0xC0004D;
else
j=0xC00048;
if (MIN_I8<=i<=MAX_I8)
ICU32(tempi,i<<24+0x6B00+j+(r&7)<<16+(r&7)<<19);
ICU32(tmpi,i<<24+0x6B00+j+(r&7)<<16+(r&7)<<19);
else {
ICU24(tempi,0x6900+j+(r&7)<<16+(r&7)<<19);
ICU32(tempi,i);
ICU24(tmpi,0x6900+j+(r&7)<<16+(r&7)<<19);
ICU32(tmpi,i);
}
} else {
if (tempi->ic_class->raw_type&RTF_UNSIGNED)
if (tmpi->ic_class->raw_type&RTF_UNSIGNED)
i=0xE0F748;
else
i=0xE8F748;
if (alt) {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,a1->type,a1->reg,a1->disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,a1->type,a1->reg,a1->disp,ip);
r2=REG_RCX;
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip);
if (!(a1->type&MDF_REG) || a1->type.raw_type<RT_I64) {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,a1->type,a1->reg,a1->disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,a1->type,a1->reg,a1->disp,ip);
r2=REG_RCX;
} else
r2=a1->reg;
@@ -314,196 +314,196 @@ U0 ICMul(CIntermediateCode *tempi,I64 ip)
i++;
r2&=7;
}
ICU24(tempi,i+r2<<16);
ICU24(tmpi,i+r2<<16);
}
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,MDF_REG+RT_I64,r,0,ip);
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,MDF_REG+RT_I64,r,0,ip);
}
U0 ICMulEqu(CIntermediateCode *tempi,I64 ip)
U0 ICMulEqu(CIntermediateCode *tmpi,I64 ip)
{
I64 i=tempi->a2.disp,r=REG_RAX,j;
if (!(tempi->ic_class->raw_type&RTF_UNSIGNED) &&
tempi->a2.type&MDF_IMM && MIN_I32<=i<=MAX_I32) {
if (tempi->ic_flags & ICF_BY_VAL) {
if (tempi->a1.type==MDF_REG+RT_I64)
r=tempi->a1.reg;
I64 i=tmpi->a2.disp,r=REG_RAX,j;
if (!(tmpi->ic_class->raw_type&RTF_UNSIGNED) &&
tmpi->a2.type&MDF_IMM && MIN_I32<=i<=MAX_I32) {
if (tmpi->ic_flags & ICF_BY_VAL) {
if (tmpi->a1.type==MDF_REG+RT_I64)
r=tmpi->a1.reg;
else
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,ip);
if (r>7)
j=0xC0004D;
else
j=0xC00048;
if (MIN_I8<=i<=MAX_I8)
ICU32(tempi,i<<24+0x6B00+j+(r&7)<<16+(r&7)<<19);
ICU32(tmpi,i<<24+0x6B00+j+(r&7)<<16+(r&7)<<19);
else {
ICU24(tempi,0x6900+j+(r&7)<<16+(r&7)<<19);
ICU32(tempi,i);
ICU24(tmpi,0x6900+j+(r&7)<<16+(r&7)<<19);
ICU32(tmpi,i);
}
ICMov(tempi,tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,MDF_REG+RT_I64,r,0,ip);
ICMov(tmpi,tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,MDF_REG+RT_I64,r,0,ip);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RBX,0,
MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RBX,0,
MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,ip);
r=REG_RBX;
if (MIN_I8<=i<=MAX_I8)
ICU32(tempi,i<<24+0xDB6B48);
ICU32(tmpi,i<<24+0xDB6B48);
else {
ICU24(tempi,0xDB6948);
ICU32(tempi,i);
ICU24(tmpi,0xDB6948);
ICU32(tmpi,i);
}
ICMov(tempi,MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,
ICMov(tmpi,MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,
MDF_REG+RT_I64,REG_RBX,0,ip);
}
} else {
if (tempi->ic_class->raw_type&RTF_UNSIGNED)
if (tmpi->ic_class->raw_type&RTF_UNSIGNED)
i=0xE3F748;
else
i=0xEBF748;
if (tempi->ic_flags & ICF_BY_VAL) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RBX,0,
tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,ip);
ICU24(tempi,i);
ICMov(tempi,tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,MDF_REG+RT_I64,REG_RAX,0,ip);
if (tmpi->ic_flags & ICF_BY_VAL) {
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RBX,0,
tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,ip);
ICU24(tmpi,i);
ICMov(tmpi,tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,MDF_REG+RT_I64,REG_RAX,0,ip);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RBX,0,
MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,ip);
ICU24(tempi,i);
ICMov(tempi,MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RBX,0,
MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,ip);
ICU24(tmpi,i);
ICMov(tmpi,MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,
MDF_REG+RT_I64,REG_RAX,0,ip);
}
}
if (tempi->r.type.mode)
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,MDF_REG+RT_I64,r,0,ip);
if (tmpi->r.type.mode)
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,MDF_REG+RT_I64,r,0,ip);
}
U0 ICDiv(CIntermediateCode *tempi,I64 ip)
U0 ICDiv(CIntermediateCode *tmpi,I64 ip)
{
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
if (tempi->ic_class->raw_type&RTF_UNSIGNED) {
ICZero(tempi,REG_RDX);
ICU24(tempi,0xF1F748);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
if (tmpi->ic_class->raw_type&RTF_UNSIGNED) {
ICZero(tmpi,REG_RDX);
ICU24(tmpi,0xF1F748);
} else {
ICU16(tempi,0x9948);
ICU24(tempi,0xF9F748);
ICU16(tmpi,0x9948);
ICU24(tmpi,0xF9F748);
}
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
}
U0 ICDivEqu(CIntermediateCode *tempi,Bool is_mod,I64 ip)
U0 ICDivEqu(CIntermediateCode *tmpi,Bool is_mod,I64 ip)
{
if (tempi->ic_flags & ICF_BY_VAL) {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,ip);
if (tempi->ic_class->raw_type&RTF_UNSIGNED) {
ICZero(tempi,REG_RDX);
ICU24(tempi,0xF1F748);
if (tmpi->ic_flags & ICF_BY_VAL) {
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,ip);
if (tmpi->ic_class->raw_type&RTF_UNSIGNED) {
ICZero(tmpi,REG_RDX);
ICU24(tmpi,0xF1F748);
} else {
ICU16(tempi,0x9948);
ICU24(tempi,0xF9F748);
ICU16(tmpi,0x9948);
ICU24(tmpi,0xF9F748);
}
if (is_mod)
ICMov(tempi,tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,MDF_REG+RT_I64,REG_RDX,0,ip);
ICMov(tmpi,tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,MDF_REG+RT_I64,REG_RDX,0,ip);
else
ICMov(tempi,tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,MDF_REG+RT_I64,REG_RAX,0,ip);
ICMov(tmpi,tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,MDF_REG+RT_I64,REG_RAX,0,ip);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RBX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RBX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
//dangerous might clobber RBX in Mov, but it doesn't
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,MDF_DISP+tempi->a1_type_pointed_to,
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,MDF_DISP+tmpi->a1_type_pointed_to,
REG_RBX,0,ip);
if (tempi->ic_class->raw_type&RTF_UNSIGNED) {
ICZero(tempi,REG_RDX);
ICU24(tempi,0xF1F748);
if (tmpi->ic_class->raw_type&RTF_UNSIGNED) {
ICZero(tmpi,REG_RDX);
ICU24(tmpi,0xF1F748);
} else {
ICU16(tempi,0x9948);
ICU24(tempi,0xF9F748);
ICU16(tmpi,0x9948);
ICU24(tmpi,0xF9F748);
}
if (is_mod)
ICMov(tempi,MDF_DISP+tempi->a1_type_pointed_to,REG_RBX,0,
ICMov(tmpi,MDF_DISP+tmpi->a1_type_pointed_to,REG_RBX,0,
MDF_REG+RT_I64,REG_RDX,0,ip);
else
ICMov(tempi,MDF_DISP+tempi->a1_type_pointed_to,REG_RBX,0,
ICMov(tmpi,MDF_DISP+tmpi->a1_type_pointed_to,REG_RBX,0,
MDF_REG+RT_I64,REG_RAX,0,ip);
}
if (tempi->r.type.mode) {
if (tmpi->r.type.mode) {
if (is_mod)
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RDX,0,ip);
else
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
}
}
U0 ICMod(CIntermediateCode *tempi,I64 ip)
U0 ICMod(CIntermediateCode *tmpi,I64 ip)
{
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
if (tempi->ic_class->raw_type&RTF_UNSIGNED) {
ICZero(tempi,REG_RDX);
ICU24(tempi,0xF1F748);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
if (tmpi->ic_class->raw_type&RTF_UNSIGNED) {
ICZero(tmpi,REG_RDX);
ICU24(tmpi,0xF1F748);
} else {
ICU16(tempi,0x9948);
ICU24(tempi,0xF9F748);
ICU16(tmpi,0x9948);
ICU24(tmpi,0xF9F748);
}
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RDX,0,ip);
}
U0 ICAddSubEctEqu(CIntermediateCode *tempi,U8 type_pointed_to,
U0 ICAddSubEctEqu(CIntermediateCode *tmpi,U8 type_pointed_to,
CICType t1,I64 r1,I64 d1,CICType t2,I64 r2,I64 d2,
CICType t3,I64 r3,I64 d3,I64 op,I64 ip)
{
Bool done;
I64 res_reg,temp,i;
if (tempi->ic_flags & ICF_BY_VAL) {
I64 res_reg,tmp,i;
if (tmpi->ic_flags & ICF_BY_VAL) {
if (t3&MDF_IMM) {
ICAddSubEctImm(tempi,t2&MDG_MASK+type_pointed_to,r2,d2,t2&MDG_MASK+
ICAddSubEctImm(tmpi,t2&MDG_MASK+type_pointed_to,r2,d2,t2&MDG_MASK+
type_pointed_to,r2,d2,d3,op,ip);
if (t1.mode)
ICMov(tempi,t1,r1,d1,t2&MDG_MASK+type_pointed_to,r2,d2,ip);
ICMov(tmpi,t1,r1,d1,t2&MDG_MASK+type_pointed_to,r2,d2,ip);
return;
} else {
done=FALSE;
if (type_pointed_to>=RT_I64) {
if (!t1.mode && t2&MDG_REG_DISP_SIB_RIP) {
if (t3&MDF_REG)
temp=r3;
tmp=r3;
else {
temp=REG_RCX;
ICMov(tempi,MDF_REG+RT_I64,temp,0,t3,r3,d3,ip);
tmp=REG_RCX;
ICMov(tmpi,MDF_REG+RT_I64,tmp,0,t3,r3,d3,ip);
}
i=ICModr1(temp,t2&MDG_MASK+type_pointed_to,r2,d2);
if (tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+op.u8[5]);
ICModr2(tempi,i,d2,ip+4);
i=ICModr1(tmp,t2&MDG_MASK+type_pointed_to,r2,d2);
if (tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+op.u8[5]);
ICModr2(tmpi,i,d2,ip+4);
return;
}
if (t3.raw_type>=RT_I64 && t3&MDG_REG_DISP_SIB_RIP) {
@@ -511,36 +511,36 @@ U0 ICAddSubEctEqu(CIntermediateCode *tempi,U8 type_pointed_to,
res_reg=r2;
else {
res_reg=REG_RCX;
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
}
i=ICModr1(res_reg,t3&MDG_MASK+type_pointed_to,r3,d3);
if (tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+op.u8[0]);
ICModr2(tempi,i,d3,ip+4);
ICMov(tempi,t2&MDG_MASK+type_pointed_to,r2,d2,
if (tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+op.u8[0]);
ICModr2(tmpi,i,d3,ip+4);
ICMov(tmpi,t2&MDG_MASK+type_pointed_to,r2,d2,
MDF_REG+RT_I64,res_reg,0,ip);
done=TRUE;
}
}
if (!done) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,t3,r3,d3,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,t3,r3,d3,ip);
if (t2&MDF_REG && r2!=REG_RAX)
res_reg=r2;
else {
res_reg=REG_RCX;
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
t2&MDG_MASK+type_pointed_to,r2,d2,ip);
}
if (tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
if (tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
if (res_reg>7)
ICU8(tempi,0x4C);
ICU8(tmpi,0x4C);
else
ICU8(tempi,0x48);
ICU16(tempi,0xC000+op.u8[0]+(res_reg&7)<<11);
ICMov(tempi,t2&MDG_MASK+type_pointed_to,r2,d2,
ICU8(tmpi,0x48);
ICU16(tmpi,0xC000+op.u8[0]+(res_reg&7)<<11);
ICMov(tmpi,t2&MDG_MASK+type_pointed_to,r2,d2,
MDF_REG+RT_I64,res_reg,0,ip);
}
}
@@ -548,71 +548,71 @@ U0 ICAddSubEctEqu(CIntermediateCode *tempi,U8 type_pointed_to,
done=FALSE;
if (t3&MDF_IMM && op.u8[2]) {
if (!d3.u32[1]) {
if (tempi->ic_flags&ICF_RES_NOT_USED &&
if (tmpi->ic_flags&ICF_RES_NOT_USED &&
t2&MDF_REG && d3(U64)<=MAX_I8) {
ICSlashOp(tempi,MDF_DISP+type_pointed_to,r2,0,0x838000+op.u8[4],ip);
ICU8(tempi,d3);
ICSlashOp(tmpi,MDF_DISP+type_pointed_to,r2,0,0x838000+op.u8[4],ip);
ICU8(tmpi,d3);
done=TRUE;
} else if (op.u8[2]==0x24) {//AND
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
MDF_DISP+type_pointed_to,REG_RCX,0,ip);
res_reg=REG_RAX;
if (tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
ICU16(tempi,op.u8[3]<<8+0x40);
ICU32(tempi,d3);
ICMov(tempi,MDF_DISP+type_pointed_to,REG_RCX,0,
if (tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
ICU16(tmpi,op.u8[3]<<8+0x40);
ICU32(tmpi,d3);
ICMov(tmpi,MDF_DISP+type_pointed_to,REG_RCX,0,
MDF_REG+RT_I64,res_reg,0,ip);
done=TRUE;
} else if (type_pointed_to<RT_I64) {//OR/XOR
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
MDF_DISP+type_pointed_to,REG_RCX,0,ip);
res_reg=REG_RAX;
if (tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
if (tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
if (d3.u16[1]) {
ICU16(tempi,op.u8[3]<<8+0x40);
ICU32(tempi,d3);
ICU16(tmpi,op.u8[3]<<8+0x40);
ICU32(tmpi,d3);
} else if (d3.u8[1]) {
ICU24(tempi,op.u8[3]<<16+0x4000+OC_OP_SIZE_PREFIX);
ICU16(tempi,d3);
ICU24(tmpi,op.u8[3]<<16+0x4000+OC_OP_SIZE_PREFIX);
ICU16(tmpi,d3);
} else {
ICU16(tempi,op.u8[2]<<8+0x40);
ICU8(tempi,d3);
ICU16(tmpi,op.u8[2]<<8+0x40);
ICU8(tmpi,d3);
}
ICMov(tempi,MDF_DISP+type_pointed_to,REG_RCX,0,
ICMov(tmpi,MDF_DISP+type_pointed_to,REG_RCX,0,
MDF_REG+RT_I64,res_reg,0,ip);
done=TRUE;
}
}
}
if (!done) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,t3,r3,d3,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RBX,0,
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,t3,r3,d3,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RBX,0,
MDF_DISP+type_pointed_to,REG_RCX,0,ip);
res_reg=REG_RBX;
if (tempi->ic_flags&ICF_LOCK)
ICU8(tempi,OC_LOCK_PREFIX);
ICU8(tempi,0x48);
ICU16(tempi,0xC000+op.u8[0]+(res_reg&7)<<11);
ICMov(tempi,MDF_DISP+type_pointed_to,REG_RCX,0,
if (tmpi->ic_flags&ICF_LOCK)
ICU8(tmpi,OC_LOCK_PREFIX);
ICU8(tmpi,0x48);
ICU16(tmpi,0xC000+op.u8[0]+(res_reg&7)<<11);
ICMov(tmpi,MDF_DISP+type_pointed_to,REG_RCX,0,
MDF_REG+RT_I64,res_reg,0,ip);
}
}
if (t1.mode)
ICMov(tempi,t1,r1,d1,MDF_REG+RT_I64,res_reg,0,ip);
ICMov(tmpi,t1,r1,d1,MDF_REG+RT_I64,res_reg,0,ip);
}
U0 ICShift(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
U0 ICShift(CIntermediateCode *tmpi,CICType t1,I64 r1,I64 d1,
CICType t2,I64 r2,I64 d2,CICType t3,I64 r3,I64 d3,
I64 us,I64 is,I64 ip)
{
I64 i=0x48,res_reg;
if (tempi->ic_class->raw_type&RTF_UNSIGNED ||
tempi->ic_flags & ICF_USE_UNSIGNED)
if (tmpi->ic_class->raw_type&RTF_UNSIGNED ||
tmpi->ic_flags & ICF_USE_UNSIGNED)
is=us;
if (t1&MDF_REG) {
res_reg=r1;
@@ -621,74 +621,74 @@ U0 ICShift(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
} else
res_reg=REG_RAX;
if (t3&MDF_IMM) {
ICMov(tempi,MDF_REG+RT_I64,res_reg,0,t2,r2,d2,ip);
ICMov(tmpi,MDF_REG+RT_I64,res_reg,0,t2,r2,d2,ip);
if (d3==1)
ICU24(tempi,i+is.u16[2]<<8+(res_reg&7)<<16);
ICU24(tmpi,i+is.u16[2]<<8+(res_reg&7)<<16);
else {
ICU24(tempi,i+is.u16[0]<<8+(res_reg&7)<<16);
ICU8(tempi,d3);
ICU24(tmpi,i+is.u16[0]<<8+(res_reg&7)<<16);
ICU8(tmpi,d3);
}
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,t3,r3,d3,ip);
ICMov(tempi,MDF_REG+RT_I64,res_reg,0,t2,r2,d2,ip);
ICU24(tempi,i+is.u16[1]<<8+(res_reg&7)<<16);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,t3,r3,d3,ip);
ICMov(tmpi,MDF_REG+RT_I64,res_reg,0,t2,r2,d2,ip);
ICU24(tmpi,i+is.u16[1]<<8+(res_reg&7)<<16);
}
ICMov(tempi,t1,r1,d1,MDF_REG+RT_I64,res_reg,0,ip);
ICMov(tmpi,t1,r1,d1,MDF_REG+RT_I64,res_reg,0,ip);
}
U0 ICShiftEqu(CIntermediateCode *tempi,U8 type_pointed_to,
U0 ICShiftEqu(CIntermediateCode *tmpi,U8 type_pointed_to,
CICType t1,I64 r1,I64 d1,
CICType t2,I64 r2,I64 d2,
CICType t3,I64 r3,I64 d3,I64 us,I64 is,I64 ip)
{
I64 res_reg;
if (tempi->ic_class->raw_type&RTF_UNSIGNED ||
tempi->ic_flags & ICF_USE_UNSIGNED)
if (tmpi->ic_class->raw_type&RTF_UNSIGNED ||
tmpi->ic_flags & ICF_USE_UNSIGNED)
is=us;
if (tempi->ic_flags & ICF_BY_VAL) {
if (tmpi->ic_flags & ICF_BY_VAL) {
if (!(t3&MDF_IMM))
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,t3,r3,d3,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,t3,r3,d3,ip);
if (t2&MDF_REG)
res_reg=r2;
else {
res_reg=REG_RAX;
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
t2&MDG_MASK+type_pointed_to,r2,d2,ip);
}
if (res_reg>7)
ICU8(tempi,0x49);
ICU8(tmpi,0x49);
else
ICU8(tempi,0x48);
ICU8(tmpi,0x48);
if (t3&MDF_IMM) {
if (d3==1)
ICU16(tempi,is.u16[2]+(res_reg&7)<<8);
ICU16(tmpi,is.u16[2]+(res_reg&7)<<8);
else {
ICU16(tempi,is.u16[0]+(res_reg&7)<<8);
ICU8(tempi,d3);
ICU16(tmpi,is.u16[0]+(res_reg&7)<<8);
ICU8(tmpi,d3);
}
} else
ICU16(tempi,is.u16[1]+(res_reg&7)<<8);
ICMov(tempi,t2&MDG_MASK+type_pointed_to,r2,d2,
ICU16(tmpi,is.u16[1]+(res_reg&7)<<8);
ICMov(tmpi,t2&MDG_MASK+type_pointed_to,r2,d2,
MDF_REG+RT_I64,res_reg,0,ip);
} else {
if (!(t3&MDF_IMM))
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,t3,r3,d3,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,t2,r2,d2,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,MDF_DISP+type_pointed_to,REG_RDX,0,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,t3,r3,d3,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,t2,r2,d2,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,MDF_DISP+type_pointed_to,REG_RDX,0,ip);
res_reg=REG_RAX;
ICU8(tempi,0x48);
ICU8(tmpi,0x48);
if (t3&MDF_IMM) {
if (d3==1)
ICU16(tempi,is.u16[2]+(res_reg&7)<<8);
ICU16(tmpi,is.u16[2]+(res_reg&7)<<8);
else {
ICU16(tempi,is.u16[0]+(res_reg&7)<<8);
ICU8(tempi,d3);
ICU16(tmpi,is.u16[0]+(res_reg&7)<<8);
ICU8(tmpi,d3);
}
} else
ICU16(tempi,is.u16[1]+(res_reg&7)<<8);
ICMov(tempi,
ICU16(tmpi,is.u16[1]+(res_reg&7)<<8);
ICMov(tmpi,
MDF_DISP+type_pointed_to,REG_RDX,0,MDF_REG+RT_I64,res_reg,0,ip);
}
if (t1.mode)
ICMov(tempi,t1,r1,d1,MDF_REG+RT_I64,res_reg,0,ip);
ICMov(tmpi,t1,r1,d1,MDF_REG+RT_I64,res_reg,0,ip);
}
+339 -339
View File
File diff suppressed because it is too large. Load diff
+318 -318
View File
@@ -1,4 +1,4 @@
U0 ICAndBranch(CIntermediateCode *tempi,I64 ip,I64 is,U8 *buf,I64 ip2)
U0 ICAndBranch(CIntermediateCode *tmpi,I64 ip,I64 is,U8 *buf,I64 ip2)
{
U64 i;
I64 it,t1,r1,d1,r2;
@@ -6,14 +6,14 @@ U0 ICAndBranch(CIntermediateCode *tempi,I64 ip,I64 is,U8 *buf,I64 ip2)
CCodeMisc *lb;
CICArg *a1,*a2;
if (tempi->a1.type&MDF_IMM) {
if (tmpi->a1.type&MDF_IMM) {
swap=TRUE;
a1=&tempi->a2;
a2=&tempi->a1;
a1=&tmpi->a2;
a2=&tmpi->a1;
} else {
swap=FALSE;
a1=&tempi->a1;
a2=&tempi->a2;
a1=&tmpi->a1;
a2=&tmpi->a2;
}
if (a2->type&MDF_IMM && a2->disp>MAX_U32)
@@ -28,14 +28,14 @@ U0 ICAndBranch(CIntermediateCode *tempi,I64 ip,I64 is,U8 *buf,I64 ip2)
i=a2->disp;
if (a2->type&MDF_IMM && i<=MAX_U32) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,a1->type,a1->reg,a1->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,a1->type,a1->reg,a1->disp,ip2);
if (i<=MAX_U8)
ICU16(tempi,i<<8+0xA8);
ICU16(tmpi,i<<8+0xA8);
else if (i<=MAX_U16)
ICU32(tempi,i<<16+0xA900+OC_OP_SIZE_PREFIX);
ICU32(tmpi,i<<16+0xA900+OC_OP_SIZE_PREFIX);
else {
ICU8(tempi,0xA9);
ICU32(tempi,i);
ICU8(tmpi,0xA9);
ICU32(tmpi,i);
}
} else {
t1=MDF_REG+it;
@@ -55,13 +55,13 @@ U0 ICAndBranch(CIntermediateCode *tempi,I64 ip,I64 is,U8 *buf,I64 ip2)
r2=REG_RDX;
if (swap) {
if (!(a1->type&MDF_REG) || r1!=a1->reg)
ICMov(tempi,MDF_REG+RT_I64,r1,0,a1->type,a1->reg,a1->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,r1,0,a1->type,a1->reg,a1->disp,ip2);
if (a2->type&MDG_REG_DISP_SIB_RIP) {
t1=a2->type&MDG_MASK+it;
r2=a2->reg;
d1=a2->disp;
} else
ICMov(tempi,MDF_REG+RT_I64,r2,0,a2->type,a2->reg,a2->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,r2,0,a2->type,a2->reg,a2->disp,ip2);
i=ICModr1(r1,t1,r2,d1);
} else {
if (a1->type&MDG_REG_DISP_SIB_RIP) {
@@ -69,9 +69,9 @@ U0 ICAndBranch(CIntermediateCode *tempi,I64 ip,I64 is,U8 *buf,I64 ip2)
r1=a1->reg;
d1=a1->disp;
} else
ICMov(tempi,MDF_REG+RT_I64,r1,0,a1->type,a1->reg,a1->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,r1,0,a1->type,a1->reg,a1->disp,ip2);
if (!(a2->type&MDF_REG) || r2!=a2->reg)
ICMov(tempi,MDF_REG+RT_I64,r2,0,a2->type,a2->reg,a2->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,r2,0,a2->type,a2->reg,a2->disp,ip2);
i=ICModr1(r2,t1,r1,d1);
}
} else {
@@ -95,43 +95,43 @@ U0 ICAndBranch(CIntermediateCode *tempi,I64 ip,I64 is,U8 *buf,I64 ip2)
r2=a2->reg;
d1=a2->disp;
} else
ICMov(tempi,MDF_REG+RT_I64,r2,0,a2->type,a2->reg,a2->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,r2,0,a2->type,a2->reg,a2->disp,ip2);
if (!(a1->type&MDF_REG) || r1!=a1->reg)
ICMov(tempi,MDF_REG+RT_I64,r1,0,a1->type,a1->reg,a1->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,r1,0,a1->type,a1->reg,a1->disp,ip2);
i=ICModr1(r1,t1,r2,d1);
} else {
if (!(a2->type&MDF_REG) || r2!=a2->reg)
ICMov(tempi,MDF_REG+RT_I64,r2,0,a2->type,a2->reg,a2->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,r2,0,a2->type,a2->reg,a2->disp,ip2);
if (a1->type&MDG_REG_DISP_SIB_RIP) {
t1=a1->type&MDG_MASK+it;
r1=a1->reg;
d1=a1->disp;
} else
ICMov(tempi,MDF_REG+RT_I64,r1,0,a1->type,a1->reg,a1->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,r1,0,a1->type,a1->reg,a1->disp,ip2);
i=ICModr1(r2,t1,r1,d1);
}
}
switch (it) {
case RT_I8:
case RT_U8:
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0x84);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0x84);
break;
case RT_U16:
case RT_I16:
ICOpSizeRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0x85);
ICOpSizeRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0x85);
break;
default:
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0x85);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0x85);
}
ICModr2(tempi,i,d1,ip2+4);
ICModr2(tmpi,i,d1,ip2+4);
}
ip+=tempi->ic_cnt;
lb=OptLabelFwd(tempi->ic_data);
short_jmp=ToBool(tempi->ic_flags&ICF_SHORT_JMP);
ip+=tmpi->ic_cnt;
lb=OptLabelFwd(tmpi->ic_data);
short_jmp=ToBool(tmpi->ic_flags&ICF_SHORT_JMP);
if (!buf && lb->addr!=INVALID_PTR) {
i=lb->addr-(ip+2);
if (lb->flags&CMF_POP_CMP)
@@ -141,82 +141,82 @@ U0 ICAndBranch(CIntermediateCode *tempi,I64 ip,I64 is,U8 *buf,I64 ip2)
}
if (short_jmp) {
tempi->ic_flags|=ICF_SHORT_JMP;
tmpi->ic_flags|=ICF_SHORT_JMP;
i=lb->addr-(ip+2);
if (lb->flags&CMF_POP_CMP)
i+=8;
ICU16(tempi,i<<8+is.u8[2]);
ICU16(tmpi,i<<8+is.u8[2]);
} else {
tempi->ic_flags&=~ICF_SHORT_JMP;
tmpi->ic_flags&=~ICF_SHORT_JMP;
i=lb->addr-(ip+6);
if (lb->flags&CMF_POP_CMP)
i+=8;
ICU16(tempi,is.u16[0]);
ICU32(tempi,i);
ICU16(tmpi,is.u16[0]);
ICU32(tmpi,i);
}
}
U0 ICAssign(CIntermediateCode *tempi,I64 ip)
U0 ICAssign(CIntermediateCode *tmpi,I64 ip)
{
CIntermediateCode *tempi1;
if (tempi->ic_flags & ICF_BY_VAL) {
ICMov(tempi,tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
if (tempi->r.type.mode)
ICMov(tempi,tempi->r.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->r.reg,tempi->r.disp,
tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,ip);
CIntermediateCode *tmpi1;
if (tmpi->ic_flags & ICF_BY_VAL) {
ICMov(tmpi,tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
if (tmpi->r.type.mode)
ICMov(tmpi,tmpi->r.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->r.reg,tmpi->r.disp,
tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,ip);
} else {
if (tempi->a1.type&MDF_REG) {
if (!(tempi1=OptLag1(tempi)) || tempi1->ic_code!=IC_ADD_CONST ||
tempi1->r.type!=MDF_REG+RT_I64 || tempi1->r.reg!=tempi->a1.reg ||
tempi1->a1.type!=MDF_REG+RT_I64 || tempi1->a1.reg!=tempi->a1.reg ||
(tempi->a2.type&MDF_REG || tempi->a2.type&MDF_DISP) &&
tempi->a2.reg==tempi->a1.reg ||
tempi->r.type.mode || tempi1->ic_flags&~ICG_NO_CVT_MASK) {
ICMov(tempi,
MDF_DISP+tempi->a1_type_pointed_to,tempi->a1.reg,tempi->a1.disp,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
if (tempi->r.type.mode)
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
if (tmpi->a1.type&MDF_REG) {
if (!(tmpi1=OptLag1(tmpi)) || tmpi1->ic_code!=IC_ADD_CONST ||
tmpi1->r.type!=MDF_REG+RT_I64 || tmpi1->r.reg!=tmpi->a1.reg ||
tmpi1->a1.type!=MDF_REG+RT_I64 || tmpi1->a1.reg!=tmpi->a1.reg ||
(tmpi->a2.type&MDF_REG || tmpi->a2.type&MDF_DISP) &&
tmpi->a2.reg==tmpi->a1.reg ||
tmpi->r.type.mode || tmpi1->ic_flags&~ICG_NO_CVT_MASK) {
ICMov(tmpi,
MDF_DISP+tmpi->a1_type_pointed_to,tmpi->a1.reg,tmpi->a1.disp,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
if (tmpi->r.type.mode)
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
} else {
tempi->ic_flags=(tempi->ic_flags|tempi1->ic_flags)&
tmpi->ic_flags=(tmpi->ic_flags|tmpi1->ic_flags)&
~ICF_CODE_FINAL|ICF_DONT_RESTORE;
tempi->a1.disp=tempi1->ic_data;
OptSetNOP1(tempi1); //This better not be last pass!
ICMov(tempi,MDF_DISP+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
tmpi->a1.disp=tmpi1->ic_data;
OptSetNOP1(tmpi1); //This better not be last pass!
ICMov(tmpi,MDF_DISP+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
}
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tempi,MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
if (tempi->r.type.mode)
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
ICMov(tmpi,MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
if (tmpi->r.type.mode)
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
}
}
}
U0 ICBrBitOps(CIntermediateCode *tempi,I64 ip,
U0 ICBrBitOps(CIntermediateCode *tmpi,I64 ip,
I64 op,I64 op_imm,I64 is,U8 *buf,I64 ip2)
{
I64 i,t,r1,r2,d1,d2,t1,t2;
CICArg *a1=&tempi->a1,*a2=&tempi->a2;
CICArg *a1=&tmpi->a1,*a2=&tmpi->a2;
Bool short_jmp;
CCodeMisc *lb;
if (tempi->ic_flags & ICF_BY_VAL) {
if (tempi->ic_flags&ICF_SWAP && !(a2->type&MDF_REG) &&
if (tmpi->ic_flags & ICF_BY_VAL) {
if (tmpi->ic_flags&ICF_SWAP && !(a2->type&MDF_REG) &&
(!(a2->type&MDF_IMM) ||a2->disp>63)||
!(tempi->ic_flags&ICF_SWAP) && a2->type&MDF_IMM &&
!(tmpi->ic_flags&ICF_SWAP) && a2->type&MDF_IMM &&
a2->disp<64 || a2->type&MDF_STK) {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,a2->type,a2->reg,a2->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,a2->type,a2->reg,a2->disp,ip2);
t2=MDF_REG+RT_I64;
r2=REG_RCX;
d2=0;
@@ -228,11 +228,11 @@ U0 ICBrBitOps(CIntermediateCode *tempi,I64 ip,
r2=a2->reg;
d2=a2->disp;
}
if (!(tempi->ic_flags&ICF_SWAP) && !(a1->type&MDF_REG) &&
if (!(tmpi->ic_flags&ICF_SWAP) && !(a1->type&MDF_REG) &&
(!(a1->type&MDF_IMM) || a1->disp>63) ||
tempi->ic_flags&ICF_SWAP && a1->type&MDF_IMM &&
tmpi->ic_flags&ICF_SWAP && a1->type&MDF_IMM &&
a1->disp<64 || a1->type&MDF_STK) {
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,a1->type,a1->reg,a1->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,a1->type,a1->reg,a1->disp,ip2);
t1=MDF_REG+RT_I64;
r1=REG_RDX;
d1=0;
@@ -251,23 +251,23 @@ U0 ICBrBitOps(CIntermediateCode *tempi,I64 ip,
d2=0;
if (a2->type&MDF_REG)
r2=a2->reg;
else if (!(tempi->ic_flags&ICF_SWAP) || !(a2->type&MDF_IMM) ||
else if (!(tmpi->ic_flags&ICF_SWAP) || !(a2->type&MDF_IMM) ||
a2->disp>63) {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,a2->type,a2->reg,a2->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,a2->type,a2->reg,a2->disp,ip2);
r2=REG_RCX;
} else
r2=0;
if (a1->type&MDF_REG)
r1=a1->reg;
else if (tempi->ic_flags&ICF_SWAP || !(a1->type&MDF_IMM) || a1->disp>63) {
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,a1->type,a1->reg,a1->disp,ip2);
else if (tmpi->ic_flags&ICF_SWAP || !(a1->type&MDF_IMM) || a1->disp>63) {
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,a1->type,a1->reg,a1->disp,ip2);
r1=REG_RDX;
} else
r1=0;
}
if (tempi->ic_flags&ICF_LOCK && op!=0xA30F)
ICU8(tempi,OC_LOCK_PREFIX);
if (tempi->ic_flags&ICF_SWAP) {
if (tmpi->ic_flags&ICF_LOCK && op!=0xA30F)
ICU8(tmpi,OC_LOCK_PREFIX);
if (tmpi->ic_flags&ICF_SWAP) {
if (a2->type&MDF_IMM && a2->disp<32) {
if (op==0xA30F && a2->disp<8) {
t=t1&MDG_MASK+RT_U8;
@@ -289,27 +289,27 @@ U0 ICBrBitOps(CIntermediateCode *tempi,I64 ip,
t=t2;
i=ICModr1(r1,t,r2,d2);
}
ICRex(tempi,i.u8[1]);
ICRex(tmpi,i.u8[1]);
if (op_imm==0xF6) {//TEST
ICU16(tempi,i.u8[2]<<8+op_imm);
ICModr2(tempi,i,a2->disp,ip2+5);
ICU8(tempi,1<<a1->disp);
ICU16(tmpi,i.u8[2]<<8+op_imm);
ICModr2(tmpi,i,a2->disp,ip2+5);
ICU8(tmpi,1<<a1->disp);
if (is==0x72820F)
is=0x75850F;
else
is=0x74840F;
} else if (a1->type&MDF_IMM && a1->disp<64) {
ICU24(tempi,i.u8[2]<<16+op_imm);
ICModr2(tempi,i,a2->disp,ip2+5);
ICU8(tempi,a1->disp);
ICU24(tmpi,i.u8[2]<<16+op_imm);
ICModr2(tmpi,i,a2->disp,ip2+5);
ICU8(tmpi,a1->disp);
} else {
ICU24(tempi,i.u8[2]<<16+op);
ICModr2(tempi,i,a2->disp,ip2+4);
ICU24(tmpi,i.u8[2]<<16+op);
ICModr2(tmpi,i,a2->disp,ip2+4);
}
ip+=tempi->ic_cnt;
lb=OptLabelFwd(tempi->ic_data);
short_jmp=ToBool(tempi->ic_flags&ICF_SHORT_JMP);
ip+=tmpi->ic_cnt;
lb=OptLabelFwd(tmpi->ic_data);
short_jmp=ToBool(tmpi->ic_flags&ICF_SHORT_JMP);
if (!buf && lb->addr!=INVALID_PTR) {
i=lb->addr-(ip+2);
if (lb->flags&CMF_POP_CMP)
@@ -319,180 +319,180 @@ U0 ICBrBitOps(CIntermediateCode *tempi,I64 ip,
}
if (short_jmp) {
tempi->ic_flags|=ICF_SHORT_JMP;
tmpi->ic_flags|=ICF_SHORT_JMP;
i=lb->addr-(ip+2);
if (lb->flags&CMF_POP_CMP)
i+=8;
ICU16(tempi,i<<8+is.u8[2]);
ICU16(tmpi,i<<8+is.u8[2]);
} else {
tempi->ic_flags&=~ICF_SHORT_JMP;
tmpi->ic_flags&=~ICF_SHORT_JMP;
i=lb->addr-(ip+6);
if (lb->flags&CMF_POP_CMP)
i+=8;
ICU16(tempi,is.u16[0]);
ICU32(tempi,i);
ICU16(tmpi,is.u16[0]);
ICU32(tmpi,i);
}
}
U0 ICQueInit(CIntermediateCode *tempi,I64 ip2)
U0 ICQueInit(CIntermediateCode *tmpi,I64 ip2)
{
I64 r1;
if (tempi->a1.type==MDF_REG+RT_I64)
r1=tempi->a1.reg;
if (tmpi->a1.type==MDF_REG+RT_I64)
r1=tmpi->a1.reg;
else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
r1=REG_RAX;
}
ICMov(tempi,MDF_DISP+RT_I64,r1,0,MDF_REG+RT_I64,r1,0,ip2);
ICMov(tempi,MDF_DISP+RT_I64,r1,sizeof(U8 *),MDF_REG+RT_I64,r1,0,ip2);
ICMov(tmpi,MDF_DISP+RT_I64,r1,0,MDF_REG+RT_I64,r1,0,ip2);
ICMov(tmpi,MDF_DISP+RT_I64,r1,sizeof(U8 *),MDF_REG+RT_I64,r1,0,ip2);
}
U0 ICQueIns(CIntermediateCode *tempi,I64 ip2)
U0 ICQueIns(CIntermediateCode *tmpi,I64 ip2)
{
I64 r1,r2;
if (tempi->a2.type==MDF_REG+RT_I64 && tempi->a2.reg!=REG_RDX)
r2=tempi->a2.reg;
if (tmpi->a2.type==MDF_REG+RT_I64 && tmpi->a2.reg!=REG_RDX)
r2=tmpi->a2.reg;
else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip2);
r2=REG_RAX;
}
if (tempi->a1.type==MDF_REG+RT_I64)
r1=tempi->a1.reg;
if (tmpi->a1.type==MDF_REG+RT_I64)
r1=tmpi->a1.reg;
else {
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
r1=REG_RDX;
}
ICMov(tempi,MDF_REG+RT_I64,REG_RBX,0,MDF_DISP+RT_I64,r1,0,ip2);
ICMov(tempi,MDF_DISP+RT_I64,r1,0,MDF_REG+RT_I64,r2,0,ip2);
ICMov(tempi,MDF_DISP+RT_I64,r2,0,MDF_REG+RT_I64,REG_RBX,0,ip2);
ICMov(tempi,MDF_DISP+RT_I64,r2,sizeof(U8 *),MDF_REG+RT_I64,r1,0,ip2);
ICMov(tempi,MDF_DISP+RT_I64,REG_RBX,sizeof(U8 *),MDF_REG+RT_I64,r2,0,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RBX,0,MDF_DISP+RT_I64,r1,0,ip2);
ICMov(tmpi,MDF_DISP+RT_I64,r1,0,MDF_REG+RT_I64,r2,0,ip2);
ICMov(tmpi,MDF_DISP+RT_I64,r2,0,MDF_REG+RT_I64,REG_RBX,0,ip2);
ICMov(tmpi,MDF_DISP+RT_I64,r2,sizeof(U8 *),MDF_REG+RT_I64,r1,0,ip2);
ICMov(tmpi,MDF_DISP+RT_I64,REG_RBX,sizeof(U8 *),MDF_REG+RT_I64,r2,0,ip2);
}
U0 ICQueInsRev(CIntermediateCode *tempi,I64 ip2)
U0 ICQueInsRev(CIntermediateCode *tmpi,I64 ip2)
{
I64 r1,r2;
if (tempi->a2.type==MDF_REG+RT_I64 && tempi->a2.reg!=REG_RDX)
r2=tempi->a2.reg;
if (tmpi->a2.type==MDF_REG+RT_I64 && tmpi->a2.reg!=REG_RDX)
r2=tmpi->a2.reg;
else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip2);
r2=REG_RAX;
}
if (tempi->a1.type==MDF_REG+RT_I64)
r1=tempi->a1.reg;
if (tmpi->a1.type==MDF_REG+RT_I64)
r1=tmpi->a1.reg;
else {
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
r1=REG_RDX;
}
ICMov(tempi,MDF_REG+RT_I64,REG_RBX,0,MDF_DISP+RT_I64,r1,sizeof(U8 *),ip2);
ICMov(tempi,MDF_DISP+RT_I64,REG_RBX,0,MDF_REG+RT_I64,r2,0,ip2);
ICMov(tempi,MDF_DISP+RT_I64,r2,0,MDF_REG+RT_I64,r1,0,ip2);
ICMov(tempi,MDF_DISP+RT_I64,r2,sizeof(U8 *),MDF_REG+RT_I64,REG_RBX,0,ip2);
ICMov(tempi,MDF_DISP+RT_I64,r1,sizeof(U8 *),MDF_REG+RT_I64,r2,0,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RBX,0,MDF_DISP+RT_I64,r1,sizeof(U8 *),ip2);
ICMov(tmpi,MDF_DISP+RT_I64,REG_RBX,0,MDF_REG+RT_I64,r2,0,ip2);
ICMov(tmpi,MDF_DISP+RT_I64,r2,0,MDF_REG+RT_I64,r1,0,ip2);
ICMov(tmpi,MDF_DISP+RT_I64,r2,sizeof(U8 *),MDF_REG+RT_I64,REG_RBX,0,ip2);
ICMov(tmpi,MDF_DISP+RT_I64,r1,sizeof(U8 *),MDF_REG+RT_I64,r2,0,ip2);
}
U0 ICQueRem(CIntermediateCode *tempi,I64 ip2)
U0 ICQueRem(CIntermediateCode *tmpi,I64 ip2)
{
I64 r1;
if (tempi->a1.type==MDF_REG+RT_I64)
r1=tempi->a1.reg;
if (tmpi->a1.type==MDF_REG+RT_I64)
r1=tmpi->a1.reg;
else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
r1=REG_RAX;
}
ICMov(tempi,MDF_REG+RT_I64,REG_RBX,0,MDF_DISP+RT_I64,r1,0,ip2);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,MDF_DISP+RT_I64,r1,sizeof(U8 *),ip2);
ICU24(tempi,0x1A8948);
ICU32(tempi,sizeof(U8 *)<<24+0x538948);
ICMov(tmpi,MDF_REG+RT_I64,REG_RBX,0,MDF_DISP+RT_I64,r1,0,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,MDF_DISP+RT_I64,r1,sizeof(U8 *),ip2);
ICU24(tmpi,0x1A8948);
ICU32(tmpi,sizeof(U8 *)<<24+0x538948);
}
U0 ICMinMax(CIntermediateCode *tempi,I64 op,I64 ip2)
U0 ICMinMax(CIntermediateCode *tmpi,I64 op,I64 ip2)
{
I64 r1,i1=0x48;
if (tempi->a2.type==MDF_REG+RT_I64 && tempi->a2.reg!=REG_RAX) {
r1=tempi->a2.reg;
if (tmpi->a2.type==MDF_REG+RT_I64 && tmpi->a2.reg!=REG_RAX) {
r1=tmpi->a2.reg;
if (r1>7) {
i1++;
r1&=7;
}
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
} else {
if (tempi->a1.reg==REG_RAX && tempi->a1.type&MDG_REG_DISP_SIB) {
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip2);
if (tmpi->a1.reg==REG_RAX && tmpi->a1.type&MDG_REG_DISP_SIB) {
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip2);
r1=REG_RDX;
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip2);
if (tempi->a1.type==MDF_REG+RT_I64) {
r1=tempi->a1.reg;
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip2);
if (tmpi->a1.type==MDF_REG+RT_I64) {
r1=tmpi->a1.reg;
if (r1>7) {
i1++;
r1&=7;
}
} else {
r1=REG_RDX;
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
}
}
}
ICU24(tempi,0xC03B00+r1<<16+i1);
ICU32(tempi,0xC0000F00+op<<16+r1<<24+i1);
ICU24(tmpi,0xC03B00+r1<<16+i1);
ICU32(tmpi,0xC0000F00+op<<16+r1<<24+i1);
}
U0 ICSqr(CIntermediateCode *tempi,I64 op,I64 ip2)
U0 ICSqr(CIntermediateCode *tmpi,I64 op,I64 ip2)
{
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
ICSlashOp(tempi,MDF_REG+RT_I64,REG_RAX,0,op,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
ICSlashOp(tmpi,MDF_REG+RT_I64,REG_RAX,0,op,ip2);
}
U0 ICModU64(CIntermediateCode *tempi,I64 ip2)
U0 ICModU64(CIntermediateCode *tmpi,I64 ip2)
{
CICType t1;
I64 r1,d1;
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip2);
if (tempi->a1.reg!=REG_RAX && tempi->a1.reg!=REG_RDX &&
tempi->a1.type&MDG_REG_DISP_SIB &&
tempi->a1.type.raw_type>=RT_I64) {
t1=tempi->a1.type;
r1=tempi->a1.reg;
d1=tempi->a1.disp;
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip2);
if (tmpi->a1.reg!=REG_RAX && tmpi->a1.reg!=REG_RDX &&
tmpi->a1.type&MDG_REG_DISP_SIB &&
tmpi->a1.type.raw_type>=RT_I64) {
t1=tmpi->a1.type;
r1=tmpi->a1.reg;
d1=tmpi->a1.disp;
} else {
t1=MDF_REG+RT_I64;
r1=REG_RBX;
d1=0;
ICMov(tempi,MDF_REG+RT_I64,REG_RBX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RBX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
}
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,MDF_DISP+RT_I64,REG_RCX,0,ip2);
ICZero(tempi,REG_RDX);
ICSlashOp(tempi,t1,r1,d1,SLASH_OP_DIV,ip2);
ICMov(tempi,MDF_DISP+RT_I64,REG_RCX,0,MDF_REG+RT_I64,REG_RAX,0,ip2);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,MDF_DISP+RT_I64,REG_RCX,0,ip2);
ICZero(tmpi,REG_RDX);
ICSlashOp(tmpi,t1,r1,d1,SLASH_OP_DIV,ip2);
ICMov(tmpi,MDF_DISP+RT_I64,REG_RCX,0,MDF_REG+RT_I64,REG_RAX,0,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
MDF_REG+RT_I64,REG_RDX,0,ip2);
}
U0 ICSwap(CIntermediateCode *tempi,I64 ip2)
U0 ICSwap(CIntermediateCode *tmpi,I64 ip2)
{
I64 r1,r2;
if (tempi->a1.type&MDF_REG)
r1=tempi->a1.reg;
if (tmpi->a1.type&MDF_REG)
r1=tmpi->a1.reg;
else
r1=REG_RAX;
if (tempi->a2.type&MDF_REG)
r2=tempi->a2.reg;
if (tmpi->a2.type&MDF_REG)
r2=tmpi->a2.reg;
else
r2=REG_RAX;
if (r1==r2) {
@@ -501,166 +501,166 @@ U0 ICSwap(CIntermediateCode *tempi,I64 ip2)
else
r2=REG_RAX;
}
ICMov(tempi,MDF_REG+RT_I64,r2,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip2);
ICMov(tempi,MDF_REG+RT_I64,r1,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
switch (tempi->ic_code) {
ICMov(tmpi,MDF_REG+RT_I64,r2,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,r1,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
switch (tmpi->ic_code) {
case IC_SWAP_U8:
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,MDF_DISP+RT_U8,r1,0,ip2);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,MDF_DISP+RT_U8,r2,0,ip2);
ICMov(tempi,MDF_DISP+RT_U8,r2,0,MDF_REG+RT_I64,REG_RCX,0,ip2);
ICMov(tempi,MDF_DISP+RT_U8,r1,0,MDF_REG+RT_I64,REG_RDX,0,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,MDF_DISP+RT_U8,r1,0,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,MDF_DISP+RT_U8,r2,0,ip2);
ICMov(tmpi,MDF_DISP+RT_U8,r2,0,MDF_REG+RT_I64,REG_RCX,0,ip2);
ICMov(tmpi,MDF_DISP+RT_U8,r1,0,MDF_REG+RT_I64,REG_RDX,0,ip2);
break;
case IC_SWAP_U16:
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,MDF_DISP+RT_U16,r1,0,ip2);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,MDF_DISP+RT_U16,r2,0,ip2);
ICMov(tempi,MDF_DISP+RT_U16,r2,0,MDF_REG+RT_I64,REG_RCX,0,ip2);
ICMov(tempi,MDF_DISP+RT_U16,r1,0,MDF_REG+RT_I64,REG_RDX,0,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,MDF_DISP+RT_U16,r1,0,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,MDF_DISP+RT_U16,r2,0,ip2);
ICMov(tmpi,MDF_DISP+RT_U16,r2,0,MDF_REG+RT_I64,REG_RCX,0,ip2);
ICMov(tmpi,MDF_DISP+RT_U16,r1,0,MDF_REG+RT_I64,REG_RDX,0,ip2);
break;
case IC_SWAP_U32:
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,MDF_DISP+RT_U32,r1,0,ip2);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,MDF_DISP+RT_U32,r2,0,ip2);
ICMov(tempi,MDF_DISP+RT_U32,r2,0,MDF_REG+RT_I64,REG_RCX,0,ip2);
ICMov(tempi,MDF_DISP+RT_U32,r1,0,MDF_REG+RT_I64,REG_RDX,0,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,MDF_DISP+RT_U32,r1,0,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,MDF_DISP+RT_U32,r2,0,ip2);
ICMov(tmpi,MDF_DISP+RT_U32,r2,0,MDF_REG+RT_I64,REG_RCX,0,ip2);
ICMov(tmpi,MDF_DISP+RT_U32,r1,0,MDF_REG+RT_I64,REG_RDX,0,ip2);
break;
case IC_SWAP_I64:
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,MDF_DISP+RT_U64,r1,0,ip2);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,MDF_DISP+RT_U64,r2,0,ip2);
ICMov(tempi,MDF_DISP+RT_U64,r2,0,MDF_REG+RT_I64,REG_RCX,0,ip2);
ICMov(tempi,MDF_DISP+RT_U64,r1,0,MDF_REG+RT_I64,REG_RDX,0,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,MDF_DISP+RT_U64,r1,0,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,MDF_DISP+RT_U64,r2,0,ip2);
ICMov(tmpi,MDF_DISP+RT_U64,r2,0,MDF_REG+RT_I64,REG_RCX,0,ip2);
ICMov(tmpi,MDF_DISP+RT_U64,r1,0,MDF_REG+RT_I64,REG_RDX,0,ip2);
break;
}
}
U0 ICAndEqu(CIntermediateCode *tempi,I64 ip2)
U0 ICAndEqu(CIntermediateCode *tmpi,I64 ip2)
{
I64 i,bit;
if (tempi->a2.type&MDF_IMM && !(tempi->a1.type&MDF_STK) &&
tempi->ic_flags&ICF_RES_NOT_USED) {
i=~tempi->a2.disp;
if (tmpi->a2.type&MDF_IMM && !(tmpi->a1.type&MDF_STK) &&
tmpi->ic_flags&ICF_RES_NOT_USED) {
i=~tmpi->a2.disp;
bit=Bsf(i);
if (0<=bit==Bsr(i)) {
tempi->a2.disp=bit;
tempi->a2.reg=0;
tempi->a1.type=tempi->a1.type&MDG_MASK+RT_I64;
ICBitOps(tempi,&tempi->a2,&tempi->a1,tempi,0xB30F,0x30BA0F,ip2);
tmpi->a2.disp=bit;
tmpi->a2.reg=0;
tmpi->a1.type=tmpi->a1.type&MDG_MASK+RT_I64;
ICBitOps(tmpi,&tmpi->a2,&tmpi->a1,tmpi,0xB30F,0x30BA0F,ip2);
return;
}
}
ICAddSubEctEqu(tempi,tempi->a1_type_pointed_to,
tempi->r.type,tempi->r.reg,tempi->r.disp,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,0x210425240423,ip2);
ICAddSubEctEqu(tmpi,tmpi->a1_type_pointed_to,
tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,0x210425240423,ip2);
}
U0 ICOrEqu(CIntermediateCode *tempi,I64 ip2)
U0 ICOrEqu(CIntermediateCode *tmpi,I64 ip2)
{
I64 i,bit;
if (tempi->a2.type&MDF_IMM && !(tempi->a1.type&MDF_STK) &&
tempi->ic_flags&ICF_RES_NOT_USED) {
i=tempi->a2.disp;
if (tmpi->a2.type&MDF_IMM && !(tmpi->a1.type&MDF_STK) &&
tmpi->ic_flags&ICF_RES_NOT_USED) {
i=tmpi->a2.disp;
bit=Bsf(i);
if (0<=bit==Bsr(i) && i>MAX_I8) {
tempi->a2.disp=bit;
tempi->a2.reg=0;
tempi->a1.type=tempi->a1.type&MDG_MASK+RT_I64;
ICBitOps(tempi,&tempi->a2,&tempi->a1,tempi,0xAB0F,0x28BA0F,ip2);
tmpi->a2.disp=bit;
tmpi->a2.reg=0;
tmpi->a1.type=tmpi->a1.type&MDG_MASK+RT_I64;
ICBitOps(tmpi,&tmpi->a2,&tmpi->a1,tmpi,0xAB0F,0x28BA0F,ip2);
return;
}
}
ICAddSubEctEqu(tempi,tempi->a1_type_pointed_to,
tempi->r.type,tempi->r.reg,tempi->r.disp,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,0x09010D0C010B,ip2);
ICAddSubEctEqu(tmpi,tmpi->a1_type_pointed_to,
tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,0x09010D0C010B,ip2);
}
U0 ICXorEqu(CIntermediateCode *tempi,I64 ip2)
U0 ICXorEqu(CIntermediateCode *tmpi,I64 ip2)
{
I64 i,bit;
if (tempi->a2.type&MDF_IMM && !(tempi->a1.type&MDF_STK) &&
tempi->ic_flags&ICF_RES_NOT_USED) {
i=tempi->a2.disp;
if (tmpi->a2.type&MDF_IMM && !(tmpi->a1.type&MDF_STK) &&
tmpi->ic_flags&ICF_RES_NOT_USED) {
i=tmpi->a2.disp;
bit=Bsf(i);
if (0<=bit==Bsr(i)) {
tempi->a2.disp=bit;
tempi->a2.reg=0;
tempi->a1.type=tempi->a1.type&MDG_MASK+RT_I64;
ICBitOps(tempi,&tempi->a2,&tempi->a1,tempi,0xBB0F,0x38BA0F,ip2);
tmpi->a2.disp=bit;
tmpi->a2.reg=0;
tmpi->a1.type=tmpi->a1.type&MDG_MASK+RT_I64;
ICBitOps(tmpi,&tmpi->a2,&tmpi->a1,tmpi,0xBB0F,0x38BA0F,ip2);
return;
}
}
ICAddSubEctEqu(tempi,tempi->a1_type_pointed_to,
tempi->r.type,tempi->r.reg,tempi->r.disp,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,0x310635340633,ip2);
ICAddSubEctEqu(tmpi,tmpi->a1_type_pointed_to,
tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,0x310635340633,ip2);
}
U0 ICSwitch(CIntermediateCode *tempi,I64 ip,
U0 ICSwitch(CIntermediateCode *tmpi,I64 ip,
Bool nobound,CCmpCtrl *cc,U8 *buf,I64 ip2)
{
I64 i,j,cnt,min,max,begin,r;
CCodeMisc *lb;
Bool short_jmp;
CAOTAbsAddr *tempa;
if (!(tempi->a1.type&MDF_REG) || tempi->a1.reg&7==REG_RSP)
CAOTAbsAddr *tmpa;
if (!(tmpi->a1.type&MDF_REG) || tmpi->a1.reg&7==REG_RSP)
r=REG_RDX;
else
r=tempi->a1.reg;
r=tmpi->a1.reg;
if (nobound)
ICMov(tempi,MDF_REG+RT_I64,r,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,r,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
else {
if (tempi->a2.type&MDF_IMM) {
j=tempi->a2.disp;
ICMov(tempi,MDF_REG+RT_I64,r,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
if (tmpi->a2.type&MDF_IMM) {
j=tmpi->a2.disp;
ICMov(tmpi,MDF_REG+RT_I64,r,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
if (MIN_I8<=j<=MAX_I8) {
i=0xF88348+(r&7)<<16;
if (r>7) i++;
ICU24(tempi,i);
ICU8(tempi,j);
ICU24(tmpi,i);
ICU8(tmpi,j);
} else if (MIN_I32<=j<=MAX_I32) {
i=0xF88148+(r&7)<<16;
if (r>7) i++;
ICU24(tempi,i);
ICU32(tempi,j);
ICU24(tmpi,i);
ICU32(tmpi,j);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip2);
i=0xC13B48+(r&7)<<19;
if (r>7) i+=4;
ICU24(tempi,i);
ICU24(tmpi,i);
}
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip2);
ICMov(tempi,MDF_REG+RT_I64,r,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,r,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip2);
i=0xC13B48+(r&7)<<19;
if (r>7) i+=4;
ICU24(tempi,i);
ICU24(tmpi,i);
}
ip+=tempi->ic_cnt;
lb=tempi->ic_data(CCodeMisc *)->dft;
short_jmp=ToBool(tempi->ic_flags&ICF_SHORT_JMP);
ip+=tmpi->ic_cnt;
lb=tmpi->ic_data(CCodeMisc *)->dft;
short_jmp=ToBool(tmpi->ic_flags&ICF_SHORT_JMP);
if (!buf && lb->addr!=INVALID_PTR) {
i=lb->addr-(ip+2);
if (MIN_I8<=i<=MAX_I8)
short_jmp=TRUE;
}
if (short_jmp) {
tempi->ic_flags|=ICF_SHORT_JMP;
ICU16(tempi,(lb->addr-(ip+2))<<8+0x73);
tmpi->ic_flags|=ICF_SHORT_JMP;
ICU16(tmpi,(lb->addr-(ip+2))<<8+0x73);
} else {
tempi->ic_flags&=~ICF_SHORT_JMP;
ICU16(tempi,0x830F);
ICU32(tempi,lb->addr-(ip+6));
tmpi->ic_flags&=~ICF_SHORT_JMP;
ICU16(tmpi,0x830F);
ICU32(tmpi,lb->addr-(ip+6));
}
}
lb=tempi->ic_data;
lb=tmpi->ic_data;
begin=lb->begin->addr;
if (!buf && begin!=INVALID_PTR) {
min=MAX_I64;
@@ -688,81 +688,81 @@ U0 ICSwitch(CIntermediateCode *tempi,I64 ip,
if (lb->flags&CMF_I8_JMP_TABLE) {
if (r<8)
ICU8(tempi,0x48);
ICU8(tmpi,0x48);
else
ICU8(tempi,0x49);
ICU24(tempi,0x98BE0F+(r&7)<<16);
ICU8(tmpi,0x49);
ICU24(tmpi,0x98BE0F+(r&7)<<16);
cnt=1;
} else if (lb->flags&CMF_U8_JMP_TABLE) {
if (r<8)
cnt=2;
else {
ICU8(tempi,0x49);
ICU8(tmpi,0x49);
cnt=1;
}
ICU24(tempi,0x98B60F+(r&7)<<16);
ICU24(tmpi,0x98B60F+(r&7)<<16);
} else if (lb->flags&CMF_I16_JMP_TABLE) {
if (r<8)
ICU8(tempi,0x48);
ICU8(tmpi,0x48);
else
ICU8(tempi,0x4A);
ICU32(tempi,0x451CBF0F+(r&7)<<27);
ICU8(tmpi,0x4A);
ICU32(tmpi,0x451CBF0F+(r&7)<<27);
cnt=0;
} else if (lb->flags&CMF_U16_JMP_TABLE) {
if (r<8)
cnt=1;
else {
ICU8(tempi,0x4A);
ICU8(tmpi,0x4A);
cnt=0;
}
ICU32(tempi,0x451CB70F+(r&7)<<27);
ICU32(tmpi,0x451CB70F+(r&7)<<27);
} else {
if (r<8)
cnt=2;
else {
ICU8(tempi,0x42);
ICU8(tmpi,0x42);
cnt=1;
}
ICU24(tempi,0x851C8B+(r&7)<<19);
ICU24(tmpi,0x851C8B+(r&7)<<19);
}
if (buf && cc->flags&CCF_AOT_COMPILE) {
tempa=CAlloc(sizeof(CAOTAbsAddr));
tempa->next=cc->aotc->abss;
tempa->type=AAT_ADD_U32;
cc->aotc->abss=tempa;
tempa->ip=ip2+tempi->ic_cnt;
ICU32(tempi,lb->addr+cc->aotc->ip);
tmpa=CAlloc(sizeof(CAOTAbsAddr));
tmpa->next=cc->aotc->abss;
tmpa->type=AAT_ADD_U32;
cc->aotc->abss=tmpa;
tmpa->ip=ip2+tmpi->ic_cnt;
ICU32(tmpi,lb->addr+cc->aotc->ip);
} else
ICU32(tempi,lb->addr+buf);
ICU32(tmpi,lb->addr+buf);
if (lb->flags&(CMF_I8_JMP_TABLE|CMF_U8_JMP_TABLE|
CMF_I16_JMP_TABLE|CMF_U16_JMP_TABLE)) {
ICU16(tempi,0xC381); //ADD EBX,0x12345678
ICU16(tmpi,0xC381); //ADD EBX,0x12345678
if (buf && cc->flags&CCF_AOT_COMPILE) {
tempa=CAlloc(sizeof(CAOTAbsAddr));
tempa->next=cc->aotc->abss;
tempa->type=AAT_ADD_U32;
cc->aotc->abss=tempa;
tempa->ip=ip2+tempi->ic_cnt;
ICU32(tempi,begin+cc->aotc->ip);
tmpa=CAlloc(sizeof(CAOTAbsAddr));
tmpa->next=cc->aotc->abss;
tmpa->type=AAT_ADD_U32;
cc->aotc->abss=tmpa;
tmpa->ip=ip2+tmpi->ic_cnt;
ICU32(tmpi,begin+cc->aotc->ip);
} else
ICU32(tempi,begin+buf);
ICU32(tmpi,begin+buf);
} else
cnt+=6;
ICU16(tempi,0xE3FF); //JMP EBX
ICU16(tmpi,0xE3FF); //JMP EBX
for (i=0;i<cnt;i++) //Code must always shrink, not expand
ICU8(tempi,OC_NOP);
tempi->ic_flags&=~ICF_CODE_FINAL;
ICU8(tmpi,OC_NOP);
tmpi->ic_flags&=~ICF_CODE_FINAL;
}
U0 ICLocalVarInit(CIntermediateCode *tempi)
U0 ICLocalVarInit(CIntermediateCode *tmpi)
{
ICU24(tempi,0xC48B48);
ICU16(tempi,0x5748);
ICU24(tempi,0xF88B48);
ICU24(tempi,0xC1C748);
ICU32(tempi,tempi->ic_data);
ICU16(tempi,sys_var_init_val<<8+0xB0);
ICU16(tempi,0xAAF3);
ICU16(tempi,0x5F48);
ICU24(tmpi,0xC48B48);
ICU16(tmpi,0x5748);
ICU24(tmpi,0xF88B48);
ICU24(tmpi,0xC1C748);
ICU32(tmpi,tmpi->ic_data);
ICU16(tmpi,sys_var_init_val<<8+0xB0);
ICU16(tmpi,0xAAF3);
ICU16(tmpi,0x5F48);
}
+202 -202
View File
@@ -3,7 +3,7 @@
#define CN_MAIN 2
#define CN_R 3
U0 CmpNoteFloatOp(CCmpCtrl *cc,CIntermediateCode *tempi,
U0 CmpNoteFloatOp(CCmpCtrl *cc,CIntermediateCode *tmpi,
Bool dont_pushable,Bool dont_popable,I64 pos)
{
Bool link=FALSE;
@@ -11,34 +11,34 @@ U0 CmpNoteFloatOp(CCmpCtrl *cc,CIntermediateCode *tempi,
cc->last_dont_popable && dont_pushable) {
switch [pos] {
case CN_A2:
if (cc->last_float_op_ic!=tempi && cc->dont_push_float)
if (cc->last_float_op_ic!=tmpi && cc->dont_push_float)
link=TRUE;
break;
case CN_A1:
if (cc->last_float_op_ic!=tempi && cc->dont_push_float)
if (cc->last_float_op_ic!=tmpi && cc->dont_push_float)
link=TRUE;
break;
case CN_MAIN:
if (cc->last_float_op_ic!=tempi) {
if (cc->last_float_op_ic!=tmpi) {
if (cc->dont_push_float) {
if (intermediate_code_table[tempi->ic_code].arg_cnt==IS_2_ARG &&
if (intermediate_code_table[tmpi->ic_code].arg_cnt==IS_2_ARG &&
cc->last_float_op_ic->r.reg!=REG_R8)
tempi->ic_flags|=ICF_ALT_TEMPLATE;
tmpi->ic_flags|=ICF_ALT_TEMPLATE;
else
tempi->ic_flags&=~ICF_ALT_TEMPLATE;
tmpi->ic_flags&=~ICF_ALT_TEMPLATE;
link=TRUE;
}
} else {
if (intermediate_code_table[tempi->ic_code].arg_cnt==IS_2_ARG &&
if (intermediate_code_table[tmpi->ic_code].arg_cnt==IS_2_ARG &&
cc->last_float_op_pos!=CN_A1)
tempi->ic_flags|=ICF_ALT_TEMPLATE;
tmpi->ic_flags|=ICF_ALT_TEMPLATE;
else
tempi->ic_flags&=~ICF_ALT_TEMPLATE;
tmpi->ic_flags&=~ICF_ALT_TEMPLATE;
link=TRUE;
}
break;
case CN_R:
if (cc->last_float_op_ic==tempi && cc->last_float_op_pos==CN_MAIN)
if (cc->last_float_op_ic==tmpi && cc->last_float_op_pos==CN_MAIN)
link=TRUE;
break;
}
@@ -46,11 +46,11 @@ U0 CmpNoteFloatOp(CCmpCtrl *cc,CIntermediateCode *tempi,
if (!Bts(&cc->last_float_op_ic->ic_flags,
ICf_DONT_POP_FLOAT0+cc->last_ic_float_op_num))
cc->last_float_op_ic->ic_flags&=~ICF_CODE_FINAL;
if (!Bts(&tempi->ic_flags,ICf_DONT_PUSH_FLOAT0+cc->cur_ic_float_op_num))
tempi->ic_flags&=~ICF_CODE_FINAL;
if (!Bts(&tmpi->ic_flags,ICf_DONT_PUSH_FLOAT0+cc->cur_ic_float_op_num))
tmpi->ic_flags&=~ICF_CODE_FINAL;
}
}
cc->last_float_op_ic=tempi;
cc->last_float_op_ic=tmpi;
cc->last_dont_pushable=dont_pushable;
cc->last_dont_popable=dont_popable;
cc->last_ic_float_op_num=cc->cur_ic_float_op_num++;
@@ -59,33 +59,33 @@ U0 CmpNoteFloatOp(CCmpCtrl *cc,CIntermediateCode *tempi,
throw('Compiler');
}
U0 CmpSetFloatOpPushPop(CCmpCtrl *cc,CIntermediateCode *tempi,
U0 CmpSetFloatOpPushPop(CCmpCtrl *cc,CIntermediateCode *tmpi,
Bool *dont_push_float,Bool *dont_pop_float)
{
if (cc->pass==7) {
*dont_push_float=FALSE;
*dont_pop_float =FALSE;
tempi->ic_flags&=~ICF_CODE_FINAL;
tmpi->ic_flags&=~ICF_CODE_FINAL;
} else {
*dont_push_float=Bt(&tempi->ic_flags,
*dont_push_float=Bt(&tmpi->ic_flags,
ICf_DONT_PUSH_FLOAT0+cc->cur_ic_float_op_num);
*dont_pop_float=Bt(&tempi->ic_flags,
*dont_pop_float=Bt(&tmpi->ic_flags,
ICf_DONT_POP_FLOAT0+cc->cur_ic_float_op_num);
}
}
U0 ICCopyTemplate(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,
U0 ICCopyTemplate(CCmpCtrl *cc,CIntermediateCode *tmpi,I64 op,
Bool off_the_record,Bool dont_pushable,Bool dont_popable,I64 pos)
{
Bool dont_push_float,dont_pop_float,alt;
U8 *ptr;
I64 i=0;
if (!off_the_record) {
if (tempi->ic_flags&ICF_ALT_TEMPLATE)
if (tmpi->ic_flags&ICF_ALT_TEMPLATE)
alt=TRUE;
else
alt=FALSE;
CmpSetFloatOpPushPop(cc,tempi,&dont_push_float,&dont_pop_float);
CmpSetFloatOpPushPop(cc,tmpi,&dont_push_float,&dont_pop_float);
} else {
dont_push_float=FALSE;
dont_pop_float=FALSE;
@@ -114,13 +114,13 @@ U0 ICCopyTemplate(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,
}
}
}
MemCpy(&tempi->ic_body[tempi->ic_cnt],ptr,i);
MemCpy(&tmpi->ic_body[tmpi->ic_cnt],ptr,i);
if (!off_the_record)
CmpNoteFloatOp(cc,tempi,dont_pushable,dont_popable,pos);
tempi->ic_cnt+=i;
CmpNoteFloatOp(cc,tmpi,dont_pushable,dont_popable,pos);
tmpi->ic_cnt+=i;
}
U0 ICFCvt(CCmpCtrl *cc,CIntermediateCode *tempi,I64 r1,
U0 ICFCvt(CCmpCtrl *cc,CIntermediateCode *tmpi,I64 r1,
CICType t2,I64 r2,I64 d2,Bool to_int,I64 pos,I64 ip)
{
I64 rsp_size=0,op1,op2;
@@ -134,39 +134,39 @@ U0 ICFCvt(CCmpCtrl *cc,CIntermediateCode *tempi,I64 r1,
op2=SLASH_OP_FSTP;
}
CmpSetFloatOpPushPop(cc,tempi,&dont_push_float,&dont_pop_float);
CmpSetFloatOpPushPop(cc,tmpi,&dont_push_float,&dont_pop_float);
if (!dont_push_float) {
if (!(t2.raw_type>=RT_I64 && t2&MDG_DISP_SIB_RIP)) {
ICPush(tempi,t2,r2,d2,ip);
ICPush(tmpi,t2,r2,d2,ip);
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
rsp_size=8;
} else {
if (!dont_pop_float) {
rsp_size=8;
ICAddRSP(tempi,-8);
ICAddRSP(tmpi,-8);
}
}
ICSlashOp(tempi,t2,r2,d2,op1,ip);
ICSlashOp(tmpi,t2,r2,d2,op1,ip);
} else {
if (!dont_pop_float) {
rsp_size=8;
ICAddRSP(tempi,-8);
ICAddRSP(tmpi,-8);
}
}
if (to_int)
CmpNoteFloatOp(cc,tempi,TRUE,FALSE,pos);
CmpNoteFloatOp(cc,tmpi,TRUE,FALSE,pos);
else
CmpNoteFloatOp(cc,tempi,FALSE,TRUE,pos);
CmpNoteFloatOp(cc,tmpi,FALSE,TRUE,pos);
if (dont_pop_float) {
if (rsp_size)
ICAddRSP(tempi,rsp_size);
ICAddRSP(tmpi,rsp_size);
} else {
ICSlashOp(tempi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,0,op2,ip);
ICPop(tempi,MDF_REG+RT_I64,r1,0,ip);
ICSlashOp(tmpi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,0,op2,ip);
ICPop(tmpi,MDF_REG+RT_I64,r1,0,ip);
}
}
U0 ICFCvt2(CCmpCtrl *cc,CIntermediateCode *tempi,I64 r1,
U0 ICFCvt2(CCmpCtrl *cc,CIntermediateCode *tmpi,I64 r1,
CICType t2,I64 r2,I64 d2,Bool to_int,I64 ip)
{
I64 rsp_size=0,op1,op2;
@@ -178,29 +178,29 @@ U0 ICFCvt2(CCmpCtrl *cc,CIntermediateCode *tempi,I64 r1,
op2=SLASH_OP_FSTP;
}
if (!(t2.raw_type>=RT_I64 && t2&MDG_DISP_SIB_RIP)) {
ICPush(tempi,t2,r2,d2,ip);
ICPush(tmpi,t2,r2,d2,ip);
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
rsp_size=8;
} else {
rsp_size=8;
ICAddRSP(tempi,-8);
ICAddRSP(tmpi,-8);
}
ICSlashOp(tempi,t2,r2,d2,op1,ip);
ICSlashOp(tempi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,0,op2,ip);
ICPop(tempi,MDF_REG+RT_I64,r1,0,ip);
ICSlashOp(tmpi,t2,r2,d2,op1,ip);
ICSlashOp(tmpi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,0,op2,ip);
ICPop(tmpi,MDF_REG+RT_I64,r1,0,ip);
cc->last_dont_pushable=cc->last_dont_popable=FALSE; //TODO: improve this
}
U0 ICFUnaryMinus(CCmpCtrl *cc,CIntermediateCode *tempi,U8 *buf2,I64 ip)
U0 ICFUnaryMinus(CCmpCtrl *cc,CIntermediateCode *tmpi,U8 *buf2,I64 ip)
{
CICArg *a1=&tempi->a1;
CICArg *a1=&tmpi->a1;
I64 rsp_size=0,builtin1=0,t1,r1,d1;
Bool dont_push_float,dont_pop_float;
if (cc->flags&CCF_AOT_COMPILE)
buf2=cc->aotc->ip;
CmpSetFloatOpPushPop(cc,tempi,&dont_push_float,&dont_pop_float);
CmpSetFloatOpPushPop(cc,tmpi,&dont_push_float,&dont_pop_float);
if (!dont_push_float) {
if (a1->type.raw_type>=RT_I64 && a1->type&MDG_DISP_SIB_RIP) {
t1=a1->type;
@@ -214,148 +214,148 @@ U0 ICFUnaryMinus(CCmpCtrl *cc,CIntermediateCode *tempi,U8 *buf2,I64 ip)
d1=COCFloatConstFind(cc,a1->disp(F64))+buf2;
}
} else {
ICPush(tempi,a1->type,a1->reg,a1->disp,ip);
ICPush(tmpi,a1->type,a1->reg,a1->disp,ip);
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=0;
rsp_size+=8;
}
}
if (builtin1)
ICU16(tempi,builtin1);
ICU16(tmpi,builtin1);
else
ICSlashOp(tempi,t1,r1,d1,SLASH_OP_FLD,ip);
ICSlashOp(tmpi,t1,r1,d1,SLASH_OP_FLD,ip);
}
if (!dont_pop_float && !rsp_size) {
rsp_size=8;
ICAddRSP(tempi,-8);
ICAddRSP(tmpi,-8);
}
ICU16(tempi,0xE0D9); //FCHS
CmpNoteFloatOp(cc,tempi,TRUE,TRUE,CN_MAIN);
ICU16(tmpi,0xE0D9); //FCHS
CmpNoteFloatOp(cc,tmpi,TRUE,TRUE,CN_MAIN);
if (dont_pop_float) {
if (rsp_size)
ICAddRSP(tempi,rsp_size);
ICAddRSP(tmpi,rsp_size);
} else {
ICSlashOp(tempi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,0,SLASH_OP_FSTP,ip);
ICPop(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,ip);
ICSlashOp(tmpi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,0,SLASH_OP_FSTP,ip);
ICPop(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,ip);
}
}
U0 ICFMod(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip)
U0 ICFMod(CCmpCtrl *cc,CIntermediateCode *tmpi,I64 ip)
{//for MOD
Bool dont_push_float,dont_pop_float;
CmpSetFloatOpPushPop(cc,tempi,&dont_push_float,&dont_pop_float);
CmpSetFloatOpPushPop(cc,tmpi,&dont_push_float,&dont_pop_float);
if (dont_push_float) {
if (tempi->ic_flags&ICF_ALT_TEMPLATE)
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
if (tmpi->ic_flags&ICF_ALT_TEMPLATE)
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
else
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
}
//TODO: unpushable,unpop? Not sure
ICCopyTemplate(cc,tempi,CMP_TEMPLATE_MOD,FALSE,FALSE,FALSE,CN_MAIN);
ICCopyTemplate(cc,tmpi,CMP_TEMPLATE_MOD,FALSE,FALSE,FALSE,CN_MAIN);
if (!dont_pop_float)
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
}
U0 ICFPow(CCmpCtrl *cc,CIntermediateCode *tempi,U8 *buf,I64 ip)
U0 ICFPow(CCmpCtrl *cc,CIntermediateCode *tmpi,U8 *buf,I64 ip)
{//for POW
I64 i;
CAOTImportExport *tempie;
CHashExport *tempex=HashFind("SYS_POW",
CAOTImportExport *tmpie;
CHashExport *tmpex=HashFind("SYS_POW",
cc->htc.hash_table_lst,HTT_EXPORT_SYS_SYM);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
if (cc->flags&CCF_AOT_COMPILE) {
if (!tempex) {
tempex=CAlloc(sizeof(CHashExport));
tempex->str=StrNew("SYS_POW");
tempex->type=HTT_EXPORT_SYS_SYM|HTF_UNRESOLVED|HTF_IMPORT;
HashAdd(tempex,cc->htc.glbl_hash_table);
if (!tmpex) {
tmpex=CAlloc(sizeof(CHashExport));
tmpex->str=StrNew("SYS_POW");
tmpex->type=HTT_EXPORT_SYS_SYM|HTF_UNRESOLVED|HTF_IMPORT;
HashAdd(tmpex,cc->htc.glbl_hash_table);
}
if (tempex->type&HTF_IMPORT) {
if (tmpex->type&HTF_IMPORT) {
if (GetOption(OPTf_USE_IMM64)) {
ICU16(tempi,0xBB48);
ICU64(tempi,0);
ICU16(tmpi,0xBB48);
ICU64(tmpi,0);
if (buf) {
tempie=CAlloc(sizeof(CAOTImportExport));
tempie->type=IET_IMM_I64;
tempie->ip=ip+tempi->ic_cnt-8;
tempie->next=tempex->ie_lst;
tempex->ie_lst=tempie;
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->type=IET_IMM_I64;
tmpie->ip=ip+tmpi->ic_cnt-8;
tmpie->next=tmpex->ie_lst;
tmpex->ie_lst=tmpie;
}
ICU16(tempi,0xD3FF);
ICU16(tmpi,0xD3FF);
} else {
ICU8(tempi,0xE8);
ICU32(tempi,-(ip+tempi->ic_cnt+4));
ICU8(tmpi,0xE8);
ICU32(tmpi,-(ip+tmpi->ic_cnt+4));
if (buf) {
tempie=CAlloc(sizeof(CAOTImportExport));
tempie->type=IET_REL_I32;
tempie->ip=ip+tempi->ic_cnt-4;
tempie->next=tempex->ie_lst;
tempex->ie_lst=tempie;
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->type=IET_REL_I32;
tmpie->ip=ip+tmpi->ic_cnt-4;
tmpie->next=tmpex->ie_lst;
tmpex->ie_lst=tmpie;
}
}
} else {//Kernel
if (tempex->type&HTF_UNRESOLVED)
if (tmpex->type&HTF_UNRESOLVED)
throw('Compiler');
else {
i=tempex->val-(ip+tempi->ic_cnt+5);
i=tmpex->val-(ip+tmpi->ic_cnt+5);
if (!(MIN_I32<=i<=MAX_I32)) {
throw('Compiler');
// ICU16(tempi,0xBB48);
// ICU64(tempi,tempex->val);
// ICU16(tempi,0xD3FF);
// ICU16(tmpi,0xBB48);
// ICU64(tmpi,tmpex->val);
// ICU16(tmpi,0xD3FF);
} else {
ICU8(tempi,0xE8);
ICU32(tempi,i);
ICU8(tmpi,0xE8);
ICU32(tmpi,i);
}
}
}
} else {
i=tempex->val-(ip+tempi->ic_cnt+5);
i=tmpex->val-(ip+tmpi->ic_cnt+5);
if (!(MIN_I32<=i<=MAX_I32)) {
ICU16(tempi,0xBB48);
ICU64(tempi,tempex->val);
ICU16(tempi,0xD3FF);
ICU16(tmpi,0xBB48);
ICU64(tmpi,tmpex->val);
ICU16(tmpi,0xD3FF);
} else {
ICU8(tempi,0xE8);
ICU32(tempi,i);
ICU8(tmpi,0xE8);
ICU32(tmpi,i);
}
}
tempi->ic_flags&=~ICF_CODE_FINAL;
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
tmpi->ic_flags&=~ICF_CODE_FINAL;
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
}
U0 ICFOp(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
U0 ICFOp(CCmpCtrl *cc,CIntermediateCode *tmpi,I64 op,U8 *buf2,I64 ip)
{//for ADD,SUB,DIV,MUL
CICArg *a1,*a2;
Bool dont_push_float,dont_pop_float,alt;
I64 rsp_size=0,builtin1=0,builtin2=0,t1,r1,d1,t2,r2,d2;
if (tempi->ic_flags&ICF_ALT_TEMPLATE) {
a1=&tempi->a2;
a2=&tempi->a1;
if (tmpi->ic_flags&ICF_ALT_TEMPLATE) {
a1=&tmpi->a2;
a2=&tmpi->a1;
alt=TRUE;
} else {
a1=&tempi->a1;
a2=&tempi->a2;
a1=&tmpi->a1;
a2=&tmpi->a2;
alt=FALSE;
}
if (cc->flags&CCF_AOT_COMPILE)
buf2=cc->aotc->ip;
CmpSetFloatOpPushPop(cc,tempi,&dont_push_float,&dont_pop_float);
CmpSetFloatOpPushPop(cc,tmpi,&dont_push_float,&dont_pop_float);
if (dont_push_float) {
if (a2->type.raw_type>=RT_I64 && a2->type&MDG_DISP_SIB_RIP) {
t2=a2->type;
@@ -369,7 +369,7 @@ U0 ICFOp(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
d2=COCFloatConstFind(cc,a2->disp(F64))+buf2;
}
} else {
ICPush(tempi,a2->type,a2->reg,a2->disp,ip);
ICPush(tmpi,a2->type,a2->reg,a2->disp,ip);
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
rsp_size+=8;
}
@@ -389,7 +389,7 @@ U0 ICFOp(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
d1=COCFloatConstFind(cc,a1->disp(F64))+buf2;
}
} else {
ICPush(tempi,a1->type,a1->reg,a1->disp,ip);
ICPush(tmpi,a1->type,a1->reg,a1->disp,ip);
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=0;
rsp_size+=8;
}
@@ -406,7 +406,7 @@ U0 ICFOp(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
d2=COCFloatConstFind(cc,a2->disp(F64))+buf2;
}
} else {
ICPush(tempi,a2->type,a2->reg,a2->disp,ip);
ICPush(tmpi,a2->type,a2->reg,a2->disp,ip);
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
rsp_size+=8;
if (r1==REG_RSP+REG_RSP<<8)
@@ -414,9 +414,9 @@ U0 ICFOp(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
}
}
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,a1->type,a1->reg,a1->disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip);
ICU16(tempi,0x5052); //PUSH EDX PUSH EAX
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,a1->type,a1->reg,a1->disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip);
ICU16(tmpi,0x5052); //PUSH EDX PUSH EAX
rsp_size=16;
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=8;
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
@@ -435,7 +435,7 @@ U0 ICFOp(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
d2=COCFloatConstFind(cc,a2->disp(F64))+buf2;
}
} else {
ICPush(tempi,a2->type,a2->reg,a2->disp,ip);
ICPush(tmpi,a2->type,a2->reg,a2->disp,ip);
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
rsp_size+=8;
}
@@ -452,7 +452,7 @@ U0 ICFOp(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
d1=COCFloatConstFind(cc,a1->disp(F64))+buf2;
}
} else {
ICPush(tempi,a1->type,a1->reg,a1->disp,ip);
ICPush(tmpi,a1->type,a1->reg,a1->disp,ip);
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=0;
rsp_size+=8;
if (r2==REG_RSP+REG_RSP<<8)
@@ -460,9 +460,9 @@ U0 ICFOp(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
}
}
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,a1->type,a1->reg,a1->disp,ip);
ICU16(tempi,0x5052); //PUSH EDX PUSH EAX
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,a1->type,a1->reg,a1->disp,ip);
ICU16(tmpi,0x5052); //PUSH EDX PUSH EAX
rsp_size=16;
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=8;
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
@@ -471,7 +471,7 @@ U0 ICFOp(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
}
if (!dont_pop_float && !rsp_size) {
rsp_size=8;
ICAddRSP(tempi,-8);
ICAddRSP(tmpi,-8);
}
if (!dont_push_float) {
if (builtin2 && !builtin1) {
@@ -482,9 +482,9 @@ U0 ICFOp(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
SwapI64(&builtin1,&builtin2);
}
if (builtin1)
ICU16(tempi,builtin1);
ICU16(tmpi,builtin1);
else
ICSlashOp(tempi,t1,r1,d1,SLASH_OP_FLD,ip);
ICSlashOp(tmpi,t1,r1,d1,SLASH_OP_FLD,ip);
}
if (alt)
switch (op.u8[0]) {
@@ -492,112 +492,112 @@ U0 ICFOp(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
case 6: op=SLASH_OP_FDIVR; break;
}
if (builtin2) {
ICU16(tempi,builtin2);
ICU16(tempi,op.u16[2]);
ICU16(tmpi,builtin2);
ICU16(tmpi,op.u16[2]);
} else
ICSlashOp(tempi,t2,r2,d2,op,ip);
CmpNoteFloatOp(cc,tempi,TRUE,TRUE,CN_MAIN);
ICSlashOp(tmpi,t2,r2,d2,op,ip);
CmpNoteFloatOp(cc,tmpi,TRUE,TRUE,CN_MAIN);
if (dont_pop_float) {
if (rsp_size)
ICAddRSP(tempi,rsp_size);
ICAddRSP(tmpi,rsp_size);
} else {
if (rsp_size==8)
ICSlashOp(tempi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,0,SLASH_OP_FSTP,ip);
ICSlashOp(tmpi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,0,SLASH_OP_FSTP,ip);
else if (rsp_size>8) {
ICSlashOp(tempi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,rsp_size-8,
ICSlashOp(tmpi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,rsp_size-8,
SLASH_OP_FSTP,ip);
ICAddRSP(tempi,rsp_size-8);
ICAddRSP(tmpi,rsp_size-8);
}
ICPop(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,ip);
ICPop(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,ip);
}
}
U0 ICFCmp(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,I64 ip)
U0 ICFCmp(CCmpCtrl *cc,CIntermediateCode *tmpi,I64 op,I64 ip)
{
Bool dont_push_float,dont_pop_float;
CmpSetFloatOpPushPop(cc,tempi,&dont_push_float,&dont_pop_float);
CmpSetFloatOpPushPop(cc,tmpi,&dont_push_float,&dont_pop_float);
if (dont_push_float) {
if (tempi->ic_flags&ICF_ALT_TEMPLATE) {
if (tempi->ic_flags&ICF_POP_CMP)
ICPopRegs(tempi,1<<REG_RAX);
if (tmpi->ic_flags&ICF_ALT_TEMPLATE) {
if (tmpi->ic_flags&ICF_POP_CMP)
ICPopRegs(tmpi,1<<REG_RAX);
else
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
} else
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
if (tempi->ic_flags&ICF_POP_CMP)
ICPopRegs(tempi,1<<REG_RDX);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
if (tmpi->ic_flags&ICF_POP_CMP)
ICPopRegs(tmpi,1<<REG_RDX);
else
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
}
if (tempi->ic_flags&ICF_PUSH_CMP)
ICPushRegs(tempi,1<<REG_RAX);
ICCopyTemplate(cc,tempi,op,FALSE,TRUE,FALSE,CN_MAIN);
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
if (tmpi->ic_flags&ICF_PUSH_CMP)
ICPushRegs(tmpi,1<<REG_RAX);
ICCopyTemplate(cc,tmpi,op,FALSE,TRUE,FALSE,CN_MAIN);
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
}
U0 ICFModEqu(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip)
U0 ICFModEqu(CCmpCtrl *cc,CIntermediateCode *tmpi,I64 ip)
{
Bool dont_push_float,dont_pop_float;
CmpSetFloatOpPushPop(cc,tempi,&dont_push_float,&dont_pop_float);
if (tempi->ic_flags & ICF_BY_VAL) {
CmpSetFloatOpPushPop(cc,tmpi,&dont_push_float,&dont_pop_float);
if (tmpi->ic_flags & ICF_BY_VAL) {
if (dont_push_float) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,ip);
if (tempi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tempi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,FALSE,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,ip);
if (tmpi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tmpi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,FALSE,ip);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,
tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,ip);
if (tempi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tempi,REG_RDX,MDF_REG+RT_I64,REG_RDX,0,FALSE,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,
tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,ip);
if (tmpi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tmpi,REG_RDX,MDF_REG+RT_I64,REG_RDX,0,FALSE,ip);
}
//TODO: unpushable,unpop? Not sure
ICCopyTemplate(cc,tempi,CMP_TEMPLATE_MOD,FALSE,FALSE,FALSE,CN_MAIN);
if (tempi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tempi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,TRUE,ip);
ICMov(tempi,tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,MDF_REG+RT_I64,REG_RAX,0,ip);
if (tempi->r.type.mode)
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to,
tempi->a1.reg,tempi->a1.disp,ip);
ICCopyTemplate(cc,tmpi,CMP_TEMPLATE_MOD,FALSE,FALSE,FALSE,CN_MAIN);
if (tmpi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tmpi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,TRUE,ip);
ICMov(tmpi,tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,MDF_REG+RT_I64,REG_RAX,0,ip);
if (tmpi->r.type.mode)
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to,
tmpi->a1.reg,tmpi->a1.disp,ip);
} else {
if (dont_push_float) {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,tempi->a1.type,
tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,ip);
if (tempi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tempi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,FALSE,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,tmpi->a1.type,
tmpi->a1.reg,tmpi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,ip);
if (tmpi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tmpi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,FALSE,ip);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,tempi->a1.type,
tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,
MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,ip);
if (tempi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tempi,REG_RDX,MDF_REG+RT_I64,REG_RDX,0,FALSE,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,tmpi->a1.type,
tmpi->a1.reg,tmpi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,
MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,ip);
if (tmpi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tmpi,REG_RDX,MDF_REG+RT_I64,REG_RDX,0,FALSE,ip);
}
//TODO: unpushable,unpop? Not sure
ICCopyTemplate(cc,tempi,CMP_TEMPLATE_MOD,FALSE,FALSE,FALSE,CN_MAIN);
if (tempi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tempi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,TRUE,ip);
ICMov(tempi,MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,
ICCopyTemplate(cc,tmpi,CMP_TEMPLATE_MOD,FALSE,FALSE,FALSE,CN_MAIN);
if (tmpi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tmpi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,TRUE,ip);
ICMov(tmpi,MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,
MDF_REG+RT_I64,REG_RAX,0,ip);
if (tempi->r.type.mode)
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
if (tmpi->r.type.mode)
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
}
}
+229 -229
View File
@@ -1,7 +1,7 @@
U0 ICFOpEqu(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
U0 ICFOpEqu(CCmpCtrl *cc,CIntermediateCode *tmpi,I64 op,U8 *buf2,I64 ip)
{//for ADD,SUB,DIV,MUL
CICArg *a1=&tempi->a1,
*a2=&tempi->a2;
CICArg *a1=&tmpi->a1,
*a2=&tmpi->a2;
Bool dont_push_float,dont_pop_float,p1_mem;
I64 rsp_size=0,builtin2=0,
t1,r1,d1,t2,r2,d2;
@@ -9,41 +9,41 @@ U0 ICFOpEqu(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
if (cc->flags&CCF_AOT_COMPILE)
buf2=cc->aotc->ip;
CmpSetFloatOpPushPop(cc,tempi,&dont_push_float,&dont_pop_float);
CmpSetFloatOpPushPop(cc,tmpi,&dont_push_float,&dont_pop_float);
if (dont_pop_float)
throw('Compiler');
if (tempi->ic_flags & ICF_BY_VAL) {
if (tmpi->ic_flags & ICF_BY_VAL) {
p1_mem=FALSE;
if (dont_push_float) {
if (tempi->a1_type_pointed_to!=RT_F64) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
a1->type&MDG_MASK+tempi->a1_type_pointed_to,a1->reg,a1->disp,ip);
ICFCvt2(cc,tempi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,FALSE,ip);
ICPush(tempi,MDF_REG+RT_I64,REG_RAX,0,ip);
if (tmpi->a1_type_pointed_to!=RT_F64) {
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
a1->type&MDG_MASK+tmpi->a1_type_pointed_to,a1->reg,a1->disp,ip);
ICFCvt2(cc,tmpi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,FALSE,ip);
ICPush(tmpi,MDF_REG+RT_I64,REG_RAX,0,ip);
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=0;
rsp_size+=8;
} else {
if (tempi->a1_type_pointed_to>=RT_I64 && a1->type&MDG_DISP_SIB_RIP) {
t1=a1->type&MDG_MASK+tempi->a1_type_pointed_to;
if (tmpi->a1_type_pointed_to>=RT_I64 && a1->type&MDG_DISP_SIB_RIP) {
t1=a1->type&MDG_MASK+tmpi->a1_type_pointed_to;
r1=a1->reg;
d1=a1->disp;
p1_mem=TRUE;
} else {
ICPush(tempi,a1->type&MDG_MASK+tempi->a1_type_pointed_to,
ICPush(tmpi,a1->type&MDG_MASK+tmpi->a1_type_pointed_to,
a1->reg,a1->disp,ip);
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=0;
rsp_size+=8;
}
}
} else {
if (tempi->a1_type_pointed_to!=RT_F64 || a1->type&MDF_STK) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,
a1->type&MDG_MASK+tempi->a1_type_pointed_to,a1->reg,a1->disp,ip);
if (tempi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tempi,REG_RDX,MDF_REG+RT_I64,REG_RDX,0,FALSE,ip);
ICU16(tempi,0x5052); //PUSH EDX PUSH EAX
if (tmpi->a1_type_pointed_to!=RT_F64 || a1->type&MDF_STK) {
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,
a1->type&MDG_MASK+tmpi->a1_type_pointed_to,a1->reg,a1->disp,ip);
if (tmpi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tmpi,REG_RDX,MDF_REG+RT_I64,REG_RDX,0,FALSE,ip);
ICU16(tmpi,0x5052); //PUSH EDX PUSH EAX
rsp_size=16;
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=8;
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
@@ -60,18 +60,18 @@ U0 ICFOpEqu(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
d2=COCFloatConstFind(cc,a2->disp(F64))+buf2;
}
} else {
ICPush(tempi,a2->type,a2->reg,a2->disp,ip);
ICPush(tmpi,a2->type,a2->reg,a2->disp,ip);
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
rsp_size+=8;
}
}
if (tempi->a1_type_pointed_to>=RT_I64 && a1->type&MDG_DISP_SIB_RIP) {
t1=a1->type&MDG_MASK+tempi->a1_type_pointed_to;
if (tmpi->a1_type_pointed_to>=RT_I64 && a1->type&MDG_DISP_SIB_RIP) {
t1=a1->type&MDG_MASK+tmpi->a1_type_pointed_to;
r1=a1->reg;
d1=a1->disp;
p1_mem=TRUE;
} else {
ICPush(tempi,a1->type&MDG_MASK+tempi->a1_type_pointed_to,
ICPush(tmpi,a1->type&MDG_MASK+tmpi->a1_type_pointed_to,
a1->reg,a1->disp,ip);
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=0;
rsp_size+=8;
@@ -80,71 +80,71 @@ U0 ICFOpEqu(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
}
}
}
if (!rsp_size && !(p1_mem && tempi->a1_type_pointed_to==RT_F64)) {
if (!rsp_size && !(p1_mem && tmpi->a1_type_pointed_to==RT_F64)) {
rsp_size=8;
ICAddRSP(tempi,-8);
ICAddRSP(tmpi,-8);
}
if (!dont_push_float) {
if (builtin2)
ICU16(tempi,builtin2);
ICU16(tmpi,builtin2);
else
ICSlashOp(tempi,t2,r2,d2,SLASH_OP_FLD,ip);
ICSlashOp(tmpi,t2,r2,d2,SLASH_OP_FLD,ip);
}
switch (op.u8[0]) {
case 4: op=SLASH_OP_FSUBR; break;
case 6: op=SLASH_OP_FDIVR; break;
}
ICSlashOp(tempi,t1,r1,d1,op,ip);
CmpNoteFloatOp(cc,tempi,TRUE,FALSE,CN_MAIN);
if (p1_mem && tempi->a1_type_pointed_to==RT_F64) {
ICSlashOp(tempi,t1,r1,d1,SLASH_OP_FSTP,ip);
ICSlashOp(tmpi,t1,r1,d1,op,ip);
CmpNoteFloatOp(cc,tmpi,TRUE,FALSE,CN_MAIN);
if (p1_mem && tmpi->a1_type_pointed_to==RT_F64) {
ICSlashOp(tmpi,t1,r1,d1,SLASH_OP_FSTP,ip);
if (rsp_size)
ICAddRSP(tempi,rsp_size);
ICAddRSP(tmpi,rsp_size);
} else {
if (rsp_size==8)
ICSlashOp(tempi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,0,SLASH_OP_FSTP,ip);
ICSlashOp(tmpi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,0,SLASH_OP_FSTP,ip);
else if (rsp_size>8) {
ICSlashOp(tempi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,rsp_size-8,
ICSlashOp(tmpi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,rsp_size-8,
SLASH_OP_FSTP,ip);
ICAddRSP(tempi,rsp_size-8);
ICAddRSP(tmpi,rsp_size-8);
}
if (tempi->a1_type_pointed_to!=RT_F64) {
ICPop(tempi,MDF_REG+RT_I64,REG_RAX,0,ip);
ICFCvt2(cc,tempi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,TRUE,ip);
ICMov(tempi,a1->type&MDG_MASK+tempi->a1_type_pointed_to,a1->reg,
if (tmpi->a1_type_pointed_to!=RT_F64) {
ICPop(tmpi,MDF_REG+RT_I64,REG_RAX,0,ip);
ICFCvt2(cc,tmpi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,TRUE,ip);
ICMov(tmpi,a1->type&MDG_MASK+tmpi->a1_type_pointed_to,a1->reg,
a1->disp,MDF_REG+RT_I64,REG_RAX,0,ip);
} else
ICPop(tempi,a1->type&MDG_MASK+tempi->a1_type_pointed_to,
ICPop(tmpi,a1->type&MDG_MASK+tmpi->a1_type_pointed_to,
a1->reg,a1->disp,ip);
}
if (tempi->r.type.mode)
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
a1->type&MDG_MASK+tempi->a1_type_pointed_to,a1->reg,a1->disp,ip);
if (tmpi->r.type.mode)
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
a1->type&MDG_MASK+tmpi->a1_type_pointed_to,a1->reg,a1->disp,ip);
} else {
if (tempi->a1_type_pointed_to>=RT_I64)
if (tmpi->a1_type_pointed_to>=RT_I64)
p1_mem=TRUE;
else
p1_mem=FALSE;
if (dont_push_float) {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,a1->type,a1->reg,a1->disp,ip);
if (tempi->a1_type_pointed_to!=RT_F64) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,ip);
ICFCvt2(cc,tempi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,FALSE,ip);
ICPush(tempi,MDF_REG+RT_I64,REG_RAX,0,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,a1->type,a1->reg,a1->disp,ip);
if (tmpi->a1_type_pointed_to!=RT_F64) {
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,ip);
ICFCvt2(cc,tmpi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,FALSE,ip);
ICPush(tmpi,MDF_REG+RT_I64,REG_RAX,0,ip);
} else
ICPush(tempi,MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,ip);
ICPush(tmpi,MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,ip);
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=0;
rsp_size+=8;
} else {
if (tempi->a1_type_pointed_to!=RT_F64 || a1->type&MDF_STK) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,a1->type,a1->reg,a1->disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,
MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,ip);
if (tempi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tempi,REG_RDX,MDF_REG+RT_I64,REG_RDX,0,FALSE,ip);
ICU16(tempi,0x5052); //PUSH EDX PUSH EAX
if (tmpi->a1_type_pointed_to!=RT_F64 || a1->type&MDF_STK) {
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,a1->type,a1->reg,a1->disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,
MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,ip);
if (tmpi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tmpi,REG_RDX,MDF_REG+RT_I64,REG_RDX,0,FALSE,ip);
ICU16(tmpi,0x5052); //PUSH EDX PUSH EAX
rsp_size=16;
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=8;
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
@@ -161,62 +161,62 @@ U0 ICFOpEqu(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,U8 *buf2,I64 ip)
d2=COCFloatConstFind(cc,a2->disp(F64))+buf2;
}
} else {
ICPush(tempi,a2->type,a2->reg,a2->disp,ip);
ICPush(tmpi,a2->type,a2->reg,a2->disp,ip);
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
rsp_size+=8;
}
}
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,a1->type,a1->reg,a1->disp,ip);
ICPush(tempi,MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,a1->type,a1->reg,a1->disp,ip);
ICPush(tmpi,MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,ip);
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=0;
rsp_size+=8;
if (r2==REG_RSP+REG_RSP<<8)
d2+=8;
}
}
if (!rsp_size && !(p1_mem && tempi->a1_type_pointed_to==RT_F64)) {
if (!rsp_size && !(p1_mem && tmpi->a1_type_pointed_to==RT_F64)) {
rsp_size=8;
ICAddRSP(tempi,-8);
ICAddRSP(tmpi,-8);
}
if (!dont_push_float) {
if (builtin2)
ICU16(tempi,builtin2);
ICU16(tmpi,builtin2);
else
ICSlashOp(tempi,t2,r2,d2,SLASH_OP_FLD,ip);
ICSlashOp(tmpi,t2,r2,d2,SLASH_OP_FLD,ip);
}
switch (op.u8[0]) {
case 4: op=SLASH_OP_FSUBR; break;
case 6: op=SLASH_OP_FDIVR; break;
}
ICSlashOp(tempi,t1,r1,d1,op,ip);
CmpNoteFloatOp(cc,tempi,TRUE,FALSE,CN_MAIN);
if (p1_mem && tempi->a1_type_pointed_to==RT_F64) {
ICSlashOp(tempi,MDF_DISP+tempi->a1_type_pointed_to,
ICSlashOp(tmpi,t1,r1,d1,op,ip);
CmpNoteFloatOp(cc,tmpi,TRUE,FALSE,CN_MAIN);
if (p1_mem && tmpi->a1_type_pointed_to==RT_F64) {
ICSlashOp(tmpi,MDF_DISP+tmpi->a1_type_pointed_to,
REG_RCX,0,SLASH_OP_FSTP,ip);
if (rsp_size)
ICAddRSP(tempi,rsp_size);
ICAddRSP(tmpi,rsp_size);
} else {
if (rsp_size==8)
ICSlashOp(tempi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,0,SLASH_OP_FSTP,ip);
ICSlashOp(tmpi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,0,SLASH_OP_FSTP,ip);
else if (rsp_size>8) {
ICSlashOp(tempi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,rsp_size-8,
ICSlashOp(tmpi,MDF_SIB+RT_I64,REG_RSP+REG_RSP<<8,rsp_size-8,
SLASH_OP_FSTP,ip);
ICAddRSP(tempi,rsp_size-8);
ICAddRSP(tmpi,rsp_size-8);
}
ICPop(tempi,MDF_REG+RT_I64,REG_RAX,0,ip);
if (tempi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tempi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,TRUE,ip);
ICMov(tempi,MDF_DISP+tempi->a1_type_pointed_to,REG_RCX,0,
ICPop(tmpi,MDF_REG+RT_I64,REG_RAX,0,ip);
if (tmpi->a1_type_pointed_to!=RT_F64)
ICFCvt2(cc,tmpi,REG_RAX,MDF_REG+RT_I64,REG_RAX,0,TRUE,ip);
ICMov(tmpi,MDF_DISP+tmpi->a1_type_pointed_to,REG_RCX,0,
MDF_REG+RT_I64,REG_RAX,0,ip);
}
if (tempi->r.type.mode)
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
if (tmpi->r.type.mode)
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
}
}
U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tmpi,I64 ip,
I64 us,I64 not_us,U8 *buf,I64 ip2)
{
CICArg *a1,*a2;
@@ -225,13 +225,13 @@ U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
CCodeMisc *lb;
U8 *buf2;
if (tempi->ic_flags&ICF_ALT_TEMPLATE) {
a1=&tempi->a2;
a2=&tempi->a1;
if (tmpi->ic_flags&ICF_ALT_TEMPLATE) {
a1=&tmpi->a2;
a2=&tmpi->a1;
alt=TRUE;
} else {
a1=&tempi->a1;
a2=&tempi->a2;
a1=&tmpi->a1;
a2=&tmpi->a2;
alt=FALSE;
}
@@ -240,9 +240,9 @@ U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
else
buf2=buf;
CmpSetFloatOpPushPop(cc,tempi,&dont_push_float,&dont_pop_float);
CmpSetFloatOpPushPop(cc,tmpi,&dont_push_float,&dont_pop_float);
if (dont_push_float) {
if (tempi->ic_flags&ICF_POP_CMP && alt) {
if (tmpi->ic_flags&ICF_POP_CMP && alt) {
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
rsp_size+=8;
} else {
@@ -253,13 +253,13 @@ U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
} else {
if (a2->type&MDF_IMM) {
if (!(builtin2=ICBuiltInFloatConst(a2->disp(F64))) ||
tempi->ic_flags&ICF_PUSH_CMP) {
tmpi->ic_flags&ICF_PUSH_CMP) {
t2=MDF_RIP_DISP32+RT_I64;
r2=REG_RIP;
d2=COCFloatConstFind(cc,a2->disp(F64))+buf2;
}
} else {
ICPush(tempi,a2->type,a2->reg,a2->disp,ip2);
ICPush(tmpi,a2->type,a2->reg,a2->disp,ip2);
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
rsp_size+=8;
}
@@ -268,7 +268,7 @@ U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
} else {
if (alt) {
if (!(a2->type&MDF_STK)) {
if (tempi->ic_flags&ICF_POP_CMP) {
if (tmpi->ic_flags&ICF_POP_CMP) {
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=0;
rsp_size+=8;
} else {
@@ -284,7 +284,7 @@ U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
d1=COCFloatConstFind(cc,a1->disp(F64))+buf2;
}
} else {
ICPush(tempi,a1->type,a1->reg,a1->disp,ip2);
ICPush(tmpi,a1->type,a1->reg,a1->disp,ip2);
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=0;
rsp_size+=8;
}
@@ -297,13 +297,13 @@ U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
} else {
if (a2->type&MDF_IMM) {
if (!(builtin2=ICBuiltInFloatConst(a2->disp(F64))) ||
tempi->ic_flags&ICF_PUSH_CMP) {
tmpi->ic_flags&ICF_PUSH_CMP) {
t2=MDF_RIP_DISP32+RT_I64;
r2=REG_RIP;
d2=COCFloatConstFind(cc,a2->disp(F64))+buf2;
}
} else {
ICPush(tempi,a2->type,a2->reg,a2->disp,ip2);
ICPush(tmpi,a2->type,a2->reg,a2->disp,ip2);
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
rsp_size+=8;
if (r1==REG_RSP+REG_RSP<<8)
@@ -311,12 +311,12 @@ U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
}
}
} else {
if (tempi->ic_flags&ICF_POP_CMP)
ICPopRegs(tempi,1<<REG_RDX);
if (tmpi->ic_flags&ICF_POP_CMP)
ICPopRegs(tmpi,1<<REG_RDX);
else
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,a1->type,a1->reg,a1->disp,ip2);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip2);
ICU16(tempi,0x5052); //PUSH EDX PUSH EAX
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,a1->type,a1->reg,a1->disp,ip2);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip2);
ICU16(tmpi,0x5052); //PUSH EDX PUSH EAX
rsp_size=16;
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=8;
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
@@ -330,18 +330,18 @@ U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
} else {
if (a2->type&MDF_IMM) {
if (!(builtin2=ICBuiltInFloatConst(a2->disp(F64))) ||
tempi->ic_flags&ICF_PUSH_CMP) {
tmpi->ic_flags&ICF_PUSH_CMP) {
t2=MDF_RIP_DISP32+RT_I64;
r2=REG_RIP;
d2=COCFloatConstFind(cc,a2->disp(F64))+buf2;
}
} else {
ICPush(tempi,a2->type,a2->reg,a2->disp,ip2);
ICPush(tmpi,a2->type,a2->reg,a2->disp,ip2);
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
rsp_size+=8;
}
}
if (tempi->ic_flags&ICF_POP_CMP) {
if (tmpi->ic_flags&ICF_POP_CMP) {
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=0;
rsp_size+=8;
if (r2==REG_RSP+REG_RSP<<8)
@@ -359,7 +359,7 @@ U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
d1=COCFloatConstFind(cc,a1->disp(F64))+buf2;
}
} else {
ICPush(tempi,a1->type,a1->reg,a1->disp,ip2);
ICPush(tmpi,a1->type,a1->reg,a1->disp,ip2);
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=0;
rsp_size+=8;
if (r2==REG_RSP+REG_RSP<<8)
@@ -368,12 +368,12 @@ U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
}
}
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip2);
if (tempi->ic_flags&ICF_POP_CMP)
ICPopRegs(tempi,1<<REG_RDX);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,a2->type,a2->reg,a2->disp,ip2);
if (tmpi->ic_flags&ICF_POP_CMP)
ICPopRegs(tmpi,1<<REG_RDX);
else
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,a1->type,a1->reg,a1->disp,ip2);
ICU16(tempi,0x5052); //PUSH EDX PUSH EAX
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,a1->type,a1->reg,a1->disp,ip2);
ICU16(tmpi,0x5052); //PUSH EDX PUSH EAX
rsp_size=16;
t1=MDF_SIB+RT_I64; r1=REG_RSP+REG_RSP<<8; d1=8;
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
@@ -382,66 +382,66 @@ U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
}
if (!dont_push_float) {
if (builtin1)
ICU16(tempi,builtin1);
ICU16(tmpi,builtin1);
else
ICSlashOp(tempi,t1,r1,d1,SLASH_OP_FLD,ip2);
ICSlashOp(tmpi,t1,r1,d1,SLASH_OP_FLD,ip2);
}
if (!alt)
us=not_us;
if (builtin2)
ICU16(tempi,builtin2);
ICU16(tmpi,builtin2);
else
ICSlashOp(tempi,t2,r2,d2,SLASH_OP_FLD,ip2);
if (tempi->ic_flags&ICF_PUSH_CMP) {
ICSlashOp(tmpi,t2,r2,d2,SLASH_OP_FLD,ip2);
if (tmpi->ic_flags&ICF_PUSH_CMP) {
t2=MDF_SIB+RT_I64; r2=REG_RSP+REG_RSP<<8; d2=0;
if (!rsp_size) {
rsp_size=8;
ICAddRSP(tempi,-8);
ICAddRSP(tmpi,-8);
} else if (rsp_size==16)
d2=8;
if (alt) {
ICU16(tempi,0xF1DF); //FCOMIP
ICSlashOp(tempi,t2,r2,d2,SLASH_OP_FSTP,ip2);
ICU16(tmpi,0xF1DF); //FCOMIP
ICSlashOp(tmpi,t2,r2,d2,SLASH_OP_FSTP,ip2);
} else {
ICU16(tempi,0xF1DB); //FCOMI
ICSlashOp(tempi,t2,r2,d2,SLASH_OP_FSTP,ip2);
ICU32(tempi,0xF7D9C0DD); //FFREE,FINCSTP
ICU16(tmpi,0xF1DB); //FCOMI
ICSlashOp(tmpi,t2,r2,d2,SLASH_OP_FSTP,ip2);
ICU32(tmpi,0xF7D9C0DD); //FFREE,FINCSTP
}
} else {
ICU16(tempi,0xF1DF); //FCOMIP
ICU32(tempi,0xF7D9C0DD); //FFREE,FINCSTP
ICU16(tmpi,0xF1DF); //FCOMIP
ICU32(tmpi,0xF7D9C0DD); //FFREE,FINCSTP
}
CmpNoteFloatOp(cc,tempi,TRUE,FALSE,CN_MAIN);
CmpNoteFloatOp(cc,tmpi,TRUE,FALSE,CN_MAIN);
if (tempi->ic_flags&ICF_PUSH_CMP) {
if (tmpi->ic_flags&ICF_PUSH_CMP) {
if (r2.u8[0]==REG_RSP) {
while (d2 && rsp_size) {
ICU8(tempi,0x5B); //POP RBX (Dont change flags)
ICU8(tmpi,0x5B); //POP RBX (Dont change flags)
rsp_size-=8;
d2-=8;
}
} else {
while (rsp_size) {
ICU8(tempi,0x5B); //POP RBX (Dont change flags)
ICU8(tmpi,0x5B); //POP RBX (Dont change flags)
rsp_size-=8;
}
ICPush(tempi,t2,r2,d2,ip2);
ICPush(tmpi,t2,r2,d2,ip2);
}
} else {
while (rsp_size) {
ICU8(tempi,0x5B); //POP RBX (Dont change flags)
ICU8(tmpi,0x5B); //POP RBX (Dont change flags)
rsp_size-=8;
}
}
ip+=tempi->ic_cnt;
lb=OptLabelFwd(tempi->ic_data);
short_jmp=ToBool(tempi->ic_flags&ICF_SHORT_JMP);
ip+=tmpi->ic_cnt;
lb=OptLabelFwd(tmpi->ic_data);
short_jmp=ToBool(tmpi->ic_flags&ICF_SHORT_JMP);
if (!buf && lb->addr!=INVALID_PTR) {
i=lb->addr-(ip+2);
if (lb->flags&CMF_POP_CMP) {
if(tempi->ic_flags&ICF_PUSH_CMP)
if(tmpi->ic_flags&ICF_PUSH_CMP)
i+=4;
else
i+=8;
@@ -451,170 +451,170 @@ U0 ICFCmpAndBranch(CCmpCtrl *cc,CIntermediateCode *tempi,I64 ip,
}
if (short_jmp) {
tempi->ic_flags|=ICF_SHORT_JMP;
tmpi->ic_flags|=ICF_SHORT_JMP;
i=lb->addr-(ip+2);
if (lb->flags&CMF_POP_CMP) {
if(tempi->ic_flags&ICF_PUSH_CMP)
if(tmpi->ic_flags&ICF_PUSH_CMP)
i+=4;
else
i+=8;
}
ICU16(tempi,i<<8+us.u8[2]);
ICU16(tmpi,i<<8+us.u8[2]);
} else {
tempi->ic_flags&=~ICF_SHORT_JMP;
tmpi->ic_flags&=~ICF_SHORT_JMP;
i=lb->addr-(ip+6);
if (lb->flags&CMF_POP_CMP) {
if(tempi->ic_flags&ICF_PUSH_CMP)
if(tmpi->ic_flags&ICF_PUSH_CMP)
i+=4;
else
i+=8;
}
ICU16(tempi,us.u16[0]);
ICU32(tempi,i);
ICU16(tmpi,us.u16[0]);
ICU32(tmpi,i);
}
}
U0 ICFMul(CCmpCtrl *cc,CIntermediateCode *tempi,U8 *buf,I64 ip)
U0 ICFMul(CCmpCtrl *cc,CIntermediateCode *tmpi,U8 *buf,I64 ip)
{
if (tempi->a1.type&MDF_IMM && tempi->a1.type&RTG_MASK==RT_F64 &&
tempi->a1.disp(F64)==1.0) {
CmpNoteFloatOp(cc,tempi,FALSE,FALSE,CN_MAIN);
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
} else if (tempi->a2.type&MDF_IMM &&
tempi->a2.type&RTG_MASK==RT_F64&& tempi->a2.disp(F64)==1.0) {
CmpNoteFloatOp(cc,tempi,FALSE,FALSE,CN_MAIN);
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
if (tmpi->a1.type&MDF_IMM && tmpi->a1.type&RTG_MASK==RT_F64 &&
tmpi->a1.disp(F64)==1.0) {
CmpNoteFloatOp(cc,tmpi,FALSE,FALSE,CN_MAIN);
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
} else if (tmpi->a2.type&MDF_IMM &&
tmpi->a2.type&RTG_MASK==RT_F64&& tmpi->a2.disp(F64)==1.0) {
CmpNoteFloatOp(cc,tmpi,FALSE,FALSE,CN_MAIN);
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
} else
ICFOp(cc,tempi,SLASH_OP_FMUL,buf,ip);
ICFOp(cc,tmpi,SLASH_OP_FMUL,buf,ip);
}
U0 ICFDiv(CCmpCtrl *cc,CIntermediateCode *tempi,U8 *buf,I64 ip)
U0 ICFDiv(CCmpCtrl *cc,CIntermediateCode *tmpi,U8 *buf,I64 ip)
{
if (tempi->a2.type&MDF_IMM && tempi->a2.type&RTG_MASK==RT_F64 &&
tempi->a2.disp(F64)==1.0) {
CmpNoteFloatOp(cc,tempi,FALSE,FALSE,CN_MAIN);
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
if (tmpi->a2.type&MDF_IMM && tmpi->a2.type&RTG_MASK==RT_F64 &&
tmpi->a2.disp(F64)==1.0) {
CmpNoteFloatOp(cc,tmpi,FALSE,FALSE,CN_MAIN);
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
} else
ICFOp(cc,tempi,SLASH_OP_FDIV,buf,ip);
ICFOp(cc,tmpi,SLASH_OP_FDIV,buf,ip);
}
U0 ICFAdd(CCmpCtrl *cc,CIntermediateCode *tempi,U8 *buf,I64 ip)
U0 ICFAdd(CCmpCtrl *cc,CIntermediateCode *tmpi,U8 *buf,I64 ip)
{
Bool dont_push_float,dont_pop_float;
CmpSetFloatOpPushPop(cc,tempi,&dont_push_float,&dont_pop_float);
if (tempi->a1.type&MDF_IMM && !tempi->a1.disp) {
CmpSetFloatOpPushPop(cc,tmpi,&dont_push_float,&dont_pop_float);
if (tmpi->a1.type&MDF_IMM && !tmpi->a1.disp) {
if (dont_push_float) {
ICCopyTemplate(cc,tempi,CMP_TEMPLATE_FSTP,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
ICCopyTemplate(cc,tmpi,CMP_TEMPLATE_FSTP,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
} else if (dont_pop_float) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
ICCopyTemplate(cc,tempi,CMP_TEMPLATE_FLD,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
ICCopyTemplate(cc,tmpi,CMP_TEMPLATE_FLD,FALSE,TRUE,TRUE,CN_MAIN);
} else {
CmpNoteFloatOp(cc,tempi,TRUE,TRUE,CN_MAIN);
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
tempi->a2.type,tempi->a2.reg,tempi->a2.disp,ip);
CmpNoteFloatOp(cc,tmpi,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
tmpi->a2.type,tmpi->a2.reg,tmpi->a2.disp,ip);
}
} else if (tempi->a2.type&MDF_IMM && !tempi->a2.disp) {
} else if (tmpi->a2.type&MDF_IMM && !tmpi->a2.disp) {
if (dont_push_float) {
ICCopyTemplate(cc,tempi,CMP_TEMPLATE_FSTP,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
ICCopyTemplate(cc,tmpi,CMP_TEMPLATE_FSTP,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
} else if (dont_pop_float) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICCopyTemplate(cc,tempi,CMP_TEMPLATE_FLD,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
ICCopyTemplate(cc,tmpi,CMP_TEMPLATE_FLD,FALSE,TRUE,TRUE,CN_MAIN);
} else {
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
CmpNoteFloatOp(cc,tempi,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
CmpNoteFloatOp(cc,tmpi,TRUE,TRUE,CN_MAIN);
}
} else
ICFOp(cc,tempi,SLASH_OP_FADD,buf,ip);
ICFOp(cc,tmpi,SLASH_OP_FADD,buf,ip);
}
U0 ICFSub(CCmpCtrl *cc,CIntermediateCode *tempi,U8 *buf,I64 ip)
U0 ICFSub(CCmpCtrl *cc,CIntermediateCode *tmpi,U8 *buf,I64 ip)
{
Bool dont_push_float,dont_pop_float;
if (tempi->a2.type&MDF_IMM && !tempi->a2.disp) {
CmpSetFloatOpPushPop(cc,tempi,&dont_push_float,&dont_pop_float);
if (tmpi->a2.type&MDF_IMM && !tmpi->a2.disp) {
CmpSetFloatOpPushPop(cc,tmpi,&dont_push_float,&dont_pop_float);
if (dont_push_float) {
ICCopyTemplate(cc,tempi,CMP_TEMPLATE_FSTP,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
ICCopyTemplate(cc,tmpi,CMP_TEMPLATE_FSTP,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
} else if (dont_pop_float) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICCopyTemplate(cc,tempi,CMP_TEMPLATE_FLD,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
ICCopyTemplate(cc,tmpi,CMP_TEMPLATE_FLD,FALSE,TRUE,TRUE,CN_MAIN);
} else {
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
CmpNoteFloatOp(cc,tempi,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
CmpNoteFloatOp(cc,tmpi,TRUE,TRUE,CN_MAIN);
}
} else
ICFOp(cc,tempi,SLASH_OP_FSUB,buf,ip);
ICFOp(cc,tmpi,SLASH_OP_FSUB,buf,ip);
}
U0 ICFPreIncDec(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,I64 ip)
U0 ICFPreIncDec(CCmpCtrl *cc,CIntermediateCode *tmpi,I64 op,I64 ip)
{
if (tempi->ic_flags & ICF_BY_VAL) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type&MDG_MASK+RT_I64,tempi->a1.reg,tempi->a1.disp,ip);
ICCopyTemplate(cc,tempi,op,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tempi,tempi->a1.type,tempi->a1.reg,tempi->a1.disp,
if (tmpi->ic_flags & ICF_BY_VAL) {
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type&MDG_MASK+RT_I64,tmpi->a1.reg,tmpi->a1.disp,ip);
ICCopyTemplate(cc,tmpi,op,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,MDF_DISP+RT_I64,REG_RCX,0,ip);
ICCopyTemplate(cc,tempi,op,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tempi,MDF_DISP+RT_I64,REG_RCX,0,MDF_REG+RT_I64,REG_RAX,0,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,MDF_DISP+RT_I64,REG_RCX,0,ip);
ICCopyTemplate(cc,tmpi,op,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,MDF_DISP+RT_I64,REG_RCX,0,MDF_REG+RT_I64,REG_RAX,0,ip);
}
if (tempi->r.type.mode)
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
if (tmpi->r.type.mode)
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
}
U0 ICFPostIncDec(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,I64 ip)
U0 ICFPostIncDec(CCmpCtrl *cc,CIntermediateCode *tmpi,I64 op,I64 ip)
{
if (tempi->ic_flags & ICF_BY_VAL) {
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type&MDG_MASK+RT_I64,tempi->a1.reg,tempi->a1.disp,ip);
if (tempi->r.type.mode)
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,MDF_REG+RT_I64,REG_RAX,0,ip);
ICCopyTemplate(cc,tempi,op,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tempi,tempi->a1.type,tempi->a1.reg,tempi->a1.disp,
if (tmpi->ic_flags & ICF_BY_VAL) {
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type&MDG_MASK+RT_I64,tmpi->a1.reg,tmpi->a1.disp,ip);
if (tmpi->r.type.mode)
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,MDF_REG+RT_I64,REG_RAX,0,ip);
ICCopyTemplate(cc,tmpi,op,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,MDF_DISP+RT_I64,REG_RCX,0,ip);
if (tempi->r.type.mode)
ICMov(tempi,MDF_REG+RT_I64,REG_RDX,0,MDF_REG+RT_I64,REG_RAX,0,ip);
ICCopyTemplate(cc,tempi,op,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tempi,MDF_DISP+RT_I64,REG_RCX,0,MDF_REG+RT_I64,REG_RAX,0,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,MDF_DISP+RT_I64,REG_RCX,0,ip);
if (tmpi->r.type.mode)
ICMov(tmpi,MDF_REG+RT_I64,REG_RDX,0,MDF_REG+RT_I64,REG_RAX,0,ip);
ICCopyTemplate(cc,tmpi,op,FALSE,TRUE,TRUE,CN_MAIN);
ICMov(tmpi,MDF_DISP+RT_I64,REG_RCX,0,MDF_REG+RT_I64,REG_RAX,0,ip);
}
if (tempi->r.type.mode)
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
if (tmpi->r.type.mode)
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RDX,0,ip);
}
U0 ICFTemplateFun(CCmpCtrl *cc,CIntermediateCode *tempi,I64 op,I64 ip)
U0 ICFTemplateFun(CCmpCtrl *cc,CIntermediateCode *tmpi,I64 op,I64 ip)
{
Bool dont_push_float,dont_pop_float;
CmpSetFloatOpPushPop(cc,tempi,&dont_push_float,&dont_pop_float);
CmpSetFloatOpPushPop(cc,tmpi,&dont_push_float,&dont_pop_float);
if (!dont_push_float)
ICMov(tempi,MDF_REG+RT_I64,REG_RAX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
ICCopyTemplate(cc,tempi,op,FALSE,TRUE,TRUE,CN_MAIN);
if (tempi->r.type.mode && !(tempi->ic_flags & ICF_R_TO_F64) &&
!(tempi->ic_flags & ICF_R_TO_INT))
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
ICCopyTemplate(cc,tmpi,op,FALSE,TRUE,TRUE,CN_MAIN);
if (tmpi->r.type.mode && !(tmpi->ic_flags & ICF_R_TO_F64) &&
!(tmpi->ic_flags & ICF_R_TO_INT))
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_REG+RT_I64,REG_RAX,0,ip);
}
+209 -209
View File
@@ -14,113 +14,113 @@ found it's way into a reg has been
sign or zero extended to 64-bits.
*/
U0 ICU8(CIntermediateCode *tempi,U8 b)
U0 ICU8(CIntermediateCode *tmpi,U8 b)
{
tempi->ic_body[tempi->ic_cnt++]=b;
tmpi->ic_body[tmpi->ic_cnt++]=b;
}
U0 ICRex(CIntermediateCode *tempi,U8 b)
U0 ICRex(CIntermediateCode *tmpi,U8 b)
{
if (b)
tempi->ic_body[tempi->ic_cnt++]=b;
tmpi->ic_body[tmpi->ic_cnt++]=b;
}
U0 ICOpSizeRex(CIntermediateCode *tempi,U8 b)
U0 ICOpSizeRex(CIntermediateCode *tmpi,U8 b)
{
tempi->ic_body[tempi->ic_cnt++]=OC_OP_SIZE_PREFIX;
tmpi->ic_body[tmpi->ic_cnt++]=OC_OP_SIZE_PREFIX;
if (b)
tempi->ic_body[tempi->ic_cnt++]=b;
tmpi->ic_body[tmpi->ic_cnt++]=b;
}
U0 ICU16(CIntermediateCode *tempi,U16 w)
U0 ICU16(CIntermediateCode *tmpi,U16 w)
{
*(&tempi->ic_body[tempi->ic_cnt])(U16)=w;
tempi->ic_cnt+=2;
*(&tmpi->ic_body[tmpi->ic_cnt])(U16)=w;
tmpi->ic_cnt+=2;
}
U0 ICU24(CIntermediateCode *tempi,U32 d)
U0 ICU24(CIntermediateCode *tmpi,U32 d)
{//Writes extra harmless overhanging byte.
*(&tempi->ic_body[tempi->ic_cnt])(U32)=d;
tempi->ic_cnt+=3;
*(&tmpi->ic_body[tmpi->ic_cnt])(U32)=d;
tmpi->ic_cnt+=3;
}
U0 ICU32(CIntermediateCode *tempi,U32 d)
U0 ICU32(CIntermediateCode *tmpi,U32 d)
{
*(&tempi->ic_body[tempi->ic_cnt])(U32)=d;
tempi->ic_cnt+=4;
*(&tmpi->ic_body[tmpi->ic_cnt])(U32)=d;
tmpi->ic_cnt+=4;
}
U0 ICU64(CIntermediateCode *tempi,U64 q)
U0 ICU64(CIntermediateCode *tmpi,U64 q)
{
*(&tempi->ic_body[tempi->ic_cnt])(U64)=q;
tempi->ic_cnt+=8;
*(&tmpi->ic_body[tmpi->ic_cnt])(U64)=q;
tmpi->ic_cnt+=8;
}
U0 ICAddRSP(CIntermediateCode *tempi,I64 i,Bool optimize=TRUE)
U0 ICAddRSP(CIntermediateCode *tmpi,I64 i,Bool optimize=TRUE)
{
I64 j,last_start;
CIntermediateCode *tempil1;
CIntermediateCode *tmpil1;
if (optimize) {
tempil1=tempi;
if (tempi->ic_last_start<0 && !tempi->ic_cnt &&
(tempil1=OptLag1(tempi)) && tempil1->ic_last_start<0)
tempil1=NULL;
if (tempil1) {
j=tempil1->ic_cnt;
if (tempil1->ic_last_start==j-4 && tempil1->ic_body[j-3]==0x83 &&
tempil1->ic_body[j-4]==0x48) {
if (tempil1->ic_body[j-2]==0xEC)
j=-tempil1->ic_body[j-1](I8);
else if (tempil1->ic_body[j-2]==0xC4)
j=tempil1->ic_body[j-1](I8);
tmpil1=tmpi;
if (tmpi->ic_last_start<0 && !tmpi->ic_cnt &&
(tmpil1=OptLag1(tmpi)) && tmpil1->ic_last_start<0)
tmpil1=NULL;
if (tmpil1) {
j=tmpil1->ic_cnt;
if (tmpil1->ic_last_start==j-4 && tmpil1->ic_body[j-3]==0x83 &&
tmpil1->ic_body[j-4]==0x48) {
if (tmpil1->ic_body[j-2]==0xEC)
j=-tmpil1->ic_body[j-1](I8);
else if (tmpil1->ic_body[j-2]==0xC4)
j=tmpil1->ic_body[j-1](I8);
else
j=0;
} else if (tempil1->ic_last_start==j-7 && tempil1->ic_body[j-6]==0x81 &&
tempil1->ic_body[j-7]==0x48) {
if (tempil1->ic_body[j-5]==0xEC)
j=-tempil1->ic_body[j-4](I32);
else if (tempil1->ic_body[j-5]==0xC4)
j=tempil1->ic_body[j-4](I32);
} else if (tmpil1->ic_last_start==j-7 && tmpil1->ic_body[j-6]==0x81 &&
tmpil1->ic_body[j-7]==0x48) {
if (tmpil1->ic_body[j-5]==0xEC)
j=-tmpil1->ic_body[j-4](I32);
else if (tmpil1->ic_body[j-5]==0xC4)
j=tmpil1->ic_body[j-4](I32);
else
j=0;
} else
j=0;
if (j) {
if (tempi==tempil1) {
tempi->ic_cnt=tempi->ic_last_start;
if (tmpi==tmpil1) {
tmpi->ic_cnt=tmpi->ic_last_start;
i+=j;
} else if (!(tempi->ic_flags&ICF_PREV_DELETED)) {
tempil1->ic_flags|=ICF_DEL_PREV_INS;
tempi->ic_flags=tempi->ic_flags&~ICF_CODE_FINAL|ICF_PREV_DELETED;
} else if (!(tmpi->ic_flags&ICF_PREV_DELETED)) {
tmpil1->ic_flags|=ICF_DEL_PREV_INS;
tmpi->ic_flags=tmpi->ic_flags&~ICF_CODE_FINAL|ICF_PREV_DELETED;
i+=j;
}
}
}
}
last_start=tempi->ic_cnt;
last_start=tmpi->ic_cnt;
if (i>0) {
if (i<=MAX_I8)
ICU32(tempi,0xC48348+i<<24);
ICU32(tmpi,0xC48348+i<<24);
else if (i<=MAX_I32) {
ICU24(tempi,0xC48148);
ICU32(tempi,i);
ICU24(tmpi,0xC48148);
ICU32(tmpi,i);
} else
throw('Compiler');
} else if (i<0) {
i=-i;
if (i<=MAX_I8)
ICU32(tempi,0xEC8348+i<<24);
ICU32(tmpi,0xEC8348+i<<24);
else if (i<=MAX_I32) {
ICU24(tempi,0xEC8148);
ICU32(tempi,i);
ICU24(tmpi,0xEC8148);
ICU32(tmpi,i);
} else
throw('Compiler');
}
if (optimize && tempi->ic_cnt>last_start)
tempi->ic_last_start=last_start;
if (optimize && tmpi->ic_cnt>last_start)
tmpi->ic_last_start=last_start;
}
extern U0 ICMov(CIntermediateCode *tempi,
extern U0 ICMov(CIntermediateCode *tmpi,
CICType t1,I64 r1,I64 d1,CICType t2,I64 r2,I64 d2,I64 ip);
#define MODR_REG 0
@@ -210,7 +210,7 @@ I64 ICModr1(I64 r,CICType t2,I64 r2,I64 d2)
return res;
}
U0 ICModr2(CIntermediateCode *tempi,I64 i,I64 d,I64 ip=0)
U0 ICModr2(CIntermediateCode *tmpi,I64 i,I64 d,I64 ip=0)
{//t=0 means no SIB
switch [i.u8[0]] {
case MODR_REG:
@@ -218,25 +218,25 @@ U0 ICModr2(CIntermediateCode *tempi,I64 i,I64 d,I64 ip=0)
case MODR_INDIRECT_REG:
break;
case MODR_D8_INDIRECT_REG:
ICU8(tempi,d);
ICU8(tmpi,d);
break;
case MODR_D32_INDIRECT_REG:
ICU32(tempi,d);
ICU32(tmpi,d);
break;
case MODR_SIB_INDIRECT_REG:
ICU8(tempi,i.u8[3]);
ICU8(tmpi,i.u8[3]);
break;
case MODR_SIB_D8_INDIRECT_REG:
ICU8(tempi,i.u8[3]);
ICU8(tempi,d);
ICU8(tmpi,i.u8[3]);
ICU8(tmpi,d);
break;
case MODR_SIB_D32_INDIRECT_REG:
ICU8(tempi,i.u8[3]);
ICU32(tempi,d);
ICU8(tmpi,i.u8[3]);
ICU32(tmpi,d);
break;
case MODR_RIP_REL:
ICU32(tempi,d-(ip+tempi->ic_cnt));
tempi->ic_flags&=~ICF_CODE_FINAL;
ICU32(tmpi,d-(ip+tmpi->ic_cnt));
tmpi->ic_flags&=~ICF_CODE_FINAL;
break;
}
}
@@ -262,52 +262,52 @@ U0 ICModr2(CIntermediateCode *tempi,I64 i,I64 d,I64 ip=0)
#define SLASH_OP_FISTTP 0x0000000001DDDD01
#define SLASH_OP_FILD 0x0000000001DFDF05
U0 ICSlashOp(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,I64 op,I64 ip)
U0 ICSlashOp(CIntermediateCode *tmpi,CICType t1,I64 r1,I64 d1,I64 op,I64 ip)
{
I64 i;
if (t1&MDF_REG && !op.u8[3])
t1=t1&(MDG_MASK|RTF_UNSIGNED)+RT_I64; //Set to 64 bit,preserving unsigned
i=ICModr1(op.u8[0],t1,r1,d1);
if (tempi->ic_flags&ICF_LOCK && op!=SLASH_OP_MOV && !(t1&MDF_REG))
ICU8(tempi,OC_LOCK_PREFIX);
if (tmpi->ic_flags&ICF_LOCK && op!=SLASH_OP_MOV && !(t1&MDF_REG))
ICU8(tmpi,OC_LOCK_PREFIX);
switch (t1.raw_type) {
case RT_I8:
case RT_U8:
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+op.u8[1]);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+op.u8[1]);
break;
case RT_I16:
case RT_U16:
ICOpSizeRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+op.u8[2]);
ICOpSizeRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+op.u8[2]);
break;
default:
if (i.u8[1]!=0x48 || !op.u8[3])
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+op.u8[2]);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+op.u8[2]);
}
ICModr2(tempi,i,d1,ip+4);
ICModr2(tmpi,i,d1,ip+4);
}
U0 ICPush(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,I64 ip)
U0 ICPush(CIntermediateCode *tmpi,CICType t1,I64 r1,I64 d1,I64 ip)
{
switch (Bsr(t1)) {
case MDf_REG:
if (r1>7)
ICU16(tempi,0x5049+(r1&7)<<8);
ICU16(tmpi,0x5049+(r1&7)<<8);
else
ICU8(tempi,0x50+r1);
ICU8(tmpi,0x50+r1);
return;
case MDf_IMM:
if (MIN_I8<=d1<=MAX_I8)
ICU16(tempi,0x6A+d1<<8);
ICU16(tmpi,0x6A+d1<<8);
else if (MIN_I32<=d1<=MAX_I32) {
ICU8(tempi,0x68);
ICU32(tempi,d1);
ICU8(tmpi,0x68);
ICU32(tmpi,d1);
} else {
ICMov(tempi,MDF_REG+RT_I64,REG_RBX,0,t1,r1,d1,ip);
ICU8(tempi,0x50+REG_RBX);
ICMov(tmpi,MDF_REG+RT_I64,REG_RBX,0,t1,r1,d1,ip);
ICU8(tmpi,0x50+REG_RBX);
}
return;
case MDf_STK:
@@ -319,86 +319,86 @@ U0 ICPush(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,I64 ip)
case RT_I64:
case RT_U64:
case RT_F64:
ICSlashOp(tempi,t1,r1,d1,SLASH_OP_PUSH,ip);
ICSlashOp(tmpi,t1,r1,d1,SLASH_OP_PUSH,ip);
return;
}
break;
}
ICMov(tempi,MDF_REG+RT_I64,REG_RBX,0,t1,r1,d1,ip);
ICU16(tempi,0x5048+REG_RBX<<8);
ICMov(tmpi,MDF_REG+RT_I64,REG_RBX,0,t1,r1,d1,ip);
ICU16(tmpi,0x5048+REG_RBX<<8);
}
U0 ICPushRegs(CIntermediateCode *tempi,I64 mask)
U0 ICPushRegs(CIntermediateCode *tmpi,I64 mask)
{
I64 i;
for (i=0;i<NUM_REGS;i++) {
if (Bt(&mask,i)) {
if (i>7)
ICU16(tempi,0x5049+(i&7)<<8);
ICU16(tmpi,0x5049+(i&7)<<8);
else
ICU8(tempi,0x50+i);
ICU8(tmpi,0x50+i);
}
}
}
U0 ICPop(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,I64 ip)
U0 ICPop(CIntermediateCode *tmpi,CICType t1,I64 r1,I64 d1,I64 ip)
{
switch (Bsr(t1)) {
case MDf_REG:
if (r1>7)
ICU16(tempi,0x5849+(r1&7)<<8);
ICU16(tmpi,0x5849+(r1&7)<<8);
else
ICU8(tempi,0x58+r1);
ICU8(tmpi,0x58+r1);
break;
case MDf_DISP:
case MDf_RIP_DISP32:
case MDf_SIB:
if (t1.raw_type<RT_I64) {
ICU8(tempi,0x58+REG_RBX);
ICMov(tempi,t1,r1,d1,MDF_REG+RT_I64,REG_RBX,0,ip);
ICU8(tmpi,0x58+REG_RBX);
ICMov(tmpi,t1,r1,d1,MDF_REG+RT_I64,REG_RBX,0,ip);
} else
ICSlashOp(tempi,t1,r1,d1,SLASH_OP_POP,ip);
ICSlashOp(tmpi,t1,r1,d1,SLASH_OP_POP,ip);
break;
case MDf_STK:
case MDf_IMM:
ICU8(tempi,0x58+REG_RBX);
ICMov(tempi,t1,r1,d1,MDF_REG+RT_I64,REG_RBX,0,ip);
ICU8(tmpi,0x58+REG_RBX);
ICMov(tmpi,t1,r1,d1,MDF_REG+RT_I64,REG_RBX,0,ip);
break;
default:
ICAddRSP(tempi,8);
ICAddRSP(tmpi,8);
}
}
U0 ICPopRegs(CIntermediateCode *tempi,I64 mask)
U0 ICPopRegs(CIntermediateCode *tmpi,I64 mask)
{
I64 i;
for (i=NUM_REGS-1;i>=0;i--) {
if (Bt(&mask,i)) {
if (i>7)
ICU16(tempi,0x5849+(i&7)<<8);
ICU16(tmpi,0x5849+(i&7)<<8);
else
ICU8(tempi,0x58+i);
ICU8(tmpi,0x58+i);
}
}
}
U0 ICZero(CIntermediateCode *tempi,I64 r)
U0 ICZero(CIntermediateCode *tmpi,I64 r)
{
if (r>7) {
r&=7;
ICU24(tempi,0xC0334D+r<<16+r<<19);
ICU24(tmpi,0xC0334D+r<<16+r<<19);
} else
ICU16(tempi,0xC033+r<<8+r<<11);
ICU16(tmpi,0xC033+r<<8+r<<11);
}
U0 ICTest(CIntermediateCode *tempi,I64 r)
U0 ICTest(CIntermediateCode *tmpi,I64 r)
{
I64 i=0xC08548; //TEST R,R
if (r>7) {
i+=5;
r&=7;
}
ICU24(tempi,i+r<<16+r<<19);
ICU24(tmpi,i+r<<16+r<<19);
}
I64 ICBuiltInFloatConst(F64 d)
@@ -423,57 +423,57 @@ I64 ICBuiltInFloatConst(F64 d)
return 0;
}
U0 ICMov(CIntermediateCode *tempi,
U0 ICMov(CIntermediateCode *tmpi,
CICType t1,I64 r1,I64 d1,CICType t2,I64 r2,I64 d2,I64 ip)
{
I64 i,cnt1,cnt2,b1_rex,b2_rex,b1,b2,b1_modr,b2_modr,
b1_r1,b1_r2,b2_r1,b2_r2,last_start=tempi->ic_cnt;
CIntermediateCode *tempil1;
Bool old_lock=Btr(&tempi->ic_flags,ICf_LOCK);
b1_r1,b1_r2,b2_r1,b2_r2,last_start=tmpi->ic_cnt;
CIntermediateCode *tmpil1;
Bool old_lock=Btr(&tmpi->ic_flags,ICf_LOCK);
switch (Bsr(t1)) {
case MDf_REG:
if (t2&MDF_IMM) {
if (!d2)
ICZero(tempi,r1);
ICZero(tmpi,r1);
else if (0<=d2<=MAX_U8) {
ICZero(tempi,r1);
ICZero(tmpi,r1);
if (r1>7)
ICU24(tempi,d2<<16+(0xB0+r1&7)<<8+0x41);
ICU24(tmpi,d2<<16+(0xB0+r1&7)<<8+0x41);
else if (r1>3)
ICU24(tempi,d2<<16+(0xB0+r1)<<8+0x40);
ICU24(tmpi,d2<<16+(0xB0+r1)<<8+0x40);
else
ICU16(tempi,d2<<8+0xB0+r1);
ICU16(tmpi,d2<<8+0xB0+r1);
} else if (MIN_I8<=d2<0) {
if (r1>7) {
r1&=7;
ICU24(tempi,d2<<16+(0xB0+r1)<<8+0x41);
ICU32(tempi,0xC0BE0F4D+r1<<24+r1<<27);
ICU24(tmpi,d2<<16+(0xB0+r1)<<8+0x41);
ICU32(tmpi,0xC0BE0F4D+r1<<24+r1<<27);
} else {
if (r1>3)
ICU24(tempi,d2<<16+(0xB0+r1)<<8+0x40);
ICU24(tmpi,d2<<16+(0xB0+r1)<<8+0x40);
else
ICU16(tempi,d2<<8+0xB0+r1);
ICU32(tempi,0xC0BE0F48+r1<<24+r1<<27);
ICU16(tmpi,d2<<8+0xB0+r1);
ICU32(tmpi,0xC0BE0F48+r1<<24+r1<<27);
}
} else if (0<=d2<=MAX_U32) {
if (r1>7) {
r1&=7;
ICU16(tempi,(0xB8+r1)<<8+0x41);
ICU32(tempi,d2);
ICU16(tmpi,(0xB8+r1)<<8+0x41);
ICU32(tmpi,d2);
} else {
ICU8(tempi,0xB8+r1);
ICU32(tempi,d2);
ICU8(tmpi,0xB8+r1);
ICU32(tmpi,d2);
}
} else if (MIN_I32<=d2<0) {
if (r1>7) {
r1&=7;
ICU16(tempi,(0xB8+r1)<<8+0x41);
ICU32(tempi,d2);
ICU24(tempi,0xC0634D+r1<<16+r1<<19);
ICU16(tmpi,(0xB8+r1)<<8+0x41);
ICU32(tmpi,d2);
ICU24(tmpi,0xC0634D+r1<<16+r1<<19);
} else {
ICU8(tempi,0xB8+r1);
ICU32(tempi,d2);
ICU24(tempi,0xC06348+r1<<16+r1<<19);
ICU8(tmpi,0xB8+r1);
ICU32(tmpi,d2);
ICU24(tmpi,0xC06348+r1<<16+r1<<19);
}
} else {
i=0xB848;
@@ -481,11 +481,11 @@ U0 ICMov(CIntermediateCode *tempi,
i++;
r1&=7;
}
ICU16(tempi,i+r1<<8);
ICU64(tempi,d2);
ICU16(tmpi,i+r1<<8);
ICU64(tmpi,d2);
}
} else if (t2&MDF_STK)
ICPop(tempi,t1,r1,d1,ip);
ICPop(tmpi,t1,r1,d1,ip);
else {
if (r1==r2 && t2&MDF_REG)
goto move_done;
@@ -494,39 +494,39 @@ U0 ICMov(CIntermediateCode *tempi,
i=ICModr1(r1,t2,r2,d2);
if (t2.raw_type!=RT_U32)
i|=0x4800;
ICRex(tempi,i.u8[1]);
ICRex(tmpi,i.u8[1]);
switch (t2.raw_type) {
case RT_I8:
ICU24(tempi,i.u8[2]<<16+0xBE0F);
ICU24(tmpi,i.u8[2]<<16+0xBE0F);
break;
case RT_I16:
ICU24(tempi,i.u8[2]<<16+0xBF0F);
ICU24(tmpi,i.u8[2]<<16+0xBF0F);
break;
case RT_I32:
ICU16(tempi,i.u8[2]<<8+0x63);
ICU16(tmpi,i.u8[2]<<8+0x63);
break;
case RT_U8:
ICU24(tempi,i.u8[2]<<16+0xB60F);
ICU24(tmpi,i.u8[2]<<16+0xB60F);
break;
case RT_U16:
ICU24(tempi,i.u8[2]<<16+0xB70F);
ICU24(tmpi,i.u8[2]<<16+0xB70F);
break;
default:
ICU16(tempi,i.u8[2]<<8+0x8B);
ICU16(tmpi,i.u8[2]<<8+0x8B);
}
ICModr2(tempi,i,d2,ip+4);
ICModr2(tmpi,i,d2,ip+4);
}
break;
case MDf_STK:
if (tempi->ic_flags&ICF_PUSH_CMP)
ICPopRegs(tempi,1<<REG_RBX);
if (tmpi->ic_flags&ICF_PUSH_CMP)
ICPopRegs(tmpi,1<<REG_RBX);
if (t1.raw_type<t2.raw_type)
ICPush(tempi,t2&MDG_MASK+t1.raw_type,r2,d2,ip);
ICPush(tmpi,t2&MDG_MASK+t1.raw_type,r2,d2,ip);
else
ICPush(tempi,t2,r2,d2,ip);
if (tempi->ic_flags&ICF_PUSH_CMP)
ICPushRegs(tempi,1<<REG_RBX);
ICPush(tmpi,t2,r2,d2,ip);
if (tmpi->ic_flags&ICF_PUSH_CMP)
ICPushRegs(tmpi,1<<REG_RBX);
break;
case MDf_DISP:
case MDf_RIP_DISP32:
@@ -536,22 +536,22 @@ U0 ICMov(CIntermediateCode *tempi,
switch (t1.raw_type) {
case RT_I8:
case RT_U8:
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0xC6);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0xC6);
break;
case RT_U16:
case RT_I16:
ICOpSizeRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0xC7);
ICOpSizeRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0xC7);
break;
default:
ICRex(tempi,i.u8[1]);
ICU16(tempi,i.u8[2]<<8+0xC7);
ICRex(tmpi,i.u8[1]);
ICU16(tmpi,i.u8[2]<<8+0xC7);
}
if (i.u8[0]!=MODR_RIP_REL)
ICModr2(tempi,i,d1,);
ICModr2(tmpi,i,d1,);
else {
i=d1-(ip+tempi->ic_cnt+4);
i=d1-(ip+tmpi->ic_cnt+4);
switch (t1.raw_type) {
case RT_I8:
case RT_U8:
@@ -564,62 +564,62 @@ U0 ICMov(CIntermediateCode *tempi,
default:
i-=4;
}
ICU32(tempi,i);
tempi->ic_flags&=~ICF_CODE_FINAL;
ICU32(tmpi,i);
tmpi->ic_flags&=~ICF_CODE_FINAL;
}
switch (t1.raw_type) {
case RT_I8:
case RT_U8:
ICU8(tempi,d2);
ICU8(tmpi,d2);
break;
case RT_I16:
case RT_U16:
ICU16(tempi,d2);
ICU16(tmpi,d2);
break;
default:
ICU32(tempi,d2);
ICU32(tmpi,d2);
}
} else {
if (t2&MDF_REG)
ICSlashOp(tempi,t1,r1,d1,r2+SLASH_OP_MOV,ip);
ICSlashOp(tmpi,t1,r1,d1,r2+SLASH_OP_MOV,ip);
else {
ICMov(tempi,MDF_REG+RT_I64,REG_RBX,0,t2,r2,d2,ip);
ICMov(tempi,t1,r1,d1,MDF_REG+RT_I64,REG_RBX,0,ip);
ICMov(tmpi,MDF_REG+RT_I64,REG_RBX,0,t2,r2,d2,ip);
ICMov(tmpi,t1,r1,d1,MDF_REG+RT_I64,REG_RBX,0,ip);
}
}
break;
}
move_done:
if (!((t1|t2)&(MDF_STK|MDF_RIP_DISP32))) {
tempil1=tempi;
if (tempi->ic_last_start<0 && (tempil1=OptLag1(tempi)) &&
tempil1->ic_last_start<0)
tempil1=NULL;
if (tempil1) {
if (tempil1==tempi)
cnt1=last_start-tempil1->ic_last_start;
tmpil1=tmpi;
if (tmpi->ic_last_start<0 && (tmpil1=OptLag1(tmpi)) &&
tmpil1->ic_last_start<0)
tmpil1=NULL;
if (tmpil1) {
if (tmpil1==tmpi)
cnt1=last_start-tmpil1->ic_last_start;
else {
if (!(tempil1->ic_flags&ICF_CODE_FINAL))
tempi->ic_flags&=~ICF_CODE_FINAL;
if (!(tmpil1->ic_flags&ICF_CODE_FINAL))
tmpi->ic_flags&=~ICF_CODE_FINAL;
if (last_start)
cnt1=0;
else
cnt1=tempil1->ic_cnt-tempil1->ic_last_start;
cnt1=tmpil1->ic_cnt-tmpil1->ic_last_start;
}
cnt2=tempi->ic_cnt-last_start;
cnt2=tmpi->ic_cnt-last_start;
if (cnt1 && cnt1==cnt2) {
b1_rex=tempil1->ic_body[tempil1->ic_last_start];
b2_rex=tempi->ic_body[last_start];
b1_rex=tmpil1->ic_body[tmpil1->ic_last_start];
b2_rex=tmpi->ic_body[last_start];
if (b1_rex&0x48==0x48 && b2_rex&0x48==0x48) {
for (i=1;i<cnt1;i++)
if ((b1=tempil1->ic_body[tempil1->ic_last_start+i])==
(b2=tempi->ic_body[last_start+i])) {
if ((b1=tmpil1->ic_body[tmpil1->ic_last_start+i])==
(b2=tmpi->ic_body[last_start+i])) {
if (i==1 && (b2==0x89 || b2==0x8B)) {
b1_modr=tempil1->ic_body[tempil1->ic_last_start+2];
b1_modr=tmpil1->ic_body[tmpil1->ic_last_start+2];
b1_r1=b1_modr&7 +Bt(&b1_rex,0)<<3;
b1_r2=b1_modr>>3&7+Bt(&b1_rex,2)<<3;
b2_modr=tempi->ic_body[last_start+2];
b2_modr=tmpi->ic_body[last_start+2];
b2_r1=b2_modr&7 +Bt(&b2_rex,0)<<3;
b2_r2=b2_modr>>3&7+Bt(&b2_rex,2)<<3;
if (cnt1==3 && b2_modr&0xC0==0xC0) {
@@ -638,10 +638,10 @@ move_done:
else if (b2!=0x89 && b2!=0x8B)
break;
else {
b1_modr=tempil1->ic_body[tempil1->ic_last_start+2];
b1_modr=tmpil1->ic_body[tmpil1->ic_last_start+2];
b1_r1=b1_modr&7 +Bt(&b1_rex,0)<<3;
b1_r2=b1_modr>>3&7+Bt(&b1_rex,2)<<3;
b2_modr=tempi->ic_body[last_start+2];
b2_modr=tmpi->ic_body[last_start+2];
b2_r1=b2_modr&7 +Bt(&b2_rex,0)<<3;
b2_r2=b2_modr>>3&7+Bt(&b2_rex,2)<<3;
if (cnt1==3 && b2_modr&0xC0==0xC0) {
@@ -663,62 +663,62 @@ move_done:
}
if (i==cnt1) {
move_redundant:
tempi->ic_cnt=last_start;
tmpi->ic_cnt=last_start;
}
}
}
}
}
if (tempi->ic_cnt>last_start>tempi->ic_last_start)
tempi->ic_last_start=last_start;
BEqu(&tempi->ic_flags,ICf_LOCK,old_lock);
if (tmpi->ic_cnt>last_start>tmpi->ic_last_start)
tmpi->ic_last_start=last_start;
BEqu(&tmpi->ic_flags,ICf_LOCK,old_lock);
}
U0 ICLea(CIntermediateCode *tempi,CICType t1,I64 r1,I64 d1,
U0 ICLea(CIntermediateCode *tmpi,CICType t1,I64 r1,I64 d1,
CICType t2,I64 r2,I64 d2,CCmpCtrl *cc,U8 *buf,I64 ip)
{
I64 i;
CAOTAbsAddr *tempa;
CAOTAbsAddr *tmpa;
switch (Bsr(t1)) {
case MDf_REG:
i=ICModr1(r1,t2,r2,d2);
i.u8[1]|=0x48;
ICU24(tempi,i.u8[2]<<16+0x8D00+i.u8[1]);
ICModr2(tempi,i,d2,ip+4);
ICU24(tmpi,i.u8[2]<<16+0x8D00+i.u8[1]);
ICModr2(tmpi,i,d2,ip+4);
break;
case MDf_STK:
if (t2&MDF_RIP_DISP32) {
ICU8(tempi,0x68);
ICU32(tempi,d2);
ICU8(tmpi,0x68);
ICU32(tmpi,d2);
if (cc->flags&CCF_AOT_COMPILE && buf && !(cc->flags&CCF_NO_ABSS)) {
tempa=CAlloc(sizeof(CAOTAbsAddr));
tempa->next=cc->aotc->abss;
tempa->type=AAT_ADD_U32;
cc->aotc->abss=tempa;
tempa->ip=ip+tempi->ic_cnt-4;
tmpa=CAlloc(sizeof(CAOTAbsAddr));
tmpa->next=cc->aotc->abss;
tmpa->type=AAT_ADD_U32;
cc->aotc->abss=tmpa;
tmpa->ip=ip+tmpi->ic_cnt-4;
}
tempi->ic_flags&=~ICF_CODE_FINAL;
tmpi->ic_flags&=~ICF_CODE_FINAL;
break;
} // Fall thru
default:
ICLea(tempi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,cc,buf,ip);
ICMov(tempi,t1,r1,d1,MDF_REG+RT_I64,REG_RCX,0,ip);
ICLea(tmpi,MDF_REG+RT_I64,REG_RCX,0,t2,r2,d2,cc,buf,ip);
ICMov(tmpi,t1,r1,d1,MDF_REG+RT_I64,REG_RCX,0,ip);
}
}
U0 ICDeref(CIntermediateCode *tempi,I64 ip)
U0 ICDeref(CIntermediateCode *tmpi,I64 ip)
{
CICType t;
t=tempi->r.type.raw_type;
if (t>tempi->a1_type_pointed_to)
t=tempi->a1_type_pointed_to;
if (tempi->a1.type&MDF_REG)
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
MDF_DISP+t,tempi->a1.reg,tempi->a1.disp,ip);
t=tmpi->r.type.raw_type;
if (t>tmpi->a1_type_pointed_to)
t=tmpi->a1_type_pointed_to;
if (tmpi->a1.type&MDF_REG)
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_DISP+t,tmpi->a1.reg,tmpi->a1.disp,ip);
else {
ICMov(tempi,MDF_REG+RT_I64,REG_RCX,0,
tempi->a1.type,tempi->a1.reg,tempi->a1.disp,ip);
ICMov(tempi,tempi->r.type,tempi->r.reg,tempi->r.disp,
ICMov(tmpi,MDF_REG+RT_I64,REG_RCX,0,
tmpi->a1.type,tmpi->a1.reg,tmpi->a1.disp,ip);
ICMov(tmpi,tmpi->r.type,tmpi->r.reg,tmpi->r.disp,
MDF_DISP+t,REG_RCX,0,ip);
}
}
+36 -36
View File
@@ -101,9 +101,9 @@ U0 UndefinedExtern()
throw('UndefExt');
}
U0 UnusedExternWarning(CCmpCtrl *cc,CHashClass *tempc)
U0 UnusedExternWarning(CCmpCtrl *cc,CHashClass *tmpc)
{
PrintWarn("Unused extern '%s'\n",tempc->str);
PrintWarn("Unused extern '%s'\n",tmpc->str);
cc->warning_cnt++;
}
@@ -181,73 +181,73 @@ U0 ICArgPut(CICArg *a,I64 type_pointed_to)
'' CH_SPACE;
}
U0 ICPut(CCmpCtrl *cc,CIntermediateCode *tempi)
U0 ICPut(CCmpCtrl *cc,CIntermediateCode *tmpi)
{
I64 opcode=tempi->ic_code,i;
I64 opcode=tmpi->ic_code,i;
if (opcode>=IC_END_EXP && opcode!=IC_NOP2) {
"%15ts %016X ",intermediate_code_table[opcode].name,tempi->ic_data;
"%15ts %016X ",intermediate_code_table[opcode].name,tmpi->ic_data;
if (cc->pass) {
if (tempi->r.type.mode) {
if (tmpi->r.type.mode) {
"$$PURPLE$$R:$$FG$$";
ICArgPut(&tempi->r,0);
ICArgPut(&tmpi->r,0);
}
if (tempi->a1.type.mode) {
if (tmpi->a1.type.mode) {
"$$PURPLE$$A1:$$FG$$";
if (intermediate_code_table[tempi->ic_code].type==IST_DEREF ||
intermediate_code_table[tempi->ic_code].type==IST_ASSIGN)
ICArgPut(&tempi->a1,tempi->a1_type_pointed_to);
if (intermediate_code_table[tmpi->ic_code].type==IST_DEREF ||
intermediate_code_table[tmpi->ic_code].type==IST_ASSIGN)
ICArgPut(&tmpi->a1,tmpi->a1_type_pointed_to);
else
ICArgPut(&tempi->a1,0);
ICArgPut(&tmpi->a1,0);
}
if (tempi->a2.type.mode) {
if (tmpi->a2.type.mode) {
"$$PURPLE$$A2:$$FG$$";
ICArgPut(&tempi->a2,0);
ICArgPut(&tmpi->a2,0);
}
"$$PURPLE$$:$$FG$$";
}
ICClassPut(tempi->ic_class);
if (tempi->ic_flags & ICF_LOCK)
ICClassPut(tmpi->ic_class);
if (tmpi->ic_flags & ICF_LOCK)
"$$BROWN$$lock$$FG$$ ";
if (tempi->ic_flags & ICF_A2_TO_F64)
if (tmpi->ic_flags & ICF_A2_TO_F64)
"$$LTBLUE$$a2d$$FG$$ ";
if (tempi->ic_flags & ICF_A2_TO_INT)
if (tmpi->ic_flags & ICF_A2_TO_INT)
"$$GREEN$$a2i$$FG$$ ";
if (tempi->ic_flags & ICF_A1_TO_F64)
if (tmpi->ic_flags & ICF_A1_TO_F64)
"$$LTBLUE$$a1d$$FG$$ ";
if (tempi->ic_flags & ICF_A1_TO_INT)
if (tmpi->ic_flags & ICF_A1_TO_INT)
"$$GREEN$$a1i$$FG$$ ";
if (tempi->ic_flags & ICF_R_TO_F64)
if (tmpi->ic_flags & ICF_R_TO_F64)
"$$LTBLUE$$rd$$FG$$ ";
if (tempi->ic_flags & ICF_R_TO_INT)
if (tmpi->ic_flags & ICF_R_TO_INT)
"$$GREEN$$ri$$FG$$ ";
if (tempi->ic_flags & ICF_USE_F64)
if (tmpi->ic_flags & ICF_USE_F64)
"[F64] ";
if (tempi->ic_flags & ICF_USE_UNSIGNED)
if (tmpi->ic_flags & ICF_USE_UNSIGNED)
"[unsigned] ";
if (tempi->ic_flags & ICF_USE_INT)
if (tmpi->ic_flags & ICF_USE_INT)
"[int] ";
if (tempi->ic_flags & ICF_RES_NOT_USED)
if (tmpi->ic_flags & ICF_RES_NOT_USED)
"NO_RES ";
if (tempi->ic_flags & ICF_BY_VAL)
if (tmpi->ic_flags & ICF_BY_VAL)
"BY_VAL ";
if (tempi->ic_flags & ICF_PUSH_RES)
if (tmpi->ic_flags & ICF_PUSH_RES)
"PUSH ";
if (tempi->ic_flags & ICF_PUSH_CMP)
if (tmpi->ic_flags & ICF_PUSH_CMP)
"PUSH_CMP ";
if (tempi->ic_flags & ICF_POP_CMP)
if (tmpi->ic_flags & ICF_POP_CMP)
"POP_CMP ";
if (tempi->ic_flags & ICF_DEL_PREV_INS)
if (tmpi->ic_flags & ICF_DEL_PREV_INS)
"DEL_PREV ";
if (tempi->ic_flags & ICF_PREV_DELETED)
if (tmpi->ic_flags & ICF_PREV_DELETED)
"PREV_DEL ";
for (i=0;i<3;i++) {
if (Bt(&tempi->ic_flags,ICf_DONT_PUSH_FLOAT0+i))
if (Bt(&tmpi->ic_flags,ICf_DONT_PUSH_FLOAT0+i))
"DONT_PUSH#%d ",i;
if (Bt(&tempi->ic_flags,ICf_DONT_POP_FLOAT0+i))
if (Bt(&tmpi->ic_flags,ICf_DONT_POP_FLOAT0+i))
"DONT_POP#%d ",i;
}
if (tempi->ic_flags & ICF_ALT_TEMPLATE)
"ALT_TEMP ";
if (tmpi->ic_flags & ICF_ALT_TEMPLATE)
"ALT_TMP ";
'\n';
}
}
+9 -9
View File
@@ -8,7 +8,7 @@ import CDocEntry *DocPutLine(CDoc *doc,CDocEntry *doc_e);
import I64 DocSize(CDoc *doc);
import Bool DocWrite(CDoc *doc,Bool prompt=FALSE);
extern U8 *CmdLinePmt();
extern I64 HashEntrySize2(CHashSrcSym *temph);
extern I64 HashEntrySize2(CHashSrcSym *tmph);
extern Bool IsLexExpression2Bin(CCmpCtrl *cc,U8 **_machine_code);
extern I64 Lex(CCmpCtrl *cc);
extern I64 LexExpression(CCmpCtrl *cc);
@@ -24,21 +24,21 @@ extern I64 OptPass789A(
extern CHashClass *PrsClass(
CCmpCtrl *cc,I64 keyword,I64 fsp_flags,Bool is_extern);
extern CHashFun *PrsFunJoin(
CCmpCtrl *cc,CHashClass *temp_return,U8 *name,I64 fsp_flags);
CCmpCtrl *cc,CHashClass *tmp_return,U8 *name,I64 fsp_flags);
extern I64 PrsKeyWord(CCmpCtrl *cc);
extern Bool PrsStmt(CCmpCtrl *cc,I64 try_cnt=0,
CCodeMisc *lb_break=NULL,I64 cmp_flags=CMPF_PRS_SEMICOLON);
extern U0 PrsStreamBlk(CCmpCtrl *cc);
extern CHashClass *PrsType(CCmpCtrl *cc,CHashClass **_tempc1,
I64 *_mode,CMemberLst *tempm,U8 **_ident,CHashFun **_fun_ptr,
CHashExport **_tempex,CArrayDim *tempad,I64 fsp_flags);
extern CHashClass *PrsType(CCmpCtrl *cc,CHashClass **_tmpc1,
I64 *_mode,CMemberLst *tmpm,U8 **_ident,CHashFun **_fun_ptr,
CHashExport **_tmpex,CArrayDim *tmpad,I64 fsp_flags);
extern I64 PrsUnaryModifier(CCmpCtrl *cc,CPrsStk *ps,
CMemberLst **_local_var,CArrayDim **_tempad,I64 *unary_post_prec);
CMemberLst **_local_var,CArrayDim **_tmpad,I64 *unary_post_prec);
extern I64 PrsUnaryTerm(
CCmpCtrl *cc,CPrsStk *ps,CMemberLst **_local_var,CArrayDim **_tempad,
CCmpCtrl *cc,CPrsStk *ps,CMemberLst **_local_var,CArrayDim **_tmpad,
I64 *max_prec,I64 *unary_pre_prec,I64 *paren_prec);
extern U0 PrsVarInit2(CCmpCtrl *cc,U8 **_dst,CHashClass *tempc,
CArrayDim *tempad,U8 *data_addr_ip,U8 **_base,Bool data_heap,I64 pass);
extern U0 PrsVarInit2(CCmpCtrl *cc,U8 **_dst,CHashClass *tmpc,
CArrayDim *tmpad,U8 *data_addr_ip,U8 **_base,Bool data_heap,I64 pass);
_extern CMP_TEMPLATES U32 cmp_templates[1];
_extern CMP_TEMPLATES_DONT_POP U32 cmp_templates_dont_pop[1];
_extern CMP_TEMPLATES_DONT_PUSH2 U32 cmp_templates_dont_push2[1];
+61 -61
View File
@@ -1,85 +1,85 @@
I64 HashEntrySize(CHashSrcSym *temph)
I64 HashEntrySize(CHashSrcSym *tmph)
{//Logical size of a std system hash entry.
CDbgInfo *dbg_info;
CBinFile *bfh;
switch (HashTypeNum(temph)) {
switch (HashTypeNum(tmph)) {
case HTt_DEFINE_STR:
return MSize(temph(CHashDefineStr *)->data);
return MSize(tmph(CHashDefineStr *)->data);
case HTt_GLBL_VAR:
case HTt_CLASS:
case HTt_INTERNAL_TYPE:
return temph(CHashClass *)->size;
return tmph(CHashClass *)->size;
case HTt_FUN:
if (dbg_info=temph->dbg_info)
if (dbg_info=tmph->dbg_info)
return dbg_info->body[dbg_info->max_line+1-dbg_info->min_line]
-dbg_info->body[0];
else
return -1;
case HTt_FILE:
return MSize(temph(CHashGeneric *)->user_data0);
return MSize(tmph(CHashGeneric *)->user_data0);
case HTt_MODULE:
if (StrCmp(temph->str,KERNEL_MODULE_NAME))
return MSize(temph(CHashGeneric *)->user_data0);
if (StrCmp(tmph->str,KERNEL_MODULE_NAME))
return MSize(tmph(CHashGeneric *)->user_data0);
else {
bfh=sys_boot_base-sizeof(CBinFile);
return bfh->file_size;
}
case HTt_WORD:
return StrLen(temph->str);
return StrLen(tmph->str);
}
return -1;
}
I64 HashEntrySize2(CHashSrcSym *temph)
I64 HashEntrySize2(CHashSrcSym *tmph)
{//Memory size of a std system hash entry.
CDbgInfo *dbg_info;
I64 res=MSize2(temph);
if (!(temph->type&HTT_DICT_WORD))
res+=MSize2(temph->str);
if (temph->type & HTG_SRC_SYM) {
res+=MSize2(temph->src_link);
res+=MSize2(temph->idx);
res+=MSize2(temph->import_name);
res+=LinkedLstSize(temph->ie_lst);
if (temph->type & (HTT_FUN | HTT_EXPORT_SYS_SYM))
res+=MSize2(temph->dbg_info);
if (temph->type & HTT_CLASS)
res+=MemberLstSize(temph);
else if (temph->type & HTT_FUN) {
res+=MemberLstSize(temph);
if (dbg_info=temph->dbg_info)
I64 res=MSize2(tmph);
if (!(tmph->type&HTT_DICT_WORD))
res+=MSize2(tmph->str);
if (tmph->type & HTG_SRC_SYM) {
res+=MSize2(tmph->src_link);
res+=MSize2(tmph->idx);
res+=MSize2(tmph->import_name);
res+=LinkedLstSize(tmph->ie_lst);
if (tmph->type & (HTT_FUN | HTT_EXPORT_SYS_SYM))
res+=MSize2(tmph->dbg_info);
if (tmph->type & HTT_CLASS)
res+=MemberLstSize(tmph);
else if (tmph->type & HTT_FUN) {
res+=MemberLstSize(tmph);
if (dbg_info=tmph->dbg_info)
//This should be $LK,"MSize",A="MN:MSize"$() but it would crash on AOT .BIN.Z file funs.
res+=dbg_info->body[dbg_info->max_line+1-dbg_info->min_line]
-dbg_info->body[0];
} else if (temph->type&HTT_DEFINE_STR)
res+=MSize2(temph(CHashDefineStr *)->data);
else if (temph->type & HTT_GLBL_VAR) {
res+=LinkedLstSize(temph(CHashGlblVar *)->dim.next);
if (!(temph(CHashGlblVar *)->flags&GVF_ALIAS))
res+=MSize2(temph(CHashGlblVar *)->data_addr);
if (temph(CHashGlblVar *)->fun_ptr)
res+=HashEntrySize2(temph(CHashGlblVar *)->fun_ptr
-temph(CHashGlblVar *)->fun_ptr->ptr_stars_cnt);
} else if (tmph->type&HTT_DEFINE_STR)
res+=MSize2(tmph(CHashDefineStr *)->data);
else if (tmph->type & HTT_GLBL_VAR) {
res+=LinkedLstSize(tmph(CHashGlblVar *)->dim.next);
if (!(tmph(CHashGlblVar *)->flags&GVF_ALIAS))
res+=MSize2(tmph(CHashGlblVar *)->data_addr);
if (tmph(CHashGlblVar *)->fun_ptr)
res+=HashEntrySize2(tmph(CHashGlblVar *)->fun_ptr
-tmph(CHashGlblVar *)->fun_ptr->ptr_stars_cnt);
}
} else if (temph->type & HTT_FILE)
res+=MSize2(temph(CHashGeneric *)->user_data0);
else if (temph->type & HTT_MODULE &&
StrCmp(temph->str,KERNEL_MODULE_NAME))
res+=MSize2(temph(CHashGeneric *)->user_data0);
} else if (tmph->type & HTT_FILE)
res+=MSize2(tmph(CHashGeneric *)->user_data0);
else if (tmph->type & HTT_MODULE &&
StrCmp(tmph->str,KERNEL_MODULE_NAME))
res+=MSize2(tmph(CHashGeneric *)->user_data0);
return res;
}
I64 HashTableSize2(CHashTable *table)
{//Memory size of std system hash table and all entries.
I64 i,res=0;
CHashSrcSym *temph;
CHashSrcSym *tmph;
if (!table)
return 0;
for (i=0;i<=table->mask;i++) {
temph=table->body[i];
while (temph) {
res+=HashEntrySize2(temph);
temph=temph->next;
tmph=table->body[i];
while (tmph) {
res+=HashEntrySize2(tmph);
tmph=tmph->next;
}
}
res+=MSize2(table->body);
@@ -89,23 +89,23 @@ I64 HashTableSize2(CHashTable *table)
U0 MapFileWrite(CHashTable *h,U8 *map_name,U8 drv_let)
{
CHashSrcSym *temph;
CHashSrcSym *tmph;
I64 i,size;
U8 *src_link;
CDoc *doc;
CDocBin *tempb;
CDocBin *tmpb;
CDbgInfo *dbg_info;
doc=DocNew(map_name);
doc->flags|=DOCF_NO_CURSOR;
for (i=0;i<=h->mask;i++) {
temph=h->body[i];
while (temph) {
if (temph->src_link && !(temph->type & (HTF_IMPORT | HTF_PRIVATE))) {
src_link=StrNew(temph->src_link);
tmph=h->body[i];
while (tmph) {
if (tmph->src_link && !(tmph->type & (HTF_IMPORT | HTF_PRIVATE))) {
src_link=StrNew(tmph->src_link);
if (drv_let && StrLen(src_link)>=4)
src_link[3]=drv_let;
if (dbg_info=temph->dbg_info) {
if (dbg_info=tmph->dbg_info) {
size=offset(CDbgInfo.body)+
sizeof(U32)*(dbg_info->max_line+2-dbg_info->min_line);
if (size>MSize(dbg_info)) {
@@ -113,26 +113,26 @@ U0 MapFileWrite(CHashTable *h,U8 *map_name,U8 drv_let)
dbg_info=NULL;
} else {
if (dbg_info->min_line<=dbg_info->max_line) {
tempb=CAlloc(sizeof(CDocBin));
tempb->size=size;
tempb->data=MAlloc(size);
MemCpy(tempb->data,dbg_info,size);
tempb->num=doc->cur_bin_num++;
tempb->use_cnt=1;
QueIns(tempb,doc->bin_head.last);
tmpb=CAlloc(sizeof(CDocBin));
tmpb->size=size;
tmpb->data=MAlloc(size);
MemCpy(tmpb->data,dbg_info,size);
tmpb->num=doc->cur_bin_num++;
tmpb->use_cnt=1;
QueIns(tmpb,doc->bin_head.last);
} else
dbg_info=NULL;
}
}
if (dbg_info)
DocPrint(doc,"$$LK,\"%s\",A=\"%s\",BI=%d$$\n",
temph->str,src_link,tempb->num);
tmph->str,src_link,tmpb->num);
else
DocPrint(doc,"$$LK,\"%s\",A=\"%s\"$$\n",temph->str,src_link);
DocPrint(doc,"$$LK,\"%s\",A=\"%s\"$$\n",tmph->str,src_link);
Free(src_link);
}
temph=temph->next;
tmph=tmph->next;
}
}
DocBinsValidate(doc);
+166 -166
View File
@@ -1,7 +1,7 @@
U8 *LexStmt2Bin(CCmpCtrl *cc,I64 *_type,I64 cmp_flags=0)
{//Compile one cc stmt to bin code.
I64 size,i,j,k,*res=INVALID_PTR;
CCodeCtrl *tempcbh;
CCodeCtrl *tmpcbh;
if (_type) *_type=RT_I64;
Btr(&cc->flags,CCf_PASS_TRACE_PRESENT);
if (cc->aot_depth==2)
@@ -26,8 +26,8 @@ U8 *LexStmt2Bin(CCmpCtrl *cc,I64 *_type,I64 cmp_flags=0)
} else //TODO: too dangerous to del Misc?
QueDel(&cc->coc.coc_head.next);
if (cc->aot_depth==2) {
tempcbh=COCPopNoFree(cc);
COCAppend(cc,tempcbh);
tmpcbh=COCPopNoFree(cc);
COCAppend(cc,tmpcbh);
}
return res;
}
@@ -37,8 +37,8 @@ CAOT *CmpJoin(CCmpCtrl *cc,I64 cmp_flags,U8 *map_name=NULL,U8 mapfile_drv_let=0)
CAOTCtrl *aotc,*old_aot=cc->aotc;
I64 i,j,l;
U8 *buf;
CAOTBinBlk *tempbin;
CAOTImportExport *tempie;
CAOTBinBlk *tmpbin;
CAOTImportExport *tmpie;
Bool okay=TRUE;
CLexHashTableContext *htc=MAlloc(sizeof(CLexHashTableContext));
CAOT *res=CAlloc(sizeof(CAOT)),*parent;
@@ -83,10 +83,10 @@ CAOT *CmpJoin(CCmpCtrl *cc,I64 cmp_flags,U8 *map_name=NULL,U8 mapfile_drv_let=0)
while (cc->token!=TK_EOF) {
buf=LexStmt2Bin(cc,NULL,cmp_flags);
if (buf!=INVALID_PTR) {
tempie=CAlloc(sizeof(CAOTImportExport));
tempie->type=IET_MAIN;
tempie->ip=buf;
QueIns(tempie,res->last_ie);
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->type=IET_MAIN;
tmpie->ip=buf;
QueIns(tmpie,res->last_ie);
}
if (cmp_flags&CMPF_ASM_BLK)
break;
@@ -126,17 +126,17 @@ CAOT *CmpJoin(CCmpCtrl *cc,I64 cmp_flags,U8 *map_name=NULL,U8 mapfile_drv_let=0)
res->buf=aotc->module_org;
}
res->aot_U8s=aotc->num_bin_U8s;
tempbin=aotc->bin;
tmpbin=aotc->bin;
j=0;
l=aotc->num_bin_U8s;
while (tempbin) {
while (tmpbin) {
i=l;
if (i>AOT_BIN_BLK_SIZE)
i=AOT_BIN_BLK_SIZE;
MemCpy(res->buf+j,tempbin->body,i);
MemCpy(res->buf+j,tmpbin->body,i);
j+=i;
l-=i;
tempbin=tempbin->next;
tmpbin=tmpbin->next;
}
}
LinkedLstDel(aotc->bin);
@@ -171,20 +171,20 @@ CAOT *CmpBuf(U8 *buf,U8 *map_name=NULL,
return res;
}
U0 CmpFixUpJITAsm(CCmpCtrl *cc,CAOT *tempaot)
U0 CmpFixUpJITAsm(CCmpCtrl *cc,CAOT *tmpaot)
{
I64 i,ip2=tempaot->buf+tempaot->ip,*str=NULL;
I64 i,ip2=tmpaot->buf+tmpaot->ip,*str=NULL;
U8 *ptr;
CCodeMisc *g_lb;
CAOTAbsAddr *tempa,*tempa1;
CAOTImportExport *tempie,*tempie1;
CHashExport *tempex;
CAOTAbsAddr *tmpa,*tmpa1;
CAOTImportExport *tmpie,*tmpie1;
CHashExport *tmpex;
tempa=tempaot->abss;
while (tempa) {
tempa1=tempa->next;
ptr=ip2+tempa->ip;
switch [tempa->type] {
tmpa=tmpaot->abss;
while (tmpa) {
tmpa1=tmpa->next;
ptr=ip2+tmpa->ip;
switch [tmpa->type] {
case AAT_ADD_U8: *ptr(U8 *) +=ip2; break;
case AAT_SUB_U8: *ptr(U8 *) -=ip2; break;
case AAT_ADD_U16: *ptr(U16 *)+=ip2; break;
@@ -194,63 +194,63 @@ U0 CmpFixUpJITAsm(CCmpCtrl *cc,CAOT *tempaot)
case AAT_ADD_U64: *ptr(I64 *)+=ip2; break;
case AAT_SUB_U64: *ptr(I64 *)-=ip2; break;
}
Free(tempa);
tempa=tempa1;
Free(tmpa);
tmpa=tmpa1;
}
tempie=tempaot->next_ie;
while (tempie!=&tempaot->next_ie) {
tempie1=tempie->next;
if (tempie->str) {
tmpie=tmpaot->next_ie;
while (tmpie!=&tmpaot->next_ie) {
tmpie1=tmpie->next;
if (tmpie->str) {
Free(str);
str=tempie->str;
str=tmpie->str;
}
switch (tempie->type) {
switch (tmpie->type) {
case IET_REL32_EXPORT:
case IET_IMM32_EXPORT:
case IET_REL64_EXPORT:
case IET_IMM64_EXPORT:
tempex=CAlloc(sizeof(CHashExport));
tempex->str=str;
tmpex=CAlloc(sizeof(CHashExport));
tmpex->str=str;
str=NULL;
tempex->type=HTT_EXPORT_SYS_SYM|HTF_IMM;
if (tempie->type==IET_IMM32_EXPORT||tempie->type==IET_IMM64_EXPORT)
tempex->val=tempie->ip;
tmpex->type=HTT_EXPORT_SYS_SYM|HTF_IMM;
if (tmpie->type==IET_IMM32_EXPORT||tmpie->type==IET_IMM64_EXPORT)
tmpex->val=tmpie->ip;
else
tempex->val=tempie->ip+ip2;
tempex->src_link=tempie->src_link;
tempie->src_link=NULL;
HashAdd(tempex,Fs->hash_table);
SysSymImportsResolve(tempex->str);
tmpex->val=tmpie->ip+ip2;
tmpex->src_link=tmpie->src_link;
tmpie->src_link=NULL;
HashAdd(tmpex,Fs->hash_table);
SysSymImportsResolve(tmpex->str);
break;
case IET_REL_I0...IET_IMM_I64:
if (tempie->str) {
if (tempie->flags&IEF_GOTO_LABEL) {
if (tmpie->str) {
if (tmpie->flags&IEF_GOTO_LABEL) {
if(!(g_lb=COCGoToLabelFind(cc,str)))
"Unresolved Reference:%s\n",str;
else {
g_lb->use_cnt++;
g_lb=OptLabelFwd(g_lb);
i=g_lb->addr+tempaot->buf;
i=g_lb->addr+tmpaot->buf;
}
tempex=NULL;
tmpex=NULL;
} else {
if (!(tempex=HashFind(str,Fs->hash_table,
if (!(tmpex=HashFind(str,Fs->hash_table,
HTG_ALL-HTT_IMPORT_SYS_SYM)))
"Unresolved Reference:%s\n",str;
else {
if (tempex->type & HTT_FUN)
i=tempex(CHashFun *)->exe_addr;
else if (tempex->type & HTT_GLBL_VAR)
i=tempex(CHashGlblVar *)->data_addr;
if (tmpex->type & HTT_FUN)
i=tmpex(CHashFun *)->exe_addr;
else if (tmpex->type & HTT_GLBL_VAR)
i=tmpex(CHashGlblVar *)->data_addr;
else
i=tempex->val;
i=tmpex->val;
}
g_lb=NULL;
}
}
if (tempex || g_lb) {
ptr=tempie->ip+ip2;
switch [tempie->type] {
if (tmpex || g_lb) {
ptr=tmpie->ip+ip2;
switch [tmpie->type] {
case IET_REL_I0:
case IET_IMM_U0:
break;
@@ -288,32 +288,32 @@ U0 CmpFixUpJITAsm(CCmpCtrl *cc,CAOT *tempaot)
}
break;
}
Free(tempie->src_link);
Free(tempie);
tempie=tempie1;
Free(tmpie->src_link);
Free(tmpie);
tmpie=tmpie1;
}
Free(str);
if (!cc->aot_depth && Bt(&cc->opts,OPTf_TRACE))
Un(ip2,tempaot->aot_U8s,64);
QueRem(tempaot);
Free(tempaot);
Un(ip2,tmpaot->aot_U8s,64);
QueRem(tmpaot);
Free(tmpaot);
}
U0 CmpFixUpAOTAsm(CCmpCtrl *cc,CAOT *tempaot)
U0 CmpFixUpAOTAsm(CCmpCtrl *cc,CAOT *tmpaot)
{
CAOTCtrl *aotc=cc->aotc;
I64 i,ip2=tempaot->ip+cc->aotc->ip;
I64 i,ip2=tmpaot->ip+cc->aotc->ip;
U8 *ptr;
CCodeMisc *g_lb=NULL;
CAOTAbsAddr *tempa,*tempa1;
CAOTImportExport *tempie,*tempie1;
CAOTAbsAddr *tmpa,*tmpa1;
CAOTImportExport *tmpie,*tmpie1;
tempa=tempaot->abss;
while (tempa) {
tempa1=tempa->next;
tempa->next=aotc->abss;
ptr=tempaot->buf+tempaot->ip+tempa->ip;
switch [tempa->type] {
tmpa=tmpaot->abss;
while (tmpa) {
tmpa1=tmpa->next;
tmpa->next=aotc->abss;
ptr=tmpaot->buf+tmpaot->ip+tmpa->ip;
switch [tmpa->type] {
case AAT_ADD_U8: *ptr(U8 *)+=ip2; break;
case AAT_SUB_U8: *ptr(U8 *)-=ip2; break;
case AAT_ADD_U16: *ptr(U16 *)+=ip2; break;
@@ -323,20 +323,20 @@ U0 CmpFixUpAOTAsm(CCmpCtrl *cc,CAOT *tempaot)
case AAT_ADD_U64: *ptr(I64 *)+=ip2; break;
case AAT_SUB_U64: *ptr(I64 *)-=ip2; break;
}
aotc->abss=tempa;
tempa->ip+=ip2;
tempa=tempa1;
aotc->abss=tmpa;
tmpa->ip+=ip2;
tmpa=tmpa1;
}
tempie=tempaot->next_ie;
while (tempie!=&tempaot->next_ie) {
tempie1=tempie->next;
QueRem(tempie);
if (IET_REL_I0<=tempie->type<=IET_IMM_I64) {
if (tempie->str) {
if (tempie->flags&IEF_GOTO_LABEL) {
if(!(g_lb=COCGoToLabelFind(cc,tempie->str)))
"Unresolved Reference:%s\n",tempie->str;
tmpie=tmpaot->next_ie;
while (tmpie!=&tmpaot->next_ie) {
tmpie1=tmpie->next;
QueRem(tmpie);
if (IET_REL_I0<=tmpie->type<=IET_IMM_I64) {
if (tmpie->str) {
if (tmpie->flags&IEF_GOTO_LABEL) {
if(!(g_lb=COCGoToLabelFind(cc,tmpie->str)))
"Unresolved Reference:%s\n",tmpie->str;
else {
g_lb->use_cnt++;
g_lb=OptLabelFwd(g_lb);
@@ -347,10 +347,10 @@ U0 CmpFixUpAOTAsm(CCmpCtrl *cc,CAOT *tempaot)
} else
g_lb=NULL;
ptr=tempaot->buf+tempaot->ip+tempie->ip;
ptr=tmpaot->buf+tmpaot->ip+tmpie->ip;
if (g_lb) {
i=g_lb->addr+tempaot->buf;
switch [tempie->type] {
i=g_lb->addr+tmpaot->buf;
switch [tmpie->type] {
case IET_REL_I0:
case IET_IMM_U0:
break;
@@ -385,10 +385,10 @@ U0 CmpFixUpAOTAsm(CCmpCtrl *cc,CAOT *tempaot)
*ptr(I64 *)=i;
break;
}
Free(tempie->src_link);
Free(tempie);
Free(tmpie->src_link);
Free(tmpie);
} else {
switch (tempie->type) {
switch (tmpie->type) {
start:
case IET_REL32_EXPORT:
case IET_IMM32_EXPORT:
@@ -406,13 +406,13 @@ U0 CmpFixUpAOTAsm(CCmpCtrl *cc,CAOT *tempaot)
case IET_REL_I32: *ptr(U32 *)-=ip2; break;
case IET_REL_I64: *ptr(I64 *)-=ip2; break;
end:
tempie->ip+=ip2;
tmpie->ip+=ip2;
break;
}
tempie->aot=NULL;
QueIns(tempie,tempaot->parent_aot->last_ie);
tmpie->aot=NULL;
QueIns(tmpie,tmpaot->parent_aot->last_ie);
}
tempie=tempie1;
tmpie=tmpie1;
}
}
@@ -420,115 +420,115 @@ I64 Cmp(U8 *filename,U8 *map_name=NULL,U8 *out_name=NULL,U8 mapfile_drv_let=0)
{//AOT Compile HC or PRJ file a and output BIN file. Returns err_cnt.
U8 *ptr,*fbuf=NULL,*fbuf2=NULL,*fbuf3=NULL,
*patch_table=MAlloc(0x20000);
CAOT *tempaot;
CAOT *tmpaot;
I64 i,cnt,size=0,error_cnt=0,warning_cnt=0,aot_U8s=0;
CBinFile *bfh;
CAOTImportExport *tempie,*tempie1;
CAOTAbsAddr *tempa,*tempa1;
CAOTHeapGlblRef *temphgr,*temphgr1;
CAOTHeapGlbl *temphg,*temphg1;
CAOTImportExport *tmpie,*tmpie1;
CAOTAbsAddr *tmpa,*tmpa1;
CAOTHeapGlblRef *tmphgr,*tmphgr1;
CAOTHeapGlbl *tmphg,*tmphg1;
fbuf=DftExt(filename,"PRJ.Z");
fbuf2=MStrPrint("#include \"%s\"",fbuf);
if (map_name)
fbuf3=DftExt(map_name,"MAP.Z");
if (tempaot=CmpBuf(fbuf2,fbuf3,&error_cnt,&warning_cnt,mapfile_drv_let)) {
aot_U8s=tempaot->aot_U8s;
if (tmpaot=CmpBuf(fbuf2,fbuf3,&error_cnt,&warning_cnt,mapfile_drv_let)) {
aot_U8s=tmpaot->aot_U8s;
ptr=patch_table;
//See $LK,"Load",A="MN:Load"$()
cnt=0;
tempa=tempaot->abss;
while (tempa) {
if (!(tempa->type&IEF_IMM_NOT_REL))
tmpa=tmpaot->abss;
while (tmpa) {
if (!(tmpa->type&IEF_IMM_NOT_REL))
cnt++;
tempa=tempa->next;
tmpa=tmpa->next;
}
if (cnt) {
*ptr++=IET_ABS_ADDR;
*ptr(U32 *)++=cnt;
*ptr++=0;
tempa=tempaot->abss;
while (tempa) {
tempa1=tempa->next;
if (!(tempa->type&IEF_IMM_NOT_REL))
*ptr(U32 *)++ =tempa->ip;
Free(tempa);
tempa=tempa1;
tmpa=tmpaot->abss;
while (tmpa) {
tmpa1=tmpa->next;
if (!(tmpa->type&IEF_IMM_NOT_REL))
*ptr(U32 *)++ =tmpa->ip;
Free(tmpa);
tmpa=tmpa1;
}
}
temphg=tempaot->heap_glbls;
while (temphg) {
temphg1=temphg->next;
tmphg=tmpaot->heap_glbls;
while (tmphg) {
tmphg1=tmphg->next;
cnt=0;
temphgr=temphg->references;
while (temphgr) {
tmphgr=tmphg->references;
while (tmphgr) {
cnt++;
temphgr=temphgr->next;
tmphgr=tmphgr->next;
}
if (cnt) {
*ptr++=IET_DATA_HEAP;
*ptr(U32 *)++=cnt;
if (temphg->str) {
i=StrLen(temphg->str);
MemCpy(ptr,temphg->str,i+1);
Free(temphg->str);
if (tmphg->str) {
i=StrLen(tmphg->str);
MemCpy(ptr,tmphg->str,i+1);
Free(tmphg->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;
*ptr(I64 *)++=tmphg->size;
tmphgr=tmphg->references;
while (tmphgr) {
tmphgr1=tmphgr->next;
*ptr(U32 *)++=tmphgr->ip;
Free(tmphgr);
tmphgr=tmphgr1;
}
}
Free(temphg);
temphg=temphg1;
Free(tmphg);
tmphg=tmphg1;
}
//Do exports first
tempie=tempaot->next_ie;
while (tempie!=&tempaot->next_ie) {
tempie1=tempie->next;
if (!tempie->type || IET_REL32_EXPORT<=tempie->type<=IET_IMM64_EXPORT) {
QueRem(tempie);
*ptr++=tempie->type;
*ptr(U32 *)++=tempie->ip;
if (tempie->str) {
i=StrLen(tempie->str);
MemCpy(ptr,tempie->str,i+1);
Free(tempie->str);
tmpie=tmpaot->next_ie;
while (tmpie!=&tmpaot->next_ie) {
tmpie1=tmpie->next;
if (!tmpie->type || IET_REL32_EXPORT<=tmpie->type<=IET_IMM64_EXPORT) {
QueRem(tmpie);
*ptr++=tmpie->type;
*ptr(U32 *)++=tmpie->ip;
if (tmpie->str) {
i=StrLen(tmpie->str);
MemCpy(ptr,tmpie->str,i+1);
Free(tmpie->str);
ptr+=i+1;
} else
*ptr++=0;
Free(tempie->src_link);
Free(tempie);
Free(tmpie->src_link);
Free(tmpie);
}
tempie=tempie1;
tmpie=tmpie1;
}
//Do imports second
tempie=tempaot->next_ie;
while (tempie!=&tempaot->next_ie) {
tempie1=tempie->next;
QueRem(tempie);
*ptr++=tempie->type;
if (tempie->aot)
tempie->ip+=tempie->aot->ip2;
*ptr(U32 *)++=tempie->ip;
if (tempie->str) {
i=StrLen(tempie->str);
MemCpy(ptr,tempie->str,i+1);
Free(tempie->str);
tmpie=tmpaot->next_ie;
while (tmpie!=&tmpaot->next_ie) {
tmpie1=tmpie->next;
QueRem(tmpie);
*ptr++=tmpie->type;
if (tmpie->aot)
tmpie->ip+=tmpie->aot->ip2;
*ptr(U32 *)++=tmpie->ip;
if (tmpie->str) {
i=StrLen(tmpie->str);
MemCpy(ptr,tmpie->str,i+1);
Free(tmpie->str);
ptr+=i+1;
} else
*ptr++=0;
Free(tempie->src_link);
Free(tempie);
tempie=tempie1;
Free(tmpie->src_link);
Free(tmpie);
tmpie=tmpie1;
}
*ptr++=IET_END;
@@ -541,11 +541,11 @@ I64 Cmp(U8 *filename,U8 *map_name=NULL,U8 *out_name=NULL,U8 mapfile_drv_let=0)
#assert sizeof(CBinFile)-2<=MAX_I8
bfh->reserved=0;
bfh->bin_signature=BIN_SIGNATURE_VAL;
bfh->module_org=tempaot->module_org;
bfh->module_align_bits=tempaot->max_align_bits;
bfh->module_org=tmpaot->module_org;
bfh->module_align_bits=tmpaot->max_align_bits;
bfh->patch_table_offset=sizeof(CBinFile)+aot_U8s;
bfh->file_size=size;
MemCpy(bfh(U8 *)+sizeof(CBinFile),tempaot->buf,aot_U8s);
MemCpy(bfh(U8 *)+sizeof(CBinFile),tmpaot->buf,aot_U8s);
MemCpy(bfh(U8 *)+sizeof(CBinFile)+aot_U8s,patch_table,
size-aot_U8s-sizeof(CBinFile));
Free(fbuf2);
@@ -555,9 +555,9 @@ I64 Cmp(U8 *filename,U8 *map_name=NULL,U8 *out_name=NULL,U8 mapfile_drv_let=0)
fbuf2=ChgExt(fbuf,"BIN.Z");
FileWrite(fbuf2,bfh,size);
Free(bfh);
Free(tempaot->buf);
QueDel(tempaot);
Free(tempaot);
Free(tmpaot->buf);
QueDel(tmpaot);
Free(tmpaot);
}
Free(patch_table);
Free(fbuf);
@@ -575,7 +575,7 @@ I64 ExePutS(U8 *buf,U8 *filename=NULL,
Bool okay=TRUE;
CCmpCtrl *cc;
if (!filename)
filename=blkdev.temp_filename;
filename=blkdev.tmp_filename;
cc=CmpCtrlNew(buf,ccf_flags|CCF_DONT_FREE_BUF,filename);
if (Fs->last_cc!=&Fs->next_cc) {
cc->opts=Fs->last_cc->opts;
@@ -633,7 +633,7 @@ I64 ExePutS2(U8 *buf,U8 *filename=NULL,I64 ccf_flags=0)
I64 res;
CCmpCtrl *cc;
if (!filename)
filename=blkdev.temp_filename;
filename=blkdev.tmp_filename;
cc=CmpCtrlNew(buf,ccf_flags|CCF_DONT_FREE_BUF,filename);
if (Fs->last_cc!=&Fs->next_cc)
cc->opts=Fs->last_cc->opts;
+9 -6
View File
@@ -69,11 +69,11 @@ U0 StreamPrint(U8 *fmt,...)
{//Injects text into the compile stream. Used in #exe{} blocks.
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv),*st;
CCmpCtrl *cc=Fs->last_cc;
CStreamBlk *tempe=cc->last_stream_blk;
if (tempe!=&cc->next_stream_blk) {
st=MStrPrint("%s%s",tempe->body,buf);
Free(tempe->body);
tempe->body=st;
CStreamBlk *tmpe=cc->last_stream_blk;
if (tmpe!=&cc->next_stream_blk) {
st=MStrPrint("%s%s",tmpe->body,buf);
Free(tmpe->body);
tmpe->body=st;
} else
PrintErr("No exe{} blk\n");
Free(buf);
@@ -140,9 +140,12 @@ U8 *CmdLinePmt()
Free(st);
}
'>';
if (IsDbg&&IsRaw)
if (IsDbgMode&&IsRaw)
RawDr;
LBts(&Fs->task_flags,TASKf_CMD_LINE_PMT);
st=GetStr(,,GSF_SHIFT_ESC_EXIT);
LBtr(&Fs->task_flags,TASKf_CMD_LINE_PMT);
i=StrLen(st);
res=MAlloc(i+1+2);
Binary file not shown.
+75 -77
View File
@@ -51,7 +51,7 @@ $LK,"LexPopNoRestore",A="FL:::/Compiler/LexLib.HC.Z,38",BI=40$
$LK,"ExePrint",A="FL:::/Compiler/CMain.HC.Z,605",BI=41$
$LK,"SLASH_OP_NEG",A="FL:::/Compiler/BackLib.HC.Z,247"$
$LK,"PrsVarLst",A="FL:::/Compiler/PrsVar.HC.Z,416",BI=42$
$LK,"PrsAsmDefine",A="FL:::/Compiler/Asm.HC.Z,814",BI=43$
$LK,"PrsAsmDefine",A="FL:::/Compiler/Asm.HC.Z,813",BI=43$
$LK,"PrsAddOp",A="FL:::/Compiler/PrsExp.HC.Z,15",BI=44$
$LK,"LexWarn",A="FL:::/Compiler/CExcept.HC.Z,65",BI=45$
$LK,"PE_POP_ALL1",A="FL:::/Compiler/PrsExp.HC.Z,12"$
@@ -99,7 +99,7 @@ $LK,"CmpBuf",A="FL:::/Compiler/CMain.HC.Z,157",BI=75$
$LK,"CMP_TEMPLATES_DONT_PUSH_POP",A="FL:::/Compiler/Templates.HC.Z,385"$
$LK,"ICAddEct",A="FL:::/Compiler/BackA.HC.Z,1",BI=76$
$LK,"ICToF64",A="FL:::/Compiler/BackB.HC.Z,283",BI=77$
$LK,"PrsBinFile",A="FL:::/Compiler/Asm.HC.Z,888",BI=78$
$LK,"PrsBinFile",A="FL:::/Compiler/Asm.HC.Z,887",BI=78$
$LK,"HashTableSize2",A="FL:::/Compiler/CHash.HC.Z,72",BI=79$
$LK,"HashEntrySize2",A="FL:::/Compiler/CHash.HC.Z,33",BI=80$
$LK,"Ui",A="FL:::/Compiler/UAsm.HC.Z,238",BI=81$
@@ -248,7 +248,7 @@ $LK,"CmpJoin",A="FL:::/Compiler/CMain.HC.Z,35",BI=194$
$LK,"PrsPop2",A="FL:::/Compiler/PrsLib.HC.Z,16",BI=195$
$LK,"CMP_TEMPLATES",A="FL:::/Compiler/Templates.HC.Z,4"$
$LK,"MODR_D8_INDIRECT_REG",A="FL:::/Compiler/BackLib.HC.Z,128"$
$LK,"PrsAsmBlk",A="FL:::/Compiler/Asm.HC.Z,904",BI=196$
$LK,"PrsAsmBlk",A="FL:::/Compiler/Asm.HC.Z,903",BI=196$
$LK,"PrsAsmArg",A="FL:::/Compiler/Asm.HC.Z,35",BI=197$
$LK,"LexFirstRem",A="FL:::/Compiler/Lex.HC.Z,277",BI=198$
$LK,"MemberClassBaseFind",A="FL:::/Compiler/LexLib.HC.Z,87",BI=199$
@@ -340,91 +340,89 @@ $LK,"PrsDotDotDot",A="FL:::/Compiler/PrsVar.HC.Z,381",BI=266$
$LK,"ICMulEqu",A="FL:::/Compiler/BackA.HC.Z,322",BI=267$
$LK,"AsmPrsInsFlags",A="FL:::/Compiler/AsmInit.HC.Z,1",BI=268$
$LK,"PrsNoWarn",A="FL:::/Compiler/PrsStmt.HC.Z,799",BI=269$
H2@2#2#;#A#\#a#Œ#�#Ã#­#Ó#Ú#ë#ş#¨­Ó§c§c½cÅcĞcÜcücŞc ddd;dBdmd{d{d¨dÊdâdÏdñde
e4e;efefeme‘e§e§e§e±eH>Lçşçşÿ ÿÿÿÿÿ2ÿJÿJÿTÿp©Á÷÷!#*068>DZm|�ƒˆ’§½Ğõ(FåFåZå{ååå‡å8åå å$å/å8å?åAåFåd`µşØşØÙ Ù-Ù/Ù<Ù>ÙJÙJÙWÙYÙfÙhÙtÙtÙ�Ù�Ù�٨ٯپÙÉÙÏÙÔÙÖÙâÙéÙøÙÚ ÚÚÚÚLÚrÚ‚Ú’Ú¢Ú¤Ú´ÚÄÚÔÚÔÚÙÚìÚóÚúÚúÚúÚúÚÛÛ#Û)Û/Û5Û9Û9Û9ÛfÛmÛƒÛ�Û•Û›Û¡Û£Û£Û±ÛDö۶ÛÌÛÏÛÒÛßÛåÛòÛõÛøÛşÛÜ
H2@2#2#;#A#\#a#Œ#�#Ã#­#Ó#Ú#ë#ş#¨­ÓÇcÇcİcåcğcücdşc+d1d1d[dbd�d›d›dÈdêdeïde=e*eTe[e†e†e�e±eÇeÇeÇeÑeH>Lÿÿ!ÿ+ÿ/ÿ3ÿ8ÿ:ÿRÿjÿjÿtÿp©ÁACJPVX^dz�œ¡£¨²Çİğ'(FåFåZå{ååå‡å8åå å$å/å8å?åAåFåd`µşØşØÙ Ù-Ù/Ù<Ù>ÙJÙJÙWÙYÙfÙhÙtÙtÙ�Ù�Ù�٨ٯپÙÉÙÏÙÔÙÖÙâÙéÙøÙÚ ÚÚÚÚLÚrÚ‚Ú’Ú¢Ú¤Ú´ÚÄÚÔÚÔÚÙÚìÚóÚúÚúÚúÚúÚÛÛ#Û)Û/Û5Û9Û9Û9ÛfÛmÛƒÛ�Û•Û›Û¡Û£Û£Û±ÛDö۶ÛÌÛÏÛÒÛßÛåÛòÛõÛøÛşÛÜ
Ü ,cj‹‹‹ ‹+‹6‹<‹B‹
hlfft‰� P z7z7ˆ7—7³7¹7Ë7Ë7Ö7ß7å7ì7ò7 ”;\?L?LGLKLdL~L›L¼LÅLÖLúLMM0M?MHMUM\M�MŸM£M«M«M¾MÎMÒMÖM␍Œ×öŞŞş
hlfft‰� P z7z7ˆ7—7³7¹7Ë7Ë7Ö7ß7å7ì7ò7 ”;\_L_LgLkL„L�L»LÜLåLöLM1M1MPM_MhMuM|M®M¿MÃMËMËMŞMîMòMöM␍Œ×öŞŞş
$$PfzˆŸ¥±Äàéùû     |1’"’"¨"±"¼"Ö"Ö"Ù"è"î"÷"ù"ÿ"#
###!#$#$#.#0 'P‰P‰^‰~‰„‰Š‰Š‰�‰„“°ğ¡ğ¡¢ ¢¢¢:¢M¢T¢e¢Š¢•¢ ¢¢¢­¢Ò¢İ¢è¢ê¢ñ¢ú¢ü¢££8£("wáwá†á�á¸á¸á¾á áá&á<áBá ˆx´x´�´¤´»´Ç´Ò´ä´õ´æ´ä´µ0µ<µCµIµUµ_µfµmµqµsµyµ…µ�µ–µ�µ¡µ¡µ«µ°µ»µÍµŞµÏµÍµşµ+¶2¶8¶D¶N¶U¶\¶`¶b¶h¶t¶~¶…¶Œ¶���«¶»¶Í¶Ş¶Ï¶Í¶ş¶ ·+·2·8·D·N·U·\·`·b·h·t·~·…·Œ·�·�·š·ª·¼·Í·¾·¼·í·ô·ú·¸¸¸¸"¸$¸*¸6¸@¸G¸N¸R¸R¸\¸j¸s¸Œ¸˜¸œ¸œ¸Ÿ¸¨¸¹Ô „ „<„
ªD„S„v„�„“„š„«„³„·„º„Ȅ̄ø„ø„␍…………#…'…4…4…@…H…L…Y…Y…Y…u…€…‘…‘…–…®…½……ȅӅ؅؅݅õ…† ††† † †-†6†B†J†R†Z†]†c†h†q†ƒ†Œ†�†­†­†²†º††ņˆˆІІІÖ†Ù†à†ë†‡%‡<‡I‡Q‡Y‡e‡q‡w‡~‡‡‡‹‡�‡š‡ ‡§‡¬‡¬‡º‡ʇʇׇׇ߇ç‡ğ‡ÿ‡ˆˆ ˆˆˆ$ˆ*ˆ5ˆ:ˆ:ˆIˆTˆfˆlˆtˆzˆˆŠˆœˆ¢ˆªˆ°ˆµˆµˆɈψÚˆàˆâˆòˆøˆøˆ‰D‰I‰I‰]‰c‰y‰Љ�‰•‰®‰´‰ĉ̉Ô‰Ú‰߉߉ó‰ù‰Š Š&Š+ŠDŠJŠZŠbŠjŠpŠuŠuЋБЧЏоŠÊÒŠØŠéŠñŠùŠÿŠ‹ ‹ ‹!‹'‹=‹N‹T‹V‹e‹k‹u‹}‹…‹‹‹’‹’‹’‹¤‹­‹¾‹΋΋Ó‹Ó‹á‹é‹ú‹␍ŒŒŒ"Œ(Œ8Œ>ŒFŒLŒLŒLŒQŒQŒQŒQŒQŒpŒ|Œ�Œ�Œ�Œ™Œ¤Œ­Œ¸ŒÃŒÈŒÈŒŞŒäŒúŒ ���(�.�3�L�j�j�o�o�{�ƒ�†�Œ�’�—�—�»�Ã�Ë�Û�á�ç�ç�ø�����'�/�2�9�?�D�D�d�l�|�‚�‰�§��¾�Ö�Ş�á�è�î���&�.�1�8�>�>�>�]�m�y���„�‹�‘�¡�°�¼�×�ß�â�é�ï���.�6�9�@�F�F�F�F�K�K�T�d�z�€�˜�«�±��È�Î�Ó�ï�õ�‘ ‘ ‘‘‘B‘J‘Z‘`‘g‘g‘g‘l‘l‘u‘�‘£‘©‘Á‘Ô‘Ú‘ß‘
’’#’Z’l’‰’‘’—’œ’œ’¶’’Βْْޒޒø’““““ “ “:“F“R“]“]“b“b“x“~“Š“�“•“§“­“²“Á“͓ٓߓå“ì“ÿ“
”” ”'”*”0”6”;”O”^”f”~”†”‰”�”•”­”µ”Õ”ï”÷”ú”•••• •,•4•7•>•D•I•[•j•r•Š•’•••œ•¢•º••á•û•––␍–––#–,–8–@–C–I–O–T–h–w––™–¡–¤–ª–°–È–Ğ–ò–——— —%—%—6—?—K—S—V—]—c—h—z—‰—‘—¬—´—·—¾—Ä—Ü—ä—˜#˜+˜.˜5˜;˜;˜;˜;˜;˜@˜@˜V˜\˜h˜n˜s˜…˜‹˜�˜�˜ª˜³˜¿˜ǘʘјטܘî˜ı˜™™%™(™/™5™M™U™t™�™–™™™ ™¦™¦™¦™·™À™Ì™Ô™×™Ş™ä™û™
šš1š9š<šCšIšašmš�š¬š´š·š¾šÄšÄšÄšÄšÄšÉšÉšÜš÷šıš›␍›␍› ›6›<›G›I›I›\››…›�›�›¢›«›¼›Á›Ó›ã›ã›è›è›û›œœ%œ4œ9œ9œLœbœhœvœ…œŠœŠœ œ¦œÜۜۜ� ���%�4�4�9�9�O�U�r�Š�Š�´�º�¿�Ë�Ô�ã�ã�è�è�ş��!�9�9�c�i�n�z�ƒ�’�’�—�—�­�³�Ğ�è�è�ŸŸŸ&Ÿ/Ÿ:Ÿ:Ÿ:Ÿ:Ÿ?ŸMŸVŸgŸiŸ{ŸˆŸˆŸˆŸ˜Ÿ¨Ÿ­ŸÑŸİŸŞŸãŸøŸ % I Y _ _ _ d i ~ ‘ Ï ß å ç ì ı  ¡>¡F¡L¡N¡S¡Z¡Z¡c¡u¡ˆ¡‘¡ ¡ ¡¥¡ª¡¹¡¡Í¡Ï¡Ø¡ã¡ã¡¢ ¢¢¢$¢*¢:¢@¢H¢S¢Y¢Y¢^¢c¢j¢q¢x¢¢ˆ¢—¢—¢—¢œ¢œ¢œ¢®¢³¢³¢Å¢Ğ¢Ø¢à¢æ¢æ¢æ¢ë¢ë¢ö¢£
££ £+£2£8£=£=£H£Y£\£h£q£}£„£Š£�£�£�£�£”£™£™£¤£¨£¨£´£½£À£À£Ë£Í£ã£ê£ğ£ÿ£
¤¤¤'¤+¤+¤7¤@¤C¤C¤N¤P¤f¤m¤s¤{¤†¤‘¤—¤¡¤¤¤¨¤¨¤°¤·¤º¤¼¤ǤˤÔ¤פפâ¤ä¤¥ ¥¥ ¥"¥(¥-¥-¥8¥<¥<¥H¥Q¥T¥T¥_¥a¥w¥~¥„¥“¥ž¥©¥¯¥»¥¿¥¿¥Ë¥Ô¥×¥×¥â¥ä¥ú¥¦¦¦¦%¦+¦5¦8¦<¦<¦D¦K¦N¦P¦[¦_¦h¦k¦k¦v¦x¦–¦�¦¨¦³¦¶¦¼¦Á¦Á¦Ó¦צצã¦ì¦ï¦ï¦ú¦ü¦§§ §1§<§G§M§R§R§]§b§b§m§r§r§}§€§„§‹§�§•§š§š§®§³§³§À§ħÕ§ݧá§õ§ü§¨¨ ¨¨!¨'¨7¨;¨L¨^¨i¨m¨m¨z¨‚¨Ѝ�¨�¨�¨�¨�¨’¨’¨ ¨§¨´¨À¨ΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨΨШШç¨ï¨û¨û¨©+©C©E©Q©^©^©�©Ž©™©¢©«©¶©½©½©Ç©Ç©Ê©Ü©ú©ªª3¬xÝ÷R5R5d5f5j5s55‹5 5 5Ï5Ó5Ø5ä5÷566666$6l_vww�œ¡£ÅÈÈÕê×ùÿ€1€J€c€|€†€„ž·o·oÕoÝoãoêoñoóoöoýopppp p p4p>p>pFp_p‚p£p¨pÉpÎpÚpåpêpúpýpqqq"q$q*q-q3q8q;qCqLq\qq�q¥qªq®qÓqæqëqùqrrr?rOrrr…rŠr�r•r˜ršr r¦r¬r±r·r¿r¿rÉrÒràrørýrs&s6sYslsqs�s¤s²sÊsÏsÓsøs t t&t&t&t4tLtNtNtNt\tttvtvt„tœtœt®t®t·tÄtÚtútuu'u:u>u>u>uEuKueumuxu“u•u›uµu½uÈuÖuáuáuûuH…“ † †·†Í†Ý†ä†û†‡(‡,‡o‡L�ž—�—�«�¸�Î�º�Ý�ß�ø�‚‚'‚/‚4IR†Ø†Ø�Ø�ؒؠخرضØì=ÇüÇüïüòüý'ý8ý8ýSýYý^ý^ýyýý„ý„ý�ý›ý¸ýÐýÕýÜýâýäýþþþþ#þ%þ%þ8þ>þ>þ>þNþCþ_þoþ�þ†þ†þ†þ�þ”þ›þ°þ·þÓþÓþåþÌL»°¦°¦Ê¦Õ¦à¦é¦ñ¦ô¦û¦ÿ¦§§ §%§3§P§]§l§q§}§‚§‰§•§š§�§§§Ÿ§·§À§Ñ§Ï§Ç§ß§è§î§î§ü§ÿ§¨¨%¨,¨0¨5¨L¨d¨m¨{¨—¨£¨£¨»¨Ì¨Ì¨Ó¨ì¨ø¨©©©.©7©>©B©M©R©Y©v©£©ª©®©°©»©Ç©Ë©à©â©ó©ý©ªª!ª0ªIªIªLªTªYªÛªPw‡×N×NóNOO.OKOfOlOuOƒO‰OŒO˜OŒ  b b°bÔbÔbâbâbâbâbëbëbòb c"c*c*c5c5cCcScScacgcgccc…c«c (kqH‹H‹V‹b‹r‹y‹‹ @KWoëoë}ë…ëŒë«ë¸ë¸ë»ë½ëÃë!$/4 â â,âAâFâLâ"$).ïáïáüáâââ#$#(¿á¿áÎáäáéáïá$€ïK**4DZbl‡Œœ²ºÄßäú   " , 6 @ J T ^ h r | ’ œ ¦ ° º Ä Î Ø â ø  " , 6 @ J T ^ h r | † � š ¤ ® ¸ Â Ì Ö à ê ô þ !!!&!0!:!D!N!\!%¤Cð�ð�ž ž"ž3žEžGžNžTždžožyž„ž›žžž ž²ž¸žÈžÒžÜžãžîžŸ Ÿ Ÿ!Ÿ!Ÿ!Ÿ5Ÿ&$5:OâOâ]ârâwâ}â'¤Di8Ÿ8ŸNŸUŸjŸ{Ÿ�Ÿ�Ÿ–ŸœŸ¬Ÿ·ŸÁŸÌŸãŸæŸèŸúŸ   % , 7 K S S i i i ~ ((&,ò/ò/00000)0]e×M×MíMNNNN N*  ß>%>%`%h%n%{%‚%ž%¤%¤%¤%±%³%¾%È%Ï%Þ%é%ï%ù%ÿ%&&&%&%&7&=&M&S&X&_&_&€&†&˜&«&±&´&º&º&¼&Â&È&Ê&Ê&Ê&Û&å&ê&ê&Line truncated
###!#$#$#.#0 'P‰P‰^‰~‰„‰Š‰Š‰�‰„“°ğ¡ğ¡¢ ¢¢¢:¢M¢T¢e¢Š¢•¢ ¢¢¢­¢Ò¢İ¢è¢ê¢ñ¢ú¢ü¢££8£("—á—á¦á½áØáØáŞá 7á7áFá\ábá ˆx´x´�´¤´»´Ç´Ò´ä´õ´æ´ä´µ0µ<µCµIµUµ_µfµmµqµsµyµ…µ�µ–µ�µ¡µ¡µ«µ°µ»µÍµŞµÏµÍµşµ+¶2¶8¶D¶N¶U¶\¶`¶b¶h¶t¶~¶…¶Œ¶���«¶»¶Í¶Ş¶Ï¶Í¶ş¶ ·+·2·8·D·N·U·\·`·b·h·t·~·…·Œ·�·�·š·ª·¼·Í·¾·¼·í·ô·ú·¸¸¸¸"¸$¸*¸6¸@¸G¸N¸R¸R¸\¸j¸s¸Œ¸˜¸œ¸œ¸Ÿ¸¨¸¹Ô?„?„\„*ªd„s„–„¡„³„º„˄ӄׄÚ„è„ì„……-…/…/…;…C…G…T…T…`…h…l…y…y…y…•… …±…±…¶…Î…İ…â…è…ó…ø…ø…ı…†$†)†/†:†?†?†M†V†b†j†r†z†}†ƒ†ˆ†‘†£†¬†½†͆͆Ò†Ú†â†å†ë†ë†ğ†ğ†ğ†ö†ù†‡ ‡ ‡E‡\‡i‡q‡y‡…‡‘‡—‡�‡§‡«‡®‡º‡À‡LJ̇̇Ú‡ê‡ê‡÷‡÷‡ÿ‡ˆˆ ˆ$ˆ$ˆ+ˆ6ˆ<ˆDˆJˆUˆZˆZˆiˆtˆ†ˆŒˆ”ˆšˆŸˆªˆ¼ˆˆʈЈÕˆÕˆéˆïˆúˆ‰‰‰‰‰=‰d‰i‰i‰}‰ƒ‰™‰ª‰°‰µ‰ΉÔ‰ä‰ì‰ô‰ú‰ÿ‰ÿ‰ŠŠ/Š@ŠFŠKŠdŠjŠzŠ‚ŠŠŠ�ЕЕЫбŠÇŠØŠŞŠãŠòŠøŠ ‹‹‹ ‹&‹+‹+‹A‹G‹]‹n‹t‹v‹…‹‹‹•‹�‹¥‹«‹²‹²‹²‹Ä‹Í‹Ş‹î‹î‹ó‹ó‹Œ ŒŒ-Œ4Œ:ŒBŒHŒXŒ^ŒfŒlŒlŒlŒqŒqŒqŒqŒqŒ�ŒœŒ¡Œ¡Œ°Œ¹ŒÄŒÍŒØŒãŒèŒèŒşŒ��+�1�6�H�N�S�l�Š�Š�����›�£�¦�¬�²�·�·�Û�ã�ë�û�����6�6�;�;�G�O�R�Y�_�d�d�„�Œ�œ�¢�©�Ç�Ö�Ş�ö�ş����&�.�F�N�Q�X�^�^�^�}���™�¡�¤�«�±�Á�Ğ�Ü�÷�ÿ�� ��'�3�N�V�Y�`�f�f�f�f�k�k�t�„�š� �¸�Ë�Ñ�Ö�è�î�ó�‘‘!‘)‘,‘3‘9‘b‘j‘z‘€‘‡‘‡‘‡‘Œ‘Œ‘•‘­‘ÑÉ‘á‘ô‘ú‘ÿ‘*’0’C’z’Œ’©’±’·’¼’¼’Ö’â’î’ù’ù’ş’ş’“$“0“;“;“@“@“Z“f“r“}“}“‚“‚“˜“�“ª“°“µ“Ǔ͓ғá“í“ù“ÿ“” ” ”*”3”?”G”J”P”V”[”o”~”†”�”¦”©”¯”µ”͔Քõ”••• •&•&•7•@•L•T•W•^•d•i•{•Š•’•ª•²•µ•¼••Ú•â•––#–&–-–3–3–C–L–X–`–c–i–o–t–ˆ–—–Ÿ–¹–Á–Ä–Ê–Ğ–è–ğ–—.—6—9—?—E—E—V—_—k—s—v—}—ƒ—ˆ—š—©—±—Ì—Ô—×—Ş—ä—ü—˜&˜C˜K˜N˜U˜[˜[˜[˜[˜[˜`˜`˜v˜|˜ˆ˜�˜“˜¥˜«˜°˜¾˜ʘÓ˜ߘç˜ê˜ñ˜÷˜ü˜™™%™=™E™H™O™U™m™u™”™®™¶™¹™À™Æ™Æ™Æ™×™à™ì™ô™÷™ş™šš*š6šQšYš\šcšiš�š�š¯šÌšÔšךŞšäšäšäšäšäšéšéšüš››(›-›-›@›V›\›g›i›i›|›Ÿ›¥›°›°››Ë›Ü›á›ó›œœœœœ1œ7œEœTœYœYœlœ‚œˆœ–œ¥œªœªœÀœÆœãœûœûœ%�+�0�<�E�T�T�Y�Y�o�u�’�ª�ª�Ô�Ú�ß�ë�ô������$�A�Y�Y�ƒ�‰���š�£�²�²�·�·�Í�Ó�ğ�ŸŸ2Ÿ8Ÿ:ŸFŸOŸZŸZŸZŸZŸ_ŸmŸvŸ‡Ÿ‰Ÿ›Ÿ¨Ÿ¨Ÿ¨Ÿ¸ŸÈŸÍŸñŸıŸşŸ  5 E i y    „ ‰ � ± ï ÿ ¡¡ ¡¡,¡^¡f¡l¡n¡s¡z¡z¡ƒ¡•¡¨¡±¡À¡À¡Å¡Ê¡Ù¡â¡í¡ï¡ø¡¢¢$¢+¢1¢9¢D¢J¢Z¢`¢h¢s¢y¢y¢~¢ƒ¢Š¢‘¢˜¢Ÿ¢¨¢·¢·¢·¢¼¢¼¢¼¢΢Ó¢Ó¢å¢ğ¢ø¢££££ £ ££'£*£6£?£K£R£X£]£]£h£y£|£ˆ£‘£�£¤£ª£¯£¯£¯£¯£´£¹£¹£Ä£È£È£Ô£İ£à£à£ë£í£¤
¤¤ ¤*¤5¤;¤G¤K¤K¤W¤`¤c¤c¤n¤p¤†¤�¤“¤›¤¦¤±¤·¤Á¤ĤȤȤФפÚ¤ܤç¤ë¤ô¤÷¤÷¤¥¥"¥)¥4¥?¥B¥H¥M¥M¥X¥\¥\¥h¥q¥t¥t¥¥�¥—¥�¥¤¥³¥¾¥É¥Ï¥Û¥ߥߥë¥ô¥÷¥÷¥¦¦¦!¦'¦/¦:¦E¦K¦U¦X¦\¦\¦d¦k¦n¦p¦{¦¦ˆ¦‹¦‹¦–¦˜¦¶¦½¦ȦÓ¦Ö¦ܦá¦á¦ó¦÷¦÷¦§ §§§§§2§9§?§Q§\§g§m§r§r§}§‚§‚§�§’§’§�§ §¤§«§°§µ§º§º§ΧÓ§Ó§à§ä§õ§ı§¨¨¨ ¨ ¨-¨9¨A¨G¨W¨[¨l¨~¨‰¨�¨�¨š¨¢¨ª¨°¨°¨°¨°¨°¨²¨²¨À¨ǨÔ¨à¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨î¨ğ¨ğ¨©©©©<©K©c©e©q©~©~©¡©®©¹©©Ë©Ö©İ©İ©ç©ç©ê©ü©ª&ª&ªS¬xİ÷R5R5d5f5j5s55‹5 5 5Ï5Ó5Ø5ä5÷566666$6l_v——­¼ÁÖÃåèèõ
€÷€ €8€Q€j€ƒ€œ€¦€„�×o×oõoıop
ppppp$p$p5p9p?p?pTp^p^pfpp¢pÃpÈpépîpúpq
qqq1q7q<qBqDqJqMqSqXq[qcqlq|qŸq­qÅqÊqÎqóqr rr1r6r:r_ror’r¥rªr°rµr¸rºrÀrÆrÌrÑr×rßrßréròrsss!sFsVsysŒs‘s¡sÄsÒsêsïsóst+t+tFtFtFtTtltntntnt|t”t–t–t¤t¼t¼tÎtÎt×tätútu4u<uGuZu^u^u^ueuku…u�u˜u³uµu»uÕuİuèuöuvvvH…“ † †·†Í†İ†ä†û†‡(‡,‡o‡L��·�·�Ë�Ø�î�Ú�ı�ÿ�‚1‚<‚G‚O‚4IR†Ø†Ø�Ø�ؒؠخرضØì=çüçüıı0ıGıXıXısıyı~ı~ı™ıŸı¤ı¤ı­ı»ıØığıõıüışş!ş1ş6ş=şCşEşEşXş^ş^ş^şnşcşş�ş¡ş¦ş¦ş¦ş­ş´ş»şĞş׺óşóşÿÌL»°¦°¦Ê¦Õ¦à¦é¦ñ¦ô¦û¦ÿ¦§§ §%§3§P§]§l§q§}§‚§‰§•§š§�§§§Ÿ§·§À§Ñ§Ï§Ç§ß§è§î§î§ü§ÿ§¨¨%¨,¨0¨5¨L¨d¨m¨{¨—¨£¨£¨»¨Ì¨Ì¨Ó¨ì¨ø¨©©©.©7©>©B©M©R©Y©v©£©ª©®©°©»©Ç©Ë©à©â©ó©ı©ªª!ª0ªIªIªLªTªYªÛªPw‡÷N÷NO$O7ONOkO†OŒO•O£O©O¬O¸OŒ  b b°bÔbÔbâbâbâbâbëbëbòb␍c"c*c*c5c5cCcScScacgcgccc…c«c (kqH‹H‹V‹b‹r‹y‹‹ @KW�ë�ë�ë¥ë¬ëËëØëØëÛëİëãë!$/4?â?âLâaâfâlâ"$).âââ1â6â<â#$#(ßáßáîáâ ââ$€ïK**4DZbl‡Œœ²ºÄßäú   " , 6 @ J T ^ h r | ’ œ ¦ ° º Ä Î Ø â ø  " , 6 @ J T ^ h r | † � š ¤ ® ¸ Â Ì Ö à ê ô ş !!!&!0!:!D!N!\!%¤Cğ�ğ��␍�"�3�E�G�N�T�d�o�y�„�›��� �²�¸�È�Ò�Ü�ã�î�Ÿ Ÿ Ÿ!Ÿ!Ÿ!Ÿ5Ÿ&$5:oâoâ}â’â—â�â'¤Di8Ÿ8ŸNŸUŸjŸ{Ÿ�Ÿ�Ÿ–ŸœŸ¬Ÿ·ŸÁŸÌŸãŸæŸèŸúŸ   % , 7 K S S i i i ~ ((&,ò/ò/00000)0]e÷M÷M␍N N/N5N8N@N*  ß>%>%`%h%n%{%‚%�%¤%¤%¤%±%³%¾%È%Ï%Ş%é%ï%ù%ÿ%&&&%&%&7&=&M&S&X&_&_&€&†&˜&«&±&´&º&º&¼&Â&È&Ê&Ê&Ê&Û&å&ê&ê&ÿ& ' ''&','2'H'M'U'k'o'o'w'}'ƒ'�'”'›'¤'¶'¶'Û'ß'å'ë'ı'((( (&(,(,(.(2(8(>(D(I(I(I(I(t(…(…(œ(©(­(µ(Ç(ç(ç(í(ğ(ô(ú(ú( ))2)F)N)_)c)t)x)~)—)™)Ÿ)¬)®)º)Ø)Ş)é) ***#*)*2*8*J*[*c*g*x*|*‚*›*�*£*°*²*¾*Ü*â*è*î*÷*ı*+␍+4+=+C+C+X+]+]+d+n+ƒ+ˆ+ˆ+ˆ+¥+§+Ä+Æ+ã+é+ñ+õ+ü+ ,%,+,7,N,U,[,f,k,k,r,v,€,�,�,˜,�,¥,°,¶,Å,Ê,Ğ,Õ,İ,â,ñ,--%-0-L-N-j-j-q-†-‹-”-¡-¦-¬-±-±-¸-¼-Æ-Ô-Ö-Ş-â-æ-ğ-ü-.... .1.?.D.P.P.X.X.{.{.‰.�.”.˜.�.�.�.�.£.¥.¥.È.Î.Ô.Û.ñ.ó.ó.ó.ş.ş.ş./,0+4-v^Ê^ÊxÊ|ʔʜʤʮʲʹʿÊÓÊÛÊàÊãÊîÊùÊË ËËË/Ë6Ë=ËHËSËUË`ËkËmËy˂˂˘ˣ˻ËÁËÊËÛËáËêËüËÌÌ
ÌÌÌÌ0Ì;Ì?ÌMÌOÌSÌbÌbÌbÌsÌsÌxÌŠÌ�ÌşÌ,Ô@�æ�æ¤æ«æ®æÒæÒæïæçç(ç-ç-çKçYçlçç‡ç‡ç‰ç‰ç‰çœç�ç�ç�ç¥ç¸çËçËçËçŞçéçüçèèè"è7èJèQèQèTèyè-LAP$$$!$-$H$M$m$o$Š$¥$¥$­$´$Û$.P~�ЋЋދë‹ù‹ ŒŒ$Œ1Œ?ŒQŒ\ŒjŒpŒvŒ/4
77(747E7W7`7n7t70|ºU~ ~   § µ À æ æ ï ñ ñ ø  & & 5 D ` k k w  � ™ ·  Ä İ ã î ş ␍␍$␍)␍/␍6␍^␍c␍q␍z␍z␍�␍�␍§␍§␍¶␍¿␍Ó␍Ú␍á␍æ␍ñ␍÷␍ÿ␍%.5:EQ`ty��ŸŸ½ÅÕçíöö  $4CUZj}…™·ÎÒŞõ#)4@P`enn€„�§ÃÕÛæò$**/1166EKQQUÎ1ŒÄãÜÜ*Ü6Ü:Ü>ÜEÜLÜ[ÜfÜlÜqÜsÜ܆Ü�ܔܚÜ�Ü�ܭܴܼÜÂÜÈÜÊÜÊÜÖÜ28 */*/8/>/J/U/f/p/w/}/3@t€ÏìÏìİìèìïìíííí í&í4ÌSw w � ° · ¾ Å Ë Í Ô Û Ş Ş ğ ğ 

!
)
2
:
?
E
[
k
€
…
�

º
º
¿
È
Ò
æ
î
÷
ÿ
   - B D ] u y y � • � ¦ « ± Ç × ì ñ 
" & 9 9 9 > ` ‚ � “ « Ã È Ó ç ï ø ␍␍␍␍*␍?␍A␍Z␍r␍v␍v␍Š␍’␍›␍£␍¨␍¯␍Å␍Õ␍ê␍ï␍ $777<^€‹‘©ÁÁÁÍÓİèú
!8Offy”””µÅÓÓÜæó␍"57Ve^}�§§À5D{ˆîîş!337:B6\Ob`Š`Š€Š�Š˜Š¡Š¥Š©ŠµŠºŠ¿Š¿ŠĞŠÔŠÜŠôŠ÷Š‹70üîäîä÷äüäå ååå8tÚ77Y`grˆˆš³³¾ÂÍúÔ  1EINc{€ˆŒ�‘½ÑÕÕÚë3␍B`kq…�¢¾ÇÏÔÛíı.FJJ_w|„ˆ—ŠÊÎİİİİğö55Qaooƒ‘Ÿ´ÇÌëúó"):`Q†ˆ´´´¿ı␍@ZGi€‘¬ÀÄÉÚü1@^ioƒ› ´¼ÅÍÒÙëû,DHHjƒ—›ªªª½ÃÍÔç.<<P^wlŠ�¢ÁĞÉèø ' ' I I P s s s “ 9Dmz––¦ºÃÉÛÛßâê:lw�‡€‡€�€¬€±€Æ€³€Õ€Ø€Ø€å€ú€ç€ ��(�A�Z�s�Œ�–�;<‰”FFVgpvz…<”)>ï>ïFïJïVïgïiïyï„ï–ï¡ï¬ï»ïÌïÓïìïğïğğ ğğ%ğ.ğ<ğPğlğqğ�ğ=d(=�‰�‰œ‰°‰³‰Ç‰Ï‰Ó‰İ‰ç‰ï‰ò‰ø‰>4u¾8G8G^GaGeGrG{G†G–G�G¨GĞGĞGàGåGåGõGúGúG
HHH H$H$H4H9H9HIHNHNH^HcHcHsHxHxHˆH�H�H�H�H™H²HÀH×HêHìHòHôH÷HI␍I␍II#I#I.I>IKIcIkIqIqI…I…I�I‘IQJ?Ä n7¬7¬T¬\¬_¬m¬{¬�¬™¬´¬ͬ߬ê¬û¬ÿ¬­­ ­(­4­G­x­m­S­ˆ­Ÿ­³­¿­Í­î­®'®;®=®^®D®y®|®�®„®„®‹®¡®¨®µ®º®É®Ö®é®é®¯¯2¯2¯J¯O¯O¯_¯c¯t¯~¯�¯™¯¬¯±¯±¯Á¯ůÖ¯à¯ñ¯û¯°° ° ° °A°R°W°d°y°y°~°ˆ°—°œ°¢°§°§°¬°¶°ŰʰаÕ°Õ°Û°á°æ°æ°î°±␍±±&±5±?±E±N±e±y±б—±œ±´±DZޱë±ó±² ²²²$²$²)²)²)²)²)²9²9²9²Q²g²o²в›²¨²ª²·²¼²¼²¼²DzÕ²Ú²Ú²á²ï²ô² ³³*³6³<³D³J³S³y³…³‹³‘³ ³¨³°³ݳî³û³ı³ ´ ´´´´%´*´=´I´U´[´a´j´o´o´o´o´o´‡´Œ´Œ´Œ´Œ´Œ´�´�´�´�´�´�´�´�´�´�´µ´Ë´Ó´î´ÿ´ µµµ+µ0µ0µ0µ9µSµ_µdµ†µ’µ’µ—µ—µ—µ—µ—µ—µ—µ—µ¬µ±µ±µ±µµɵεεÙµëµ9¶Z¶e¶v¶{¶{¶{¶„¶ª¶³¶Ķʶë¶· ··"·L·U·[·|·•·•·•·•·•···ğ·ù·ÿ·¸
¸¸¸!¸!¸!¸!¸0¸D¸b¸r¸x¸}¸}¸�¸¤¸ʸݸã¸ã¸è¸è¸÷¸ ¹)¹9¹?¹D¹D¹W¹k¹‘¹¤¹ª¹ª¹¯¹¯¹¯¹ǹݹ幺ºº º/º1º1º1º1º1ºEºEºEºEºEºEºEºEºEºEºEºEºEºEºEºEºTºcºnºpºpºyº{º{º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º�º‘º‘º¨º°º¼º¼ºÀºźÕºñº »»$»:»T»W»a»m»“»³»Ó»÷»ù» ¼:¼¼U¼U¼X¼h¼p¼‹¼œ¼Ÿ¼¹¼ǼÓ¼ë¼ë¼½½(½<½]½q½�½y½©½¾½ܽ¾¾¾ù½ê½ ¾ ¾ ¾"¾'¾*¾D¾R¾€¾¢¾¢¾;оß¾ó¾¿(¿D¿0¿`¿`¿~¿³¿±¿¦¿›¿Œ¿Á¿Á¿Á¿Ä¿É¿É¿Ğ¿à¿À␍À`Ã@À„°çÇçÇıÇÈ ÈÈÈ2È2È=ÈNÈUÈbÈnÈ{ÈÈ�È�È™È�ȦȶÈÄÈÓÈŞÈñÈñÈ É É$ÉPÉPÉdÉfÉfÉpÉxÉxɂɊɊɊɛɛɛɡɩɯɴɴɺÉÂÉÆÉÌÉÑÉÑÉçÉ÷ÉÊÊÊÊÊ"Ê"Ê)Ê?ÊOÊYÊaÊgÊvÊ{ʃʉʉÊ�ʕʠÊÔÊãÊíÊõÊûÊËËËËËËËËËËË&Ë4ËDËJËRËaËfËsË{Ë€Ë€Ë€ËˆË‘ËšË§Ë¯Ë»ËÆËúËÌÌÌ5Ì;Ì@Ì@ÌGÌZÌbÌwÌ̜̇Ì�Ì©Ì±ÌÆÌÆÌÎÌßÌçÌîÌôÌúÌşÌÍ Í0Í<ÍDÍYÍeÍjÍvÍ�Í†Í†Í†ÍœÍ¹Í¾ÍÆÍ×ÍßÍçÍüÍÎ ÎÎ)Î.Î.ÎRÎ^ÎfÎ{·ΌΘΣΨΨΨΨΨΨγγγγγγγγγγγγξÎÍÎĞÎŞÎîÎôÎüÎ ÏÏÏ Ï"Ï*Ï9Ï?ÏGÏOÏQÏYÏvÏχÏ�ϖϪϳϼÏÄÏÎÏØÏàÏîÏóÏøÏ
Ğ>ĞFĞUĞ_ĞyĞ�ІІІĞ�ИЛХгĞÅĞÇĞÙĞëĞëĞëĞöĞûĞÑÑÑ&Ñ+Ñ+Ñ+Ñ+Ñ+Ñ+Ñ+Ñ+Ñ+Ñ+Ñ+Ñ+Ñ+Ñ+Ñ+Ñ+Ñ6ÑBÑZÑmÑuÑ„Ñ‰Ñ‘Ñ˜Ñ¥Ñ®Ñ·Ñ¿ÑÆÑËÑËÑÓÑÛÑùÑÒÒÒÒ Ò Ò Ò"Ò7ÒHÒKÒNÒVÒ[Ò[ÒdÒiÒqÒxÒ…ÒšÒ¡Ò²Ò¾ÒÛÒôÒ ÓÓ%Ó%Ó*Ó*Ó*Ó*Ó*Ó*Ó*Ó2Ó=ÓIÓXÓ]Ó]ÓeÓmÓzÓÓÓÓƒÓˆÓˆÓ˜Ó�Ó�Ó�Ó©Ó°Ó¶ÓÀÓÅÓÜÓëÓóÓÔ Ô/Ô5Ô<Ô>ÔDÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔKÔMÔMÔhÔrÔ€Ô€Ô…Ô�Ô—Ô³ÔÀÔÀÔÀÔÄÔÏÔíÔûÔñÖAx[÷Ö÷Ö␍×××&×-×>×H×O×Y×l×t×t×�שׯ׸׿×Â×Í×Ö×İ×à×å×ğ×ú× ØØ(Ø/Ø7ØMØTØTØTØb؉ؚؒجشششؿØÉØÛØáØ÷ØşØÙ␍Ù"Ù3Ù3Ù:Ù:Ù:ÙHÙoÙ|Ù…Ù�ٟ٧٧٧ٵٽٽÙÀÙËÙåÙñÙ6ÚBt`¹GİGİ_İoİvİ}݈ݛİ�ݦݭݰİÀİÎİÙİäİçİòİŞŞŞ)Ş4Ş;ŞNŞZŞwހވިޫޱ޶ŞÅŞËŞÓŞâŞèŞğŞğŞüŞ
ßß!ß0ß8ß[ßaßgßißoßußußußšßŸß¼ß¿ß¿ßÆßÓß×ßâßüßàà+àGà\àdànà�à¡à¡àáC ?CO1O1Y1a1f1DÑÒ¯Z¯ZĞZÛZìZÛZ[[[$[-[4[8[A[A[I[M[m[{[‡[�[˜[¼[¼[Í[Ø[Ş[å[ê[ê[ı[\\$\/\6\@\M\M\_\d\d\r\w\w\ˆ\ˆ\›\ \±\·\À\Õ\é\é\î\î\ü\]]]␍]]]]&]-]-]<]B]O]V]^]‚]‚]Š]™]¤]«]­]Á]Ğ]Õ]Ú]Ú]Ú]í]ò]^^^&^:^:^?^?^G^]^b^v^}^‚^‚^�^�^¯^¾^Ù^ä^ş^_"_1_P_[_`_o_ƒ_Š_‘_¤_¦_´_Ç_É_×_å_õ_ü_``&`7`N`P`\`g`i`i`t`ˆ`•`�`Ÿ`³`Å`Ì`İ`ë`␍aa a>a>a>aFaQaUa]aaaiapa€a‹a©a®a·aÂaËaÓaØaØaçaôab␍bb&b,b2b8bAbGbVbnbvb‚b�b§b©b²b½b¿bËbébïbõbûbcc<cDcNc\ctc{c‡c–c«c«c¸c½cÏcÕcÕcÕcÕcßdEDQ^÷~÷~ .=?WowFœfÉoUoU‘U›UÃUÒUİUöUûUÿUVV V&V/V4VIVZVyV�VƒV¢VªV¹VÀVÌVÑVØVàVæVèVùVşVWW#W)W)W1W:WIWhWoWqW�W—W—W—W®W·WÃWÇWÕWëWàWXXXX4X XCXIXPXXX^X`XqXvXŒXxX›X¡X¡X©X²X²X¼X¼XÔXY␍YYY+YAY6YYYYYkYG ;zââ�â§âªâ¼âÒâÔâİâââã!ã0ãNãbãzã�ã§ãÅãÔãñãääää!ä&ä+ä5ä8äBäGä`äcäcäcäcähänäŠä˜ä¤ä­äÁäÉäÒäîäùäåå"å"å1å6å6åDåHP‡—?C?C`CMC‚CoC‘C C¨C³CµCÀCËCËCíCóCIPÅÕüü+ü0ü?ü?üFüsü‰üuü¦ü˜ü¾üÆüJŒ¥Ä�ú�úÂúîúîúûû'û;û@û@ûGûOûWûlûxû‰û�ûŸû³û¸ûºûºûºûÖûôûôûüKP�­g=g=�=’= =¦=Á=Ğ=ß=î=ü=>
>>Lè7O0O0z0}0€0†0‹0¢0¹0Ğ0ô01121L1^1k1�1”1™1¤1¬1¬1¶1¶1Á1Æ1Û1á12 2!262<2[2z2‚2�2�2—2—2©2ç2ÿ23M$ ]]B]+]L]T]NLx‡şÌşÌÍ%Í6ÍGÍNÍVÍfÍq͈͂ͺÍOTHYXeXejeleue~eŒe‘eše�e¢e°eºe½eÇeP¨!G°c°cÀcÉcÜcécõcd␍dd0d0d?dJdSdZdcdzd‘d–d¨d·dÃdÕdÕdŞdeeeee2e>eAeXeQhî„HpHpaplp|pÅpÌpàpçpïp÷pqqqqq"q)q0qOqgqpqpq¥qÏqØqúqr1r[rgr‰r‹r’r™r™r¼rØrÿrsBs^s…s¡sÈsäs t'tNtNt]tjtotot~t‹t�t�t—t¢t´tÌtätütştştştuuuuuu(u6uIu^ušu¡u¡u¡u©uÆuÔuòuûuvv v9vUvUvUvgvuv‘v¯v¯v¯vºv½vìvîvw ww%w'w4w6wCwEwRwRwvwxww�w™w›w©w«w¹w»wÉwÉwéwéwéwéw x=xcxkxoxwx{x‰x—x™x¡x¥x©x±x¿xÍxÍxçxòxyy<yUy`yjyqyŠy–y�y¶y¶yÈyÍyÏyÕyæy÷yz␍zz'z)z7z9zGzIzWzWzWz{z{zšz¡z¨z«z·zºzÈzÌzÚzŞzìzğzğz {{{#{6{={X{x{‹{š{œ{«{­{¼{Æ{Æ{Ô{İ{ó{ú{ |$|M|}|‚|�|’| |©|Ã|Å|Ç|Î|ß|è|ê|ø|ú|}
77(747E7W7`7n7t70|ºU~ ~   § µ À æ æ ï ñ ñ ø  & & 5 D ` k k w  � ™ ·  Ä İ ã î ş ␍␍$␍)␍/␍6␍^␍c␍q␍z␍z␍�␍�␍§␍§␍¶␍¿␍Ó␍Ú␍á␍æ␍ñ␍÷␍ÿ␍%.5:EQ`ty��ŸŸ½ÅÕçíöö  $4CUZj}…™·ÎÒŞõ#)4@P`enn€„�§ÃÕÛæò$**/1166EKQQUÎ1ŒÄãÜÜ*Ü6Ü:Ü>ÜEÜLÜ[ÜfÜlÜqÜsÜ܆Ü�ܔܚÜ�Ü�ܭܴܼÜÂÜÈÜÊÜÊÜÖÜ28 */*/8/>/J/U/f/p/w/}/3@t€ïìïìıìíí.í;í;í>í@íFí4ÌS— — ½ Ğ × Ş å ë í ô û ş ş 

"
-
A
I
R
Z
_
e
{
‹
 
¥
¾
Ö
Ú
Ú
ß
è
ò
    $ + = M b d } • ™ ™ ­ µ ¾ Æ Ë Ñ ç ÷   * B F Y Y Y ^ € ¢ ­ ³ Ë ã è ó ␍␍␍ ␍"␍(␍:␍J␍_␍a␍z␍’␍–␍–␍ª␍²␍»␍Ã␍È␍Ï␍å␍õ␍
(@DWWW\~ «±Éáááíóı*AXo††™´´´Õåóóü-;BUWv…~�­ÇÇà5D{ˆîîş!337:B6\Ob`Š`Š€Š�Š˜Š¡Š¥Š©ŠµŠºŠ¿Š¿ŠĞŠÔŠÜŠôŠ÷Š‹70üîäîä÷äüäå ååå8tÚWWy€‡’¨¨ºÓÓŞâíô)@Qeinƒ› ¨¬¾±İñõõú S-b€‹‘¥½ÂÖŞçïôû␍35Nfjj—œ¤¨·ªÖêîıııı ':UUq���£±¿Ôçì 2BIZ€q¦¨ÔÔÔß"-3>`zg‰ ±ÌàäéúQ>`~‰�£»ÀÔÜåíòù 13LdhhŠ£·»ÊÊÊİãíô""">N\\p~—Œª½Âáğé  ) G G i i p “ “ “ ³ 9Dmz––¦ºÃÉÛÛßâê:lw�§€§€½€Ì€Ñ€æ€Ó€õ€ø€ø€���)�/�H�a�z�“�¬��;<‰”FFVgpvz…<”)>ï>ïFïJïVïgïiïyï„ï–ï¡ï¬ï»ïÌïÓïìïğïğğ ğğ%ğ.ğ<ğPğlğqğ�ğ=d(=�‰�‰œ‰°‰³‰Ç‰Ï‰Ó‰İ‰ç‰ï‰ò‰ø‰>4u¾8G8G^GaGeGrG{G†G–G�G¨GĞGĞGàGåGåGõGúGúG
HHH H$H$H4H9H9HIHNHNH^HcHcHsHxHxHˆH�H�H�H�H™H²HÀH×HêHìHòHôH÷HI␍I␍II#I#I.I>IKIcIkIqIqI…I…I�I‘IQJ?Ä nW¬W¬t¬|¬¬�¬›¬°¬¹¬Ô¬í¬ÿ¬
­­ ­1­4­?­H­T­g­˜­�­s­¨­¿­Ó­ß­í­®#®G®[®]®~®d®™®œ®¡®¤®¤®«®Á®È®Õ®Ú®é®ö® ¯ ¯!¯%¯R¯R¯j¯o¯o¯¯ƒ¯”¯�¯¯¯¹¯̯ѯѯá¯å¯ö¯°°°.°:°?°?°?°a°r°w°„°™°™°�°¨°·°¼°°ǰǰ̰Ö°å°ê°ğ°õ°õ°û°±±±±!±-±:±F±U±_±e±n±…±™±ª±·±¼±Ô±ç±ş± ²²"²,²2²;²D²D²I²I²I²I²I²Y²Y²Y²q²‡²�²ª²»²Ȳʲײܲܲܲç²õ²ú²ú²³³³,³8³J³V³\³d³j³s³™³¥³«³±³À³ȳгı³´´´+´+´0´0´7´E´J´]´i´u´{´�´Š´�´�´�´�´�´§´¬´¬´¬´¬´¬´½´½´½´½´½´½´½´½´½´½´Õ´ë´ó´µ µ,µ.µ;µKµPµPµPµYµsµµ„µ¦µ²µ²µ·µ·µ·µ·µ·µ·µ·µ·µ̵ѵѵѵâµéµîµîµùµ #¶8¶Y¶z¶…¶–¶›¶›¶›¶¤¶ʶÓ¶ä¶ê¶ ·$·,·4·B·l·u·{·œ·µ·µ·µ·µ·µ·×·¸¸ ¸%¸*¸3¸<¸A¸A¸A¸A¸P¸d¸‚¸’¸˜¸�¸�¸°¸ĸê¸ı¸¹¹¹¹¹+¹I¹Y¹_¹d¹d¹w¹‹¹±¹ĹʹʹϹϹϹç¹ı¹º º1º>º@ºOºQºQºQºQºQºeºeºeºeºeºeºeºeºeºeºeºeºeºeºeºeºtºƒº�º�º�º™º›º›º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º¯º±º±ºȺкܺܺàºåºõº»)»8»D»Z»t»w»�»�»³»Ó»ó»¼¼,¼Z¼2¼u¼u¼x¼ˆ¼�¼«¼¼¼¿¼Ù¼ç¼ó¼ ½ ½6½9½H½\½}½‘½­½™½ɽ޽ü½1¾/¾$¾¾
¾?¾?¾?¾B¾G¾J¾d¾r¾ ¾¾¾í¾ğ¾ÿ¾¿4¿H¿d¿P¿€¿€¿�¿Ó¿Ñ¿Æ¿»¿¬¿á¿á¿á¿ä¿é¿é¿ğ¿À!À-À€Ã@À„°ÈÈÈ!È,È3È>ÈRÈRÈ]ÈnÈuÈ‚È�È›ÈŸÈ°È°È¹È¾ÈÆÈÖÈäÈóÈşÈÉÉ)É)ÉDÉpÉpɄɆɆÉ�ɘɘɢɪɪɪɻɻɻÉÁÉÉÉÏÉÔÉÔÉÚÉâÉæÉìÉñÉñÉÊÊ!Ê0Ê5Ê=Ê=ÊBÊBÊIÊ_ÊoÊyÊ�ʇʖʛʣʩʩʮʵÊÀÊôÊË␍ËËË0Ë6Ë;Ë;Ë;Ë;Ë;Ë;Ë;Ë;Ë;ËFËTËdËjËrË�ˆ˓˛ˠˠˠ˨˱˺ËÇËÏËÛËæËÌ"Ì1Ì;ÌUÌ[Ì`Ì`ÌgÌẑ̧̗̟̼̾ÌÉÌÑÌæÌæÌîÌÿÌÍÍÍÍÍ'Í,ÍPÍ\ÍdÍy͖͊ͦͦͦ͡ͅͼÍÙÍŞÍæÍ÷ÍÿÍÎÎ!Î,Î4ÎIÎNÎNÎrÎ~ΆΛΧάθÎÃÎÈÎÈÎÈÎÈÎÈÎÈÎÓÎÓÎÓÎÓÎÓÎÓÎÓÎÓÎÓÎÓÎÓÎÓÎŞÎíÎğÎşÎÏÏÏ+Ï0Ï8Ï@ÏBÏJÏYÏ_ÏgÏoÏqÏyϖϟϧϯ϶ÏÊÏÓÏÜÏäÏîÏøÏĞĞĞĞ*Ğ^ĞfĞuĞЙСЦЦЦЯилĞÅĞÓĞåĞçĞùĞ Ñ Ñ ÑÑÑ8Ñ=Ñ=ÑFÑKÑKÑKÑKÑKÑKÑKÑKÑKÑKÑKÑKÑKÑKÑKÑKÑVÑbÑzÑ�ѕѤѩѱѸÑÅÑÎÑ×ÑßÑæÑëÑëÑóÑûÑÒ!Ò$Ò&Ò6Ò@Ò@Ò@ÒBÒWÒhÒkÒnÒvÒ{Ò{Ò„Ò‰Ò‘Ò˜Ò¥ÒºÒÁÒÒÒŞÒûÒÓ)Ó>ÓEÓEÓJÓJÓJÓJÓJÓJÓJÓRÓ]ÓiÓxÓ}Ó}Ó…Ó�ÓšÓŸÓŸÓŸÓ£Ó¨Ó¨Ó¸Ó½Ó½Ó½ÓÉÓĞÓÖÓàÓåÓüÓ ÔÔ$Ô,ÔOÔUÔ\Ô^ÔdÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔkÔmÔmÔˆÔ’Ô Ô Ô¥Ô°Ô·ÔÓÔàÔàÔàÔäÔïÔ␍ÕÕ×Ax[××-×4×;×F×M×^×h×o×y׌ההׯ×É×Ïר×ß×â×í×ö×ı×ØØØØ,Ø2ØHØOØWØmØtØtØt؂ةزغØÌØÔØÔØÔØߨéØûØÙÙÙ&Ù-ÙBÙSÙSÙZÙZÙZÙhÙ�ٜ٥٭ٿÙÇÙÇÙÇÙÕÙİÙİÙàÙëÙÚÚVÚBt`¹gİgİİ�İ–İ�İ¨İ»İ¾İÆİÍİĞİàİîİùİŞŞŞ(Ş3Ş>ŞIŞTŞ[ŞnŞzޗޠިŞÈŞËŞÑŞÖŞåŞëŞóŞßßßßß*ß9ßAßPßXß{ß�߇߉ß�ߕߕߕߺ߿ßÜßßßßßæßóß÷ßàà(à8àKàgà|à„à�à­àÁàÁà5áC ?CO1O1Y1a1f1DÑÒÏZÏZğZûZ [ûZ&[4[4[D[M[T[X[a[a[i[m[�[›[§[­[¸[Ü[Ü[í[ø[ş[\
\
\\(\9\D\O\V\`\m\m\\„\„\’\—\—\¨\¨\»\À\Ñ\×\à\õ\ ] ]]]]!]!]&]-]5]<]>]F]M]M]\]b]o]v]~]¢]¢]ª]¹]Ä]Ë]Í]á]ğ]õ]ú]ú]ú]␍^^!^(^1^F^Z^Z^_^_^g^}^‚^–^�^¢^¢^®^½^Ï^Ş^ù^__0_B_Q_p_{_€_�_£_ª_±_Ä_Æ_Ô_ç_é_÷_```3`:`F`W`n`p`|`‡`‰`‰`”`¨`µ`½`¿`Ó`å`ì`ı` a-a4a@a^a^a^afaqaua}a�a‰a�a a«aÉaÎa×aâaëaóaøaøabb"b-b8bFbLbRbXbabgbvb�b–b¢b°bÇbÉbÒbİbßbëb cccc$c5c\cdcnc|c”c›c§c¶cËcËcØcİcïcõcõcõcõcÿdEDQ^+8N:]_w�—FœfÉ�U�U±U»UãUòUıUVV V'V0V?VFVOVTViVzV™V¡V£VÂVÊVÙVàVìVñVøVWWWWW4W WCWIWIWQWZWiWˆW�W‘W°W·W·W·WÎW×WãWçWõW XX#X(X9X>XTX@XcXiXpXxX~X€X‘X–X¬X˜X»XÁXÁXÉXÒXÒXÜXÜXôX$Y-Y9Y=YKYaYVYyYyY‹YG ;zŸâŸâ¾âÇâÊâÜâòâôâıâã#ãAãPãnã‚ãšã¡ãÇãåãôãä"ä9ä=ä=äAäFäKäUäXäbägä€äƒäƒäƒäƒäˆä�äªä¸äÄäÍäáäéäòäåå%å.åBåBåQåVåVådåHP‡—_C_C€CmC¢C�C±CÀCÈCÓCÕCàCëCëC␍DDIPÅÕ7ü7üKüPü_ü_üfü“ü©ü•üÆü¸üŞüæüJŒ¥Ä¯ú¯úâúûû!û%ûGû[û`û`ûgûoûwûŒû˜û©û®û¿ûÓûØûÚûÚûÚûöûüü1üKP�­‡=‡=°=²=À=Æ=á=ğ=ÿ=>>'>*>:>Lè7o0o0š0�0 0¦0«0Â0Ù0ğ010131R1l1~1‹1¡1´1¹1Ä1Ì1Ì1Ö1Ö1á1æ1û12 2?2A2V2\2{2š2¢2­2­2·2·2É23 313M$ 7]7]b]K]l]t]NLw†şÌşÌÍ%Í6ÍGÍNÍVÍfÍq͈͂ͺÍOTHYXeXejeleue~eŒe‘eše�e¢e°eºe½eÇeP¨!G°c°cÀcÉcÜcécõcd␍dd0d0d?dJdSdZdcdzd‘d–d¨d·dÃdÕdÕdŞdeeeee2e>eAeXeQhî„HpHpaplp|pÅpÌpàpçpïp÷pqqqqq"q)q0qOqgqpqpq¥qÏqØqúqr1r[rgr‰r‹r’r™r™r¼rØrÿrsBs^s…s¡sÈsäs t'tNtNt]tjtotot~t‹t�t�t—t¢t´tÌtätütştştştuuuuuu(u6uIu^ušu¡u¡u¡u©uÆuÔuòuûuvv v9vUvUvUvgvuv‘v¯v¯v¯vºv½vìvîvw ww%w'w4w6wCwEwRwRwvwxww�w™w›w©w«w¹w»wÉwÉwéwéwéwéw x=xcxkxoxwx{x‰x—x™x¡x¥x©x±x¿xÍxÍxçxòxyy<yUy`yjyqyŠy–y�y¶y¶yÈyÍyÏyÕyæy÷yz␍zz'z)z7z9zGzIzWzWzWz{z{zšz¡z¨z«z·zºzÈzÌzÚzŞzìzğzğz {{{#{6{={X{x{‹{š{œ{«{­{¼{Æ{Æ{Ô{İ{ó{ú{ |$|M|}|‚|�|’| |©|Ã|Å|Ç|Î|ß|è|ê|ø|ú|}
}}}8}8}8}8}8}W}W}W}b}~}£}¼}Á}Á}Á}ã}è}è}è}~␍~␍~␍~,~1~1~8~:~:~B~D~D~K~K~N~S~r~ˆ~­~É~İ~â~â~ı~
 $>@@E@fhhpk«««ÊÊÊëğğğ€€€€7€<€<€<€[€`€`€{€‰€‹€š€£€½€¿€¿€Ä€¿€å€ç€ç€ï€ê€*�*�*�5�5�_�_�‰�¡�¹�Ä�Ú�î�‚ ‚7‚U‚W‚h‚…‚œ‚£‚›†R| $§è§èÅèÓèéèéé&éBéBéBéOéjéléléléyé”é–é–é¤é±éÌéÌéÜéîéSædÖÜÖÜğÜùÜİİ İ'İ/İ7İ?İEİRİRİlİqİqİwİ|İ|݂݇݇İ�ݒݒݪݽİÃİÈİÈİÑİñİñİñİøİúİúİŞŞŞ Ş ŞŞŞŞŞŞ Ş!Ş!Ş'Ş'Ş.Ş.Ş6Ş<ŞBŞJŞJŞJŞJŞVŞ^ŞfŞnŞvŞ~ކތޤ޳޽ŞÀŞÀŞÊŞĞŞÖŞÖŞÚŞâŞéŞíŞõŞıŞß ßßß"ß&ß,ß7ß=ßJßVß\ßdßhßoßwß߃߉ߑߘߠߨ߲߽߬ßÂߨßéßîßñß–àTL”£p‡p‡‰‡‹‡’‡¨‡¸‡¾‡Ö‡î‡ñ‡ˆKˆUÔ*[�ğ�ğ¢ğ·ğÆğÊğØğáğğğğğÿğ
 $>@@E@fhhpk«««ÊÊÊëğğğ€€€€7€<€<€<€[€`€`€{€‰€‹€š€£€½€¿€¿€Ä€¿€å€ç€ç€ï€ê€*�*�*�5�5�_�_�‰�¡�¹�Ä�Ú�î�‚ ‚7‚U‚W‚h‚…‚œ‚£‚›†R| $ÇèÇèåèóè é#é;éFébébébéoéŠéŒéŒéŒé™é´éééÄéÑéìéìéüéêSædÖÜÖÜğÜùÜİİ İ'İ/İ7İ?İEİRİRİlİqİqİwİ|İ|݂݇݇İ�ݒݒݪݽİÃİÈİÈİÑİñİñİñİøİúİúİŞŞŞ Ş ŞŞŞŞŞŞ Ş!Ş!Ş'Ş'Ş.Ş.Ş6Ş<ŞBŞJŞJŞJŞJŞVŞ^ŞfŞnŞvŞ~ކތޤ޳޽ŞÀŞÀŞÊŞĞŞÖŞÖŞÚŞâŞéŞíŞõŞıŞß ßßß"ß&ß,ß7ß=ßJßVß\ßdßhßoßwß߃߉ߑߘߠߨ߲߽߬ßÂߨßéßîßñß–àTL”£p‡p‡‰‡‹‡’‡¨‡¸‡¾‡Ö‡î‡ñ‡ˆKˆUÔ*[�ğ�ğ¢ğ·ğÆğÊğØğáğğğğğÿğ
ññ ñ'ñ7ñNñeñkñpñtñ‡ñ‡ñ�ñŸñ©ñÍñØñÚñóñ÷ñò
ò
òò ò(ò;ò¥òV$×\×\]ë\ ]]WPÍİgFgFˆFuFªF—F¹FÈFĞFÛFİFèFóFóFGGX,f×f×o×u×}׆×�×”×Y�‡‘‡‘¨‘½‘ˑؑ ’’*’J’Z’Z’g’g’n’�’’�’�’š’¤’ª’°’³’Á’È’à’ç’ê’ÿ’“““4“N“_“e“k“r“�“x“™“Ÿ“¥“­“Í“µ“Ö“Ü“â“ê“ê“ñ“”÷“””$”,”L”4”U”[”a”i”i”i”””””Š”””�”½”ɔڔߔ𔕠• •••'•0•<•P•`•u•Š•§•¬•¬•·•¿•Ì•וç•ö•–(–=–H–M–M–X–n–ƒ–�– –¥–¶–Ê–Ê–Õ–Ê–í–ò–ò–——————+—0—0—A—F—F—Y—h—m—m—€—�—”—¢—”—¶—»—É—»—İ—â—ğ—â—˜ ˜˜ ˜+˜0˜0˜M˜R˜t˜y˜‡˜y˜›˜ ˜ ˜½˜˜ä˜é˜÷˜é˜ ™™™-™2™T™Y™g™Y™{™€™€™�™¢™Ä™É™×™É™ë™ğ™ğ™ ššš+š0š0šKšPšPškšpšpš‹š�š�š«š°š°šËšĞšĞšëšğšğš››››››(›3›H›M›M›Y›r›w›�›¤›®›³›Ä›Λã›î›ó›œœœœœ œ$œ+œ5œ?œ?œRœWœWœWœ[œtœ}œ}œ£œ¨œ¨œ°œÄœÍœçœôœÿœ
��'�3�<�A�A�A�R�o�z�„���”�Ÿ�§�¬�¬�·�¿�È�Ó�ã�û��'�,�,�7�J�T�_�€�Œ���¢�³�·�¼�¼�Ì�×�ß�ä�ï�ÿ�Ÿ+Ÿ@ŸUŸ`ŸeŸpŸxŸ}ŸˆŸ˜Ÿ§ŸÄŸÙŸîŸîŸîŸîŸóŸøŸøŸ   : < Y Y c w � ƒ � — ´ Å Ï Ú ı ¡ ¡0¡;¡S¡c¡h¡h¡s¡x¡x¡€¡‹¡�¡�¡˜¡£¡¨¡¨¡°¡Ñ¡º¡¸¡é¡î¡î¡ö¡¢¢ş¡/¢4¢H¢4¢`¢e¢e¢r¢w¢w¢¢„¢„¢–¢¨¢­¢­¢Á¢­¢Ù¢Ş¢Ş¢æ¢ë¢ë¢ş¢£££££5£E£J£J£d£t£y£y£“£££¨£¨££Ò£×£î£×£¤ ¤ ¤¤¤W¤E¤3¤¤o¤t¤°¤�¤Œ¤t¤Ȥͤͤܤì¤ñ¤ñ¤¥¥¥¥$¥2¥7¥_¥M¥7¥w¥|¥¤¥’¥|¥¼¥Á¥é¥×¥Á¥¦¦¦#¦␍¦M¦]¦b¦b¦}¦i¦§¦·¦¼¦¼¦ȦͦͦÙ¦ަަñ¦§§§§)§.§.§A§Q§V§V§i§y§~§~§†§‹§‹§“§˜§˜§ §¥§¥§­§²§²§ŧʧʧݧâ§0¨¨ ¨ú§â§=¨B¨�¨~¨l¨Z¨B¨�¨¢¨¢¨±¨̨ѨѨâ¨ı¨©©©!©&©&©.©3©3©;©@©@©H©M©M©…©s©a©T©¤©¿©Ä©Ä©ü©ê©Ø©Ë©ª6ª;ªpª^ªSª;ªˆª�ªª°ª¥ª�ªÚªߪùªãªߪ««3«««K«P«P«\«u«…«–«–«»«½«Ó«Ù«Ù«ö«¬4¬e¬S¬ˆ¬�¬�¬�¬œ¬¡¬¡¬´¬¿¬ɬάÙ¬ã¬è¬è¬­­­­­(­­7­B­G­[­G­j­u­z­z­…­–­›­›­¦­±­¶­¶­Ç­Ì­Ì­æ­ñ­ö­®ö­®®)®®8®=®H®=®W®\®p®\®®„®„®˜®„®§®§®§®¬®¸®¬®Ë®Ğ®Ğ®Ü®Ğ®ï®ô®ô®¯ô®¯¯¯$¯¯7¯<¯P¯<¯_¯k¯v¯�¯†¯š¯†¯©¯µ¯À¯˯Яä¯Яû¯ó¯° ° °°°° °$°$°-°2°2°;°@°@°K°P°P°[°`°`°k°p°p°{°€°€°‹°�°�°›° ° °«°°°İ°°Ó°ްé°ô°ù°ù°±±±±±±!±&±&±0±5±5±=±B±B±O±T±T±a±f±f±f±f±f±n±s±s±{±€±€±ˆ±�±�±•±š±š±¢±§±»±§±ʱÛ±à±à±ç±ò±²²-²8²Q²=²`²k²v²{²{²‚²�²­²²²ȲÓ²ì²زû²³³³³³(³H³M³c³n³‡³s³–³¡³¬³±³±³̳¸³Û³û³´´!´:´&´]´I´l´w´|´|´—´ƒ´¦´Æ´Ë´á´ì´µñ´(µµ7µBµGµGµbµNµqµ‘µ–µ¬µ·µе¼µóµßµ␍¶!¶&¶&¶5¶:¶:¶:¶@¶E¶E¶E¶O¶Q¶Q¶[¶b¶…¶‡¶‡¶‘¶‘¶‘¶‘¶‘¶“¶“¶ª¶±¶¼¶¼¶ǶͶÔ¶ß¶ê¶õ¶ï¶·-·"·E·E·S·M·y·n·‘·‘·‘·š·¡·´·¹·Ç·Ú·Ú·ù·¸¸;¸;¸;¸\¸l¸�¸“¸£¸£¸ȸϸ޸ğ¸ğ¸ô¸ù¸¹¹/¹/¹3¹J¹Q¹V¹V¹Z¹e¹q¹¹¬¹µ¹ƹÔ¹ººº.ºFºRºcºhºyº˜ºƺïºòº»»»»'»2»2»5»F»w»š»š»�»ĽZ, –זפת׮׷×Àׯ×[`BV—‰—‰­‰»‰‰ƉÕ‰î‰ò‰ø‰Š+Š-Š-Š^ŠLŠ-Š}ЇŠ\8
g\g\ˆ\u\—\¢\­\¸\Ã\Ï\Õ\]\’8¡8¡F¡H¡S¡[¡f¡q¡|¡~¡”¡”¡¦¡²¡»¡¾¡í¡^øª¤—î—î¼îÁîÎîúîúîïï0ï8ïeïjï“ï³ïÏïÕïÙïüï"ğ'ğPğmğ“ğªğ°ğ´ğÍğÕğÚğëğóğñññ5ñ=ñ\ñañrñzñ™ñ�ñ¦ñ¬ñ°ñ´ñÆñÎñÓñññöñòòòò-ò<òIòiòiò€ò…ò…òœò�ò�ò²ò´ò´òËòÍòÍòäòæòæòıòıòóóó&ó&ó_óxóxó‹ó�ó�ó�ó�ó¿ó×óóóóóóóôôôôô&ô=ô?ô?ôLôcôcôzô|ô—ô³ô³ô³ô·ô¹ô¹ô¹ô¾ôÀôÀôÅôÅôÏôÔôÔôğôğôğôøôıôıôıôõ
õ
õõõõ>õ@õ`õ€õ€õ€õ€õ€õšõ�õ²õ¹õ»õÄõ×õÙõåõåõíõÿõÿõ öö5ö?ögöyö•öµöÖöêö÷-÷@÷_÷…÷�÷­÷Ã÷ß÷ä÷ä÷øøø0ø0ø<øNøSøSøgø…øªø½øÜøù#ù2ù`ùrù|ù�ù ù ù ù¬ù¬ù¬ùÊùúùüùüù ú úúúúúú'ú,ú?ú�ú_\
·Q·QÉQßQûQR R2R=RRR?RaRiRtRŠR€R¢R¨R`øAï<ï<␍====%=)=+=2=9===A=T=|=—=„=¯=´=Ø=Ø=ä=ì=û=5>:>g>o>t>}>‰>‘>˜>º>À>â>ä>??4?:?A?A?G?J?N?_?‚?”?a$GáGáVáqáqáwáb|XsÇëÇëáë␍ì␍ì,ì<ì>ì>ì>ì>ìEìMìhì�ìƒìƒìƒì‹ì¦ì¨ì¨ì²ì²ìÊìc”"§5§5É5Ó5ß5ä5ô5ú56#636A6O6f6n6x6‡6�6œ6¤6§6§6§6©6¸6Â6Ë6Ó6Ö6è6dôÍ×9×9:␍::: :6:M:d:o:¥:Å:Ê:Ï:Ú:ô:;;);?;V;[;m;r;u;•;µ;½;Å;Ê;ê;
<<<<<<D<I<N<Y<Y<d<d<p<p<‚<Â<Û<Û<ë<ed¤¹(�(�8�?�K�Q�Y�g�z�†� �­�­�°�¾�Î�è�ì�ô�f(¸şr*r*ˆ*�*¡*Ğ*à*ç*÷*+
++8+b+s+�+�+ˆ+˜+¤+´+½+Ô+Ô+ê+ê+,,,,,,,,B,B,X,X,n,n,„,„,›,›,²,²,É,É,à,à,÷,÷,--%-%-<-D-O-`-k-|--�-˜-Ÿ-á.g¬÷  8 > E M U X c u u Œ “ – ˜ ¤ µ µ ¸ À Ö Ù ç ê í ô ø    3 6 … h(ÅËǃǃîƒÛƒıƒ„„i=ÏQÏQòQR RRR$R1R7R@RFRKRjRƒRˆR�R�R’RŸRŸR¤R­RµR¾RÆRÈRĞRØRàRíRóRşRSS S/SPSWSbSkS|S€SˆSˆSœS¬S´S·STj8-7"0"060:0?0J0U0X0\0d0kˆWõ‡Š‡Š¡Š¼ŠŠÉŠÉŠĞŠõŠúŠ‹#‹␍‹2‹E‹W‹`‹h‹r‹�‹¢‹«‹³‹½‹Ø‹‹ç‹ù‹Œ Œ#Œ␍ŒHŒ2ŒWŒiŒsŒ{Œ{Œ„ŒŒŒ¢Œ»ŒÍŒÜŒàŒàŒçŒìŒ
� ���2�2�2�6�B�c�m�w�€�¡�«�µ�·�·�Ô�â�ğ�ó� ��+�/�N�R�m�q�q�q�w�…���¨�®�¹�Å�Ç�Ï�Õ�î�ù���*�-�5�A�C�K�N�g�i�u�w��…����Â�×�Ü�ñ���+�+�6�A�Y�e�z��”�¤�½�Î�Î�Ô�ß�ç�õ�ü�‘leã–à–à°à¹àÙàÙàßàçàïà÷àÿàááá á%á%á+á0á0á6á;á;áAáFáFá^áqáwá|á|á…á¥á¥á¥á¬á®á®áµá·á·á½á½áÄáÆáÆáÌáÌáÓáÕáÕáÛáÛáâáâáêáğáöáşáşáşáşá
òò ò(ò;ò¥òV$÷\÷\"] ],]4]WPÍ݇F‡F¨F•FÊF·FÙFèFğFûFıFGGG5G;GX,f×f×o×u×}׆×�×”×Y�§‘§‘È‘İ‘ë‘ø‘+’8’J’j’z’z’‡’‡’�’¡’Ÿ’¯’¯’º’Ä’Ê’Ğ’Ó’á’è’““
“ “$“/“:“T“n““…“‹“’“°“˜“¹“¿“œ͓í“Õ“ö“ü“”
”
””/””8”>”D”L”l”T”u”{”�”‰”‰”‰”Ÿ”Ÿ”Ÿ”Ÿ”ª”´”½”İ”é”ú”ÿ”•$•)•)•4•<•G•P•\•p•€•••ª•Ǖ̕̕וß•ì•÷•––3–H–]–h–m–m–x–�–£–¯–À–Å–Ö–ê–ê–õ–ê–␍———!—&—&—5—:—:—K—P—P—a—f—f—y—ˆ—�—�— —¯—´——´—Ö—Û—é—Û—ı—˜˜˜$˜)˜7˜)˜K˜P˜P˜m˜r˜”˜™˜§˜™˜»˜À˜À˜ݘ☙ ™™ ™+™0™0™M™R™t™y™‡™y™›™ ™ ™½™™ä™é™÷™é™ ššš+š0š0šKšPšPškšpšpš‹š�š�š«š°š°šËšĞšĞšëšğšğš ›››!›&›&›7›<›<›H›S›h›m›m›y›’›—›½›Ä›ΛÓ›ä›î›œœœ$œ/œ7œ<œ<œ@œDœKœUœ_œ_œrœwœwœwœ{œ”œ�œ�œÜȜȜМäœíœ�� �*�5�G�S�\�a�a�a�r���š�¤�¯�´�¿�Ç�Ì�Ì�×�ß�è�ó���3�G�L�L�W�j�t�� �¬�½�Â�Ó�×�Ü�Ü�ì�÷�ÿ�ŸŸ Ÿ.ŸKŸ`ŸuŸ€Ÿ…Ÿ�Ÿ˜Ÿ�Ÿ¨Ÿ¸ŸÇŸäŸùŸ       $ 5 5 Z \ y y ƒ — ¡ £ ¯ · Ô å ï ú ¡.¡?¡P¡[¡s¡ƒ¡ˆ¡ˆ¡“¡˜¡˜¡ ¡«¡°¡°¡¸¡áȡȡСñ¡Ú¡Ø¡ ¢¢¢¢7¢ ¢¢O¢T¢h¢T¢€¢…¢…¢’¢—¢—¢Ÿ¢¤¢¤¢¶¢È¢Í¢Í¢á¢Í¢ù¢ş¢ş¢£ £ ££#£#£6£;£;£U£e£j£j£„£”£™£™£³£ãȣȣâ£ò£÷£¤÷£&¤+¤+¤6¤;¤w¤e¤S¤;¤�¤”¤Ф¾¤¬¤”¤è¤í¤í¤ü¤ ¥¥¥ ¥0¥5¥5¥D¥R¥W¥¥m¥W¥—¥œ¥Ä¥²¥œ¥Ü¥á¥ ¦÷¥á¥!¦&¦&¦C¦-¦m¦}¦‚¦‚¦�¦‰¦Ǧצܦܦè¦í¦í¦ù¦ş¦ş¦§!§&§&§9§I§N§N§a§q§v§v§‰§™§�§�§¦§«§«§³§¸§¸§À§ŧŧͧÒ§Ò§å§ê§ê§ı§¨P¨>¨,¨¨¨]¨b¨°¨�¨Œ¨z¨b¨½¨¨¨Ѩì¨ñ¨ñ¨©©"©"©3©A©F©F©N©S©S©[©`©`©h©m©m©¥©“©�©t©Ä©ß©ä©ä©ª
ªø©ë©;ªVª[ª�ª~ªsª[ª¨ª­ªâªЪŪ­ªúªÿª««ÿª1«6«S«=«6«k«p«p«|«•«¥«¶«¶«Û«İ«ó«ù«ù«¬#¬T¬…¬s¬¨¬°¬°¬°¬¼¬Á¬Á¬Ô¬߬é¬î¬ù¬­­­"­'­'­/­4­H­4­W­b­g­{­g­Š­•­š­š­¥­¶­»­»­Æ­Ñ­Ö­Ö­ç­ì­ì­®®®!®®0®5®I®5®X®]®h®]®w®|®�®|®Ÿ®¤®¤®¸®¤®Ç®Ç®Ç®Ì®Ø®Ì®ë®ğ®ğ®ü®ğ®¯¯¯ ¯¯3¯8¯8¯D¯8¯W¯\¯p¯\¯¯‹¯–¯¡¯¦¯º¯¦¯ɯÕ¯à¯ë¯ğ¯°ğ¯°°$°)°)°1°6°6°?°D°D°M°R°R°[°`°`°k°p°p°{°€°€°‹°�°�°›° ° °«°°°°°»°À°À°˰аä°аó°ş° ±±±±#±(±(±2±7±7±A±F±F±P±U±U±]±b±b±o±t±t±�±†±†±†±†±†±�±“±“±›± ± ±¨±­±­±µ±º±º±±DZÛ±DZê±û±²²²²2²7²M²X²q²]²€²‹²–²›²›²¢²­²ͲÒ²è²ó² ³ø²³&³1³6³6³=³H³h³m³ƒ³�³§³“³¶³Á³̳ѳѳì³سû³´ ´6´A´Z´F´}´i´Œ´—´œ´œ´·´£´Æ´æ´ë´µ µ%µµHµ4µWµbµgµgµ‚µnµ‘µ±µ¶µ̵×µğµܵÿµ"¶-¶2¶2¶A¶F¶F¶U¶Z¶Z¶Z¶`¶e¶e¶e¶o¶q¶q¶{¶‚¶¥¶§¶§¶±¶±¶±¶±¶±¶³¶³¶ʶѶܶܶç¶í¶ô¶ÿ¶
···0·M·B·e·e·s·m·™·�·±·±·±·º·Á·Ô·Ù·ç·ú·ú·¸$¸;¸[¸[¸[¸|¸Œ¸¡¸³¸øøè¸ï¸ş¸¹¹¹¹ ¹0¹O¹O¹S¹j¹q¹v¹v¹z¹…¹‘¹Ÿ¹̹Õ¹æ¹ô¹'º3º8ºNºfºrºƒºˆº™º¸ºæº»»"»$»$»(»G»R»R»U»f»—»º»º»½»ä½Z, –זפת׮׷×Àׯ×[`BV·‰·‰͉Û‰â‰æ‰õ‰ŠŠŠ.ŠKŠMŠMŠ~ŠlŠMŠ�ЧŠ\8
‡\‡\¨\•\·\Â\Í\Ø\ã\ï\õ\]\’8¡8¡F¡H¡S¡[¡f¡q¡|¡~¡”¡”¡¦¡²¡»¡¾¡í¡^øª¤·î·îÜîáîîîïï%ï2ïPïXï…ïŠï³ïÓïïïõïùïğBğGğpğ�ğ³ğÊğĞğÔğíğõğúğ ññ2ñ8ñ<ñUñ]ñ|ñ�ñ’ñšñ¹ñ¾ñÆñÌñĞñÔñæñîñóñòò#ò(ò(ò5òMò\òiò‰ò‰ò ò¥ò¥ò¼ò¾ò¾òÒòÔòÔòëòíòíòóóóóó2ó7ó7óFóFóó˜ó˜ó«ó°ó°ó°ó°óßó÷óôôô ô7ô9ô9ô9ôFô]ô_ô_ôlôƒôƒôšôœô·ôÓôÓôÓô×ôÙôÙôÙôŞôàôàôåôåôïôôôôôõõõõõõõ%õ*õ*õ2õ2õ4õ^õ`õ€õ õ õ õ õ õºõ½õÒõÙõÛõäõ÷õùõöö␍ö ö ö+ö>öUö_ö‡ö™öµöÕööö
÷(÷M÷`÷÷¥÷¾÷Í÷ã÷ÿ÷øø8ø=ø=øPøPø\ønøsøsø‡ø¥øÊøİøüø"ùCùRù€ù’ùœù¾ùÀùÀùÀùÌùÌùÌùêùúúú+ú+ú0ú0ú0ú0ú0úGúLú_ú®ú_\
×Q×QéQÿQR(R?RRR]RrR_R�R‰R”RªR RÂRÈR`øA==-=0=7=>=E=I=K=R=Y=]=a=t=œ=·=¤=Ï=Ô=ø=ø=> >>U>Z>‡>�>”>�>©>±>¸>Ú>à>??&?2?T?Z?a?a?g?j?n??¢?´?a$gágává‘á‘á—áb|Xsçëçëì-ì-ìLì\ì^ì^ì^ì^ìeìmìˆì¡ì£ì£ì£ì«ìÆìÈìÈìÒìÒìêìc”"Ç5Ç5é5ó5ÿ5666/6C6S6a6o6†6�6˜6§6¯6¼6Ä6Ç6Ç6Ç6É6Ø6â6ë6ó6ö67dôÍ÷9÷9 :-:0:9:?:V:m:„:�:Å:å:ê:ï:ú:;&;3;I;_;v;{;�;’;•;µ;Õ;İ;å;ê;
<*<2<:<<<\<d<i<n<y<y<„<„<�<�<¢<â<û<û< =ed¤¹(�(�8�?�K�Q�Y�g�z�†� �­�­�°�¾�Î�è�ì�ô�f(¸şr*r*ˆ*�*¡*Ğ*à*ç*÷*+
++8+b+s+�+�+ˆ+˜+¤+´+½+Ô+Ô+ê+ê+,,,,,,,,B,B,X,X,n,n,„,„,›,›,²,²,É,É,à,à,÷,÷,--%-%-<-D-O-`-k-|--�-˜-Ÿ-à.g¬÷  8 > E M U X c u u Œ “ – ˜ ¤ µ µ ¸ À Ö Ù ç ê í ô ø    3 6 … h(ÅËçƒçƒ„ûƒ„/„7„i=ïQïQR'R,R4R<RDRQRWR`RfRkRŠR£R¨R®R°R²R¿R¿RÄRÍRÕRŞRæRèRğRøRS␍SSS%S5S@SOSpSwS‚S‹SœS S¨S¨S¼SÌSÔS×S=Tj8-7"0"060:0?0J0U0X0\0d0kˆWõ§Š§ŠÁŠÜŠâŠéŠéŠğŠ‹‹%‹C‹-‹R‹e‹w‹€‹ˆ‹’‹°‹‹Ë‹Ó‹İ‹ø‹â‹ŒŒ#Œ+ŒCŒ-ŒhŒRŒwŒ‰Œ“Œ›Œ›Œ¤Œ¬ŒÂŒÛŒíŒüŒ��� �*�,�1�<�R�R�R�V�b�ƒ���—� �Á�Ë�Õ�×�×�ô����,�0�K�O�n�r���‘�‘�‘�—�¥�¯�È�Î�Ù�å�ç�ï�õ���'�1�J�M�U�a�c�k�n�‡�‰�•�—�Ÿ�¥�¾�Ö�â�÷�ü��!�:�K�K�V�a�y�…�š�Ÿ�´�Ä�İ�î�î�ô�ÿ�‘‘‘.‘leã–à–à°à¹àÙàÙàßàçàïà÷àÿàááá á%á%á+á0á0á6á;á;áAáFáFá^áqáwá|á|á…á¥á¥á¥á¬á®á®áµá·á·á½á½áÄáÆáÆáÌáÌáÓáÕáÕáÛáÛáâáâáêáğáöáşáşáşáşá
âââ"â*â2â:â@âXâgâqâtâtâ~â„âŠâŠâ�â–â�â¥â­â±â·â¿âÆâÎâÖâÚâàâëâñâşâ
ãããã#ã+ã3ã7ã=ãEãLãTã\ã`ãfãqãvãŒã�ã¢ã¥ãJäm`b!b!k!r!†!š!Ÿ!½!Â!à!â!"""-"6"8"L"\"�"n�2Ò`•`•v•‡•˜•©•º•˕ޕæ•ô•––#–0–E–E–X–i–o–„–Ÿ–Ÿ–«–³–»–Á–Ö–Ş–â–ê–ø–ş–———-—4—<—D—J—m—€—Œ—�—š—³—¹—»—È—Ê—Ü—Ü—ã—ë—ı—ı—.˜<˜O˜S˜]˜a˜m˜q˜}˜�˜�˜‘˜‘˜§˜º˜À˜Ä˜Î˜Ò˜á˜å˜ô˜ø˜ ™™™™™&™4™A™I™`™p™~™‰™Ÿ™¬™»™Ã™Ğ™ë™û™ šššššš,š4š:šOš^šsš„š”ššššššš¬š²š¾šÄšÑšìšüš›››-›;›]›çœoÔ¼íXnXnjn{n†n‘nªn¼nÔnÙnènïnünooooo"o$o*oDo^otoŒo‘o o§o´oËoéoğoòoõoúop;pGpp$hm&& &4&;&U&qxKeTT§T“TTÑT½TàTåTìTôTûTUUU!U,U7UMUBUeUmUrR� u u;uBuZuru|u‡u‡uŒu—u£u®u¼uÌuÜuãuéuşuvv'v/v?vLv[vhvyvŠv˜v¦v­v³vÈvİvİvñvşvw w(w9w9w?wMw^wkw{wİws8³½QQƒQˆQ�Q�Q¬QµQºQ¿QÁQt88Bj0j0~0‚0‡0’0œ0Ÿ0£0«0u0ˆ�ŸOŸOµOÈOÕOÛOŞOæOvÜt††¨³¾Ç×éïõû%25=OUZ}�”š±·ÇÍÙçìú!*:<CHPo}‰£ÂÉÓâèîôú1EQhs‚�Ÿ¬¼Êáíò.ENT_dj�Œ™  ®½¿ÍÜîîö$Xw`-A—ˆ—ˆ­ˆ¿ˆƈʈÙˆøˆüˆ‰‰5‰7‰7‰h‰V‰7‰‡‰‘‰xD‡ÔGåGåYåaålåråxå|å€å¬å¬å³åå»åÍåÑåøåüåæææ æææ-æ1æBæTæXæZælæpæŒæ�æ•æ•æ©æ¬æºæÄæËæñæüæçç;çTç_çcçtççƒç…ç�ç”ç”ç¨ç¬ç®ç®ç¹ç½çÑçÕçÕçÕçÙçûçyˆÕóÿçÿçè)è)è)è+è+è2è4è4è;è=è=èJèLèLèYè`èbèbèoèvèxèxè�è•è•è¥èz°0XÇ]Ç]ß]ç]ò]V^<^1^^^\^n^^^�^�^¥^™^×^Ü^è^ı^ê^ ___=_,_ _T_V_r_r_y_£_£_£_¯_{ÄL¹.ü.üLüWübüˆüˆüŠü—ü¢ü¨ü¹üÈü×üäüäüêüïüôü
ãããã#ã+ã3ã7ã=ãEãLãTã\ã`ãfãqãvãŒã�ã¢ã¥ãJäm`b!b!k!r!†!š!Ÿ!½!Â!à!â!"""-"6"8"L"\"�"n�2Ò`•`•v•‡•˜•©•º•˕ޕæ•ô•––#–0–E–E–X–i–o–„–Ÿ–Ÿ–«–³–»–Á–Ö–Ş–â–ê–ø–ş–———-—4—<—D—J—m—€—Œ—�—š—³—¹—»—È—Ê—Ü—Ü—ã—ë—ı—ı—.˜<˜O˜S˜]˜a˜m˜q˜}˜�˜�˜‘˜‘˜§˜º˜À˜Ä˜Î˜Ò˜á˜å˜ô˜ø˜ ™™™™™&™4™A™I™`™p™~™‰™Ÿ™¬™»™Ã™Ğ™ë™û™ šššššš,š4š:šOš^šsš„š”ššššššš¬š²š¾šÄšÑšìšüš›››-›;›]›çœoÔ¼íXnXnjn{n†n‘nªn¼nÔnÙnènïnünooooo"o$o*oDo^otoŒo‘o o§o´oËoéoğoòoõoúop;pGpp$hm&& &4&;&U&qxKeŸTŸTÇT³TÖTñTİTUU UUU&U1U9UAULUWUmUbU…U�UrR�?u?u[ubuzu’uœu§u§u¬u·uÃuÎuÜuìuüuv vv3v3vGvOv_vlv{vˆv™vªv¸vÆvÍvÓvèvıvıvww/w?wHwYwYw_wmw~w‹w›wıws8³½ŸQŸQ£Q¨Q­Q¾QÌQÕQÚQßQáQt88Bj0j0~0‚0‡0’0œ0Ÿ0£0«0u0ˆ�¿O¿OÕOèOõOûOşOPvÜt††¨³¾Ç×éïõû%25=OUZ}�”š±·ÇÍÙçìú!*:<CHPo}‰£ÂÉÓâèîôú1EQhs‚�Ÿ¬¼Êáíò.ENT_dj�Œ™  ®½¿ÍÜîîö$Xw`-A·ˆ·ˆ͈߈æˆêˆùˆ‰‰"‰8‰U‰W‰W‰ˆ‰v‰W‰§‰±‰xD‡Ôgågåyå�åŒå’å˜åœå åÌåÌåÓåÖåÛåíåñåææ!æ!æ(æ+æ0æ<æMæQæbætæxæzæŒæ�æ¬æ°æµæµæÉæÌæÚæäæëæçç ç%ç[çtççƒç”çŸç£ç¥ç°ç´ç´çÈçÌçÎçÎçÙçİçñçõçõçõçùçèyˆÕó è è3èIèIèIèKèKèRèTèTè[è]è]èjèlèlèyè€è‚è‚è�è–è˜è˜è°èµèµèÅèz°0Xç]ç]ÿ]^^v^\^Q^7^ ^|^�^~^®^®^Å^¹^÷^ü^__
_,_2_9_]_L_@_t_v_’_’_™_Ã_Ã_Ã_Ï_{ÄL¹.ü.üLüWübüˆüˆüŠü—ü¢ü¨ü¹üÈü×üäüäüêüïüôü
ıı(ı,ı>ıKıSı^ıZıuıƒıƒıƒı�ı©ı”ı±ıÄıÆıâıÎıêıøıøıúışşş#ş,ş3ş6şXşlş_ştşzşƒşƒşƒş–ş›ş›ş£ş£ş®şÃşÌşÌşÌşÌşèşÿşÿ
ÿ
ÿ ÿ%ÿ*ÿ*ÿ6ÿSÿsÿxÿ}ÿ}ÿ‰ÿ¦ÿµÿÄÿÌÿÑÿ×ÿÜÿÜÿãÿêÿ␍*,I^^ddqzz˜®¹¾ËÖßç÷06_hhjqvvƒ�”��°½ÏÚèñö )49@H[pu|‰�¢·¾ÄÍÍÖğ÷ü
((.5>>Qcffw‡“°·ÄÆÍáğğğ''<GYfqŠ™  ¹ÌÎİòô&&39KKX[fxŠ�—�©®ÃÅßôôôöı"44:AJOs||‚‹‹ªª·ºÃÌÔßñ÷$,7IOZZgjs|~ ³ÈÎÙëñùùùù} |t·ĞJ4J4\4e4h4q4z4Œ4Œ4¸4¼4Á4Ä4Í4Ü4â4å4í4ğ4õ4ÿ4}`2¯R¯R×RÃRæR S÷RS S&S.S5S@SHSSSiS^S�S‰S~À-àgàgşghhh"h"h,h>hKhNhPhYhfhfhthˆhˆh¬h¹h¹hÉhÖhÖhùhiii=iRiti}iŠiŠi­i·i·iêij#j#j#j5jt�R3R3f3‡3™3­3´3À3Ú3ã3é3ü344444 444:4<4<4D4€¸ºäø�ø����"�/�2�L�L�L�R�V�^�i�}�‰�‹�‹�”�–�–�Ÿ�¡�¡�ª�¬�¬�µ�µ�¾�Ä�Ç�Ñ�â�è�ô�ô�\��œøÿ)ÿ)*.*F*M*i*^*�*¡*�*°*Á*Æ*ç*Ó*ÿ*+#+?+4+W+w+c+†+—+­+™+Å+Ò+Ò+ê+ê+ô+‚œ¢ç3ç3ó34484h4y4Š4œ4£4ª4¾4Å4Ó4ë4ú45
5#5&5+5B5R5b5f5m5£5ƒx± P±P±f±m±t±“±¢±±±À±Ï±Ş±è±è±í±ô±²²²6²P²P²f²x²|²Š²‘²–²–²�²¯²¸²º²È²Ú²Ú²Ú²ì²÷² ³³!³&³6³;³K³W³\³i³n³~³ƒ³“³•³¥³§³·³¹³Ê³Ó³Ó³Õ³å³ì³ü³ü³´)´;´M´]´]´]´`´s´„\åø`�`�{�‚�‡�•�ª�±�»�É�Ì�Î�Ø�ê�ê�ñ�'�…0ÎÖff~¾²ˆ†ÒÚ†`,—‡—‡­‡¿‡ƇЇ߇ø‡ü‡ˆˆ5ˆ7ˆ7ˆhˆVˆ7ˆ‡ˆ‘ˆ‡L[j_2_2m22…2�2Ÿ2¥2®2À2Æ2É23ˆ(–œ"3"303?3C3F3L3‰\k~333'3-353G3M3V3h3n3w3‰3�3’3à3Š, >×>×L×S×[×`×f׋„ ÇÇå÷ş;;@bwd†•—¹¹¹ÈäÚüŒ`J§i§iÄiÌiÓiøijjj#j)j4jKjZjejijtj€j‡j“jªjÁjÔjëjõjkkk%k7k7k@kQkWkgkgkkk¤k¤k©k©k²k¾kËk×kìklll/l;lRljl‹l‹l”l™l™l™l™l©l²lºl¿lÍlÛlëlğlğlşlşlmm␍mm*m0m<mLmWmamemnm‡mŠmšm¡m¿mÈmÈm×mçm÷mşmnnn#n*n.nAnGnTn_nenun…n…n²nĞnÜnänïnönoo!o!o1o6o6o@oKo]ocoqo~o‹o•o™o¢o»o¾oÎoÕoÚoÚoîoîoóo÷opp"p(p*p*p8p>pGpXpapmp}p}p}p‚pšpšp©p¬pÀpŞpépq$q/qAqEqJqQqcqsq�q•q™qŸq§q²qÁr�8í÷_)_)y)�)¤)Å)²)İ)õ)õ)ÿ)�`j~€ €   § ¯ º Ä Ï × æ ğ ó ¡¡*¡*¡8¡�_OÛOÛqÛxÛÛ„Û›Û­Û·Û½ÛÏÛÔÛàÛèÛëÛíÛ÷ÛÜÜÜ␍ÜÜÜ'Ü0Ü8Ü;ÜDÜ_ÜpÜwÜzÜÜ�ܔܜܜܣܦܫܺÜÀÜÈÜÈÜÖÜÙÜŞÜíÜøÜİİ İ İ&İ-İDİ�83=ØØ'Ø'Ø5Ø9ØGØJØOØ‘8>HVØVØ_Ø_ØmØqØxØ{؀ؒDDQg1g1�1”1�1¥1±1É1Ò1Ö1è1î1␍2“Ä{¨��¹¼ÃÈÎĞÕÛÛíô
,24;AKK_ahnxxx�¡¨·¹Ïââô”0RZ222>2O2U2U2]2•„\y¦ò¦ò¸òÍò×òàòâòéòùòóóóóó*ó-ó-óQó\ó^ówó~ó‚ó‘ó¤ó÷ó– 
^0^0g0„0‰0—hÿfÿfg g+g9gDgMg^gggxg~gŠg¡g¡g³gÄgÑgÚgëgñg?h˜„a~WMWM‡M�M–M¢MªM±MµM¾M¾MÃMÊMâM NN5N=N?NWNoN“N²NÄN™lò ··Ïáèï5J7lY{{�”¾š y}°‹°‹¹‹Å‹Ê‹›(A~è~è è¨è®è¶è¸è¸èÉèÉèÉèÑèÙèëèúèëèééé+é-é-é8é=éWé\é\é\éqésé€é‚é�é‘é�é¦é®éµéÄéÑéÓéäéñéñéñéúé ê ê%ê-ê/ê<ê<êQêQêQê\êfê~êƒêƒêƒê‘ê—êœê¤ê¯êÁêÌêÑêÑêØêÜêêêîê÷êşêë)ë0ë9ëUëZëZëZëZëbëmë{ë{ë›ë›ë›ë¢ë°ë¿ëÒëåëçëçëçëúëúëìì␍ìì%ì/ìKìuì{ì{ì�ì”ì¸ì¿ìËìéìüìííííííí'í5íWíbíí‰í‰í—íµíåíøí î î3î8î8î8î@îKî]îhîmîmîmîî©î¯î¯î¯îºîÄîĞîÛîİîİîİîâîîîîî8ïœH%‚/‚/�/—/¢/¯/º/Â/Â/Ú/ä/ê/ğ/�0 ?Q?QfQSQuQ‘Q‡Q©Q±Q�LİìO(O(i(~(”(µ(¢(Í(Ò(ı() )6)N)N)X)Ÿğ·ÇNÇNüNOOO$OCOCOMOOOjOROyOyO‡O‘O˜O¸OºOÔOÛOÛO÷O÷OP#PBP[PxP{PƒPŠPªP¬PÆPÍPÍPéPéPQQ-Q?Q TVgÎÎäñ÷ı*<@FTWa¡0
R¿¿îãû2AMR^nu‚�™¤¬±½ÂÖİáìñü*/CJNNSlqŠŸ±ÁÉÉÉËäù    & . . > 3 V v ¢àZ�ÈeÈeâeğeõefff4fBfgfpf€f›f¦f¶f¸fºfÄfĞfÔfáfífÿfg g#g#g#g#g(gFg`g`gggjgrg~g‡gİg£d1÷+÷+,-,>,E,a,V,y,™,…,¨,¹,Ï,»,ç,ô,ô, - --¤ü!\ 1<iOCx™®›ãɽò!>>sŠ~¼ÁÔÈüê ,D1_S‡u–³³³Åââ
,,4¥(�å�åœå¿åÅåÊåÊåĞå¦(!'Æ×Æ×Ï×İ×ã×å×ê×§D]j::2:9:B:N:c:k:q:w:y:y:‰:¨„¼Ùàªàª« «#«+«3«7«B«F«J«N«V«[«_«p«�«ƒ«‡«˜«©«¸«Ë«Ó«Ş«Ş«Ş«ğ«©€èœèœ�����,�7�A�L�c�f�h�ƒ���—���©�»�Ã�Ã�Ù�Ù�ë�ª Ê oYoY•Y²YºYÅYÕYŞYâYıYZ,Z2Z:Z=ZRZWZiZ‹Z‘Z™Z�Z¤Z§Z½ZÆZÈZêZòZ[ [[=[C[H[H[H[U[f[q[~[Š[�[ª[·[Î[â[ì[î[\\\)\0\S\S\S\e\«<ÑÜ55 555$5,545;5K5K5P5¬°)8£8£[£h£m£q£z£‰£•£ £«£³£¾£Æ£É£Õ£İ£÷£¤¤-¤6¤k¤W¤{¤{¤“¤�¤º¤Á¤å¤¥¥¥¥¥­˜‹-&¹&¹C¹J¹R¹]¹t¹~¹~¹•¹Ÿ¹º¹Ğ¹Ş¹â¹ºº*º1º5ºNºXºiºvºvº}º„º‰º�º“ºšº¡º»ºÂºÒºÖºÖºàºöºúºúº »»1»1»7»B»I»Q»\»c»k»v»}»}»ˆ»¦»ª»Â»³»İ»İ»ã»ê»ù»¼¼¼¼¼0¼0¼0¼B¼J¼p¼~¼~¼‚¼—¼Ÿ¼¯¼º¼Ï¼Ô¼â¼ñ¼û¼ ½½½½%½)½8½:½I½K½Z½\½k½r½v½Š½”½¢½©½­½½½È½Í½ë½õ½¾
((.5>>Qcffw‡“°·ÄÆÍáğğğ''<GYfqŠ™  ¹ÌÎİòô&&39KKX[fxŠ�—�©®ÃÅßôôôöı"44:AJOs||‚‹‹ªª·ºÃÌÔßñ÷$,7IOZZgjs|~ ³ÈÎÙëñùùùù} |t·ĞJ4J4\4e4h4q4z4Œ4Œ4¸4¼4Á4Ä4Í4Ü4â4å4í4ğ4õ4ÿ4}`2ÏRÏR÷RãRS+SS:S?SFSNSUS`ShSsS‰S~S¡S©S~À-àgàgşghhh"h"h,h>hKhNhPhYhfhfhthˆhˆh¬h¹h¹hÉhÖhÖhùhiii=iRiti}iŠiŠi­i·i·iêij#j#j#j5jt�R3R3f3‡3™3­3´3À3Ú3ã3é3ü344444 444:4<4<4D4€¸ºäø�ø����"�/�2�L�L�L�R�V�^�i�}�‰�‹�‹�”�–�–�Ÿ�¡�¡�ª�¬�¬�µ�µ�¾�Ä�Ç�Ñ�â�è�ô�ô�\��œø * *=*N*f*m*‰*~*¡*Á*­*Ğ*á*æ*+ó* +<+C+_+T+w+—+ƒ+¦+·+Í+¹+å+ò+ò+
,
,,‚¨¥ç3ç3ó34484h4y4Š4œ4£4ª4¾4Å4Å4Ô4â4ñ4 55%5(5A5D5I5`5p5€5„5‹5Á5ƒx± P±P±f±m±t±“±¢±±±À±Ï±Ş±è±è±í±ô±²²²6²P²P²f²x²|²Š²‘²–²–²�²¯²¸²º²È²Ú²Ú²Ú²ì²÷² ³³!³&³6³;³K³W³\³i³n³~³ƒ³“³•³¥³§³·³¹³Ê³Ó³Ó³Õ³å³ì³ü³ü³´)´;´M´]´]´]´`´s´„\åø`�`�{�‚�‡�•�ª�±�»�É�Ì�Î�Ø�ê�ê�ñ�'�…0ÎÖff~¾²ˆ†ÒÚ†`,·‡·‡͇߇æ‡ğ‡ÿ‡ˆˆ"ˆ8ˆUˆWˆWˆˆˆvˆWˆ§ˆ±ˆ‡L[j_2_2m22…2�2Ÿ2¥2®2À2Æ2É23ˆ(–œ"3"303?3C3F3L3‰\k~333'3-353G3M3V3h3n3w3‰3�3’3à3Š, >×>×L×S×[×`×f׋„ çç%49[[`‚—„¦µ·ÙÙÙèú&Œ`JÇiÇiäiìióij&j(j6jCjIjTjkjzj…j‰j”j j§j³jÊjájôj kk#k5k7kEkWkWk`kqkwk‡k‡kŸkŸkÄkÄkÉkÉkÒkŞkëk÷k l#l2l=lOl[lrlŠl«l«l´l¹l¹l¹l¹lÉlÒlÚlßlílûl mmmmm#m#m-m8mJmPm\mlmwm�m…m�m§mªmºmÁmßmèmèm÷mnnn$n0n8nCnJnNnangntnn…n•n¥n¥nÒnğnünooo!o1oAoAoQoVoVo`oko}oƒo‘o�o«oµo¹oÂoÛoŞoîoõoúoúopppp'p0pBpHpJpJpXp^pgpxp�p�p�p�p�p¢pºpºpÉpÌpàpşp q2qDqOqaqeqjqqqƒq“q®qµq¹q¿qÇqÒqár�8í÷))™)®)Ä)å)Ò)ı)** *�`j~€ €   § ¯ º Ä Ï × æ ğ ó ¡¡*¡*¡8¡�_oÛoÛ‘Û˜ÛŸÛ¤Û»ÛÍÛ×ÛİÛïÛôÛÜÜ Ü␍ÜÜ!Ü!Ü%Ü-Ü5Ü=ÜGÜPÜXÜ[ÜdÜÜ�ܗܚܟܮܴܼܼÜÃÜÆÜËÜÚÜàÜèÜèÜöÜùÜşÜ␍İİ İ İ+İ?İFİMİdİ�83=ØØ'Ø'Ø5Ø9ØGØJØOØ‘8>HVØVØ_Ø_ØmØqØxØ{؀ؒDDQg1g1�1”1�1¥1±1É1Ò1Ö1è1î1␍2“Ä{¨¯¯ÙÜãèîğõûû␍*=LRT[akk�ˆ�˜˜˜¯ÁÈ×Ùï”0RZ222>2O2U2U2]2•„\y¦ò¦ò¸òÍò×òàòâòéòùòóóóóó*ó-ó-óQó\ó^ówó~ó‚ó‘ó¤ó÷ó– 
^0^0g0„0‰0—h g g5g@gKgYgdgmg~g‡g˜g�gªgÁgÁgÓgägñgúg hh_h˜„a~wMwM§M­MMÂMÊMÑMÕMŞMŞMãMêMN,N1NUN]N_NwN�N³NÒNäN™lò ××ï13UjWŒy››­´ÖÖŞš y}°‹°‹¹‹Å‹Ê‹›(A~è~è è¨è®è¶è¸è¸èÉèÉèÉèÑèÙèëèúèëèééé+é-é-é8é=éWé\é\é\éqésé€é‚é�é‘é�é¦é®éµéÄéÑéÓéäéñéñéñéúé ê ê%ê-ê/ê<ê<êQêQêQê\êfê~êƒêƒêƒê‘ê—êœê¤ê¯êÁêÌêÑêÑêØêÜêêêîê÷êşêë)ë0ë9ëUëZëZëZëZëbëmë{ë{ë›ë›ë›ë¢ë°ë¿ëÒëåëçëçëçëúëúëìì␍ìì%ì/ìKìuì{ì{ì�ì”ì¸ì¿ìËìéìüìííííííí'í5íWíbíí‰í‰í—íµíåíøí î î3î8î8î8î@îKî]îhîmîmîmîî©î¯î¯î¯îºîÄîĞîÛîİîİîİîâîîîîî8ïœH%‚/‚/�/—/¢/¯/º/Â/Â/Ú/ä/ê/ğ/�0 _Q_Q†QsQ•Q±Q§QÉQÑQ�Lİìo(o(‰(�(´(Õ(Â(í(ò()>)+)V)n)n)x)Ÿğ·çNçNO%O1O9ODOcOcOmOoOŠOrO™O™O§O±O¸OØOÚOôOûOûOPP>PCPbP{P˜P›P£PªPÊPÌPæPíPíP Q Q&Q&QMQ_Q TVgÎÎäñ÷ı*<@FTWa¡0
Rßß/R>amr~�•¢­¹ÄÌÑİâöı 5>JOcjnnsŒ‘ª¿ÑÖáéééë  $ . 9 ; F N N ^ S v – ¢àZ�ÈeÈeâeğeõefff4fBfgfpf€f›f¦f¶f¸fºfÄfĞfÔfáfífÿfg g#g#g#g#g(gFg`g`gggjgrg~g‡gİg£d1,,5,M,^,e,�,v,™,¹,¥,È,Ù,ï,Û,---,-,-6-¤ü!\''?Q\‰oc˜¹Î»éİ///A^^“ª�Üáôè
+LdQs§•ÓÓÓå#*LLT¥(�å�åœå¿åÅåÊåÊåĞå¦(!'Æ×Æ×Ï×İ×ã×å×ê×§D]j::2:9:B:N:c:k:q:w:y:y:‰:¨„¼Ùàªàª« «#«+«3«7«B«F«J«N«V«[«_«p«�«ƒ«‡«˜«©«¸«Ë«Ó«Ş«Ş«Ş«ğ«©€èœèœ�����,�7�A�L�c�f�h�ƒ���—���©�»�Ã�Ã�Ù�Ù�ë�ª Ê �Y�YµYÒYÚYåYõYşYZZ3ZLZRZZZ]ZrZwZ‰Z«Z±Z¹Z¾ZÄZÇZİZæZèZ
[['[,[;[][c[h[h[h[u[†[‘[�[ª[½[Ê[×[î[\ \\%\9\>\I\P\s\s\s\…\«<ÑÜ55 555$5,545;5K5K5P5¬°)8£8£[£h£m£q£z£‰£•£ £«£³£¾£Æ£É£Õ£İ£÷£¤¤-¤6¤k¤W¤{¤{¤“¤�¤º¤Á¤å¤¥¥¥¥¥­”‹,&¹&¹C¹J¹R¹]¹t¹~¹~¹•¹Ÿ¹º¹Ğ¹Ş¹â¹ºº*º1º5ºNºXºiºvºvº}º„º‰º�º“ºšº¡º»ºÂºÒºÖºÖºàºöºúºúº »»1»1»7»B»I»Q»\»c»k»v»}»}»ˆ»¦»ª»Â»³»İ»İ»ã»ê»ù»¼¼¼¼¼0¼0¼0¼B¼J¼p¼~¼~¼‚¼—¼Ÿ¼¯¼º¼Ï¼Ô¼â¼ñ¼û¼ ½½½½%½)½8½:½I½K½Z½\½k½r½v½Š½”½¢½©½­½½½È½Í½ë½õ½¾
¾¾¾&¾-¾1¾;¾O¾W¾b¾f¾f¾f¾q¾|¾Œ¾˜¾®¾¶¾Á¾Ğ¾Ø¾ã¾è¾ğ¾û¾¿ ¿¿¿/¿7¿B¿B¿B¿B¿_¿|¿ˆ¿�¿ ¿°¿Î¿Ò¿Àö¿ç¿ÀÀÀ"À1À@ÀJÀXÀ_ÀcÀeÀtÀ~ÀŒÀ“À—À—À™À«À«À½À½À½ÀÏÀáÀéÀÁ-Á;Á?Á]ÁdÁkÁvÁŒÁ‘Á˜Á«ÁµÁÃÁÊÁÎÁĞÁãÁíÁûÁ Â.Â8ÂFÂQÂUÂUÂZÂbÂfÂuÂw†ˆ—™¨¯³ÂÇÂÑÂßÂæÂêÂúÂÃ
Ã(Ã2Ã@ÃGÃKÃUÃcÃjÃnÃxÌÔßãããîõÃÃÃİÃíÃøÃ␍ÄÄÄ-Ä9ÄOÄWÄbÄqÄyĄĉđĜĨĬķļÄĞÄØÄãÄãÄãÄãÄ÷ÄÅÅ)Å-ÅAÅRÅgÅtÅxņśūÅÂÅÛÅôÅöÅÆ Æ ÆÆ/Æ@ÆWÆpÆ~ƉƕÆ�ƟƪƲƲƲÆÏÆİÆëÆÇÇ(Ç5ÇUÇ\Ç\ÇlǀǚǚÇ�Ç´ÇÃÇŞÇéÇÈÈÈ-È-È@È[ÈdÈ{ȕȤȱÈÑÈßÈõÈÉ!É9É9ÉQÉQÉ]ÉxÉ�əəəɥɶÉÎÉ×É×ÉŞÉçÉíÉùÉXÊ®<ùD(�(�M�Y�d�n�t�~�„���œ�¦�¸�Â�È�Ò�Ø�â�é�õ�û�‘/‘>‘A‘C‘M‘_‘i‘{‘…‘š‘š‘�‘§‘¼‘Á‘ёܑá‘õ‘÷‘’+’+’5’J’X’a’i’w’ˆ’˜’©’¶’¶’Ã’Ã’Ë’Ù’ “¯$› _P_PsP{P†PŒP°l£:§F§FÀFØFèFGG2GMGMGwGGƒG†GŠG�G™GœG£G©G°G¶GºG¿GÉGÚGáGèGêGîG÷GHHHHH/H:H@HGHPHiHzHƒHŒH”HŸHªH¶HÇHØHäHòHôHûHII II IBIPIZIdImI†I—I I©I±IºIÀIÄIÉIÍIÚIáIïIùIJJ!J:JKJTJ]JeJnJtJxJ}JƒJ�J—J¶JÄJÊJÏJ×JßJçJôJüJKK0K9KTKhK{K‚K‹K”K›K¤K­K¶KÏK¿KßKãK=L±  ¨ˆ¨ˆ¶ˆØˆŞˆ²¸�·z'z'ˆ'�'È'Ê'ÿ'*(*(:(?(?(S(X(X(t(y(y(™(�(�(²(·(·(Ô(Ô(â(),)L)^)p)‚)’)’)’)’)™)r*³$bgÊ%Ê%Î%æ%ø%&´ƒgÃgÃyÈÈËÔààöÃÌÃŞÃåÃéÃùÃÄ+Ä1Ä@ÄIÄMÄSÄ\ÄrÄvēıÄÃÄÉÄØÄêÄöÄøÄÅ ÅÅÅ Å Å Å1Å<ÅBÅXÅ_ÅgÅ}ńńńŒŹÅÂÅÊÅÜÅäÅíÅøÅşÅÆÆ#Æ*Æ?ÆPÆPÆWÆWÆWÆeƌƙƢƪƼÆÄÆÍÆÍÆØÆ߯íÆñÆıÆÇÇ#Ç2Ç;Ç?ÇGÇPÇPÇ^ÇfÇlljǒǚǠǦǦǦǭǴÇÃÇËÇÑÇ×Ç×ÇÙÇãǵx7Ú7ÚEÚZÚaÚlÚ‚Ú¬ÚÈÚÏÚçÚíÚüÚÛ␍ÛÛÛÛ#Û2Û:Û@ÛBÛHÛ¤Ôy·e·eÚeâeòeúef5f9fAfIfOfXfdflflftf¤fãf¾fg gg#g%gSgYgbgigqgyg…g�g•g¨g°gµg¿gßgægègògh!h(h*hJhQhQhQhZhahzh€hˆhˆh�h‘h�h¦h¯h»hŞhìhii9iFiZitixi—i¥i±ißiåiçijjj4jAjUjojwj{j†j�j�j jÎjÑjÙjéjëjk k k)k)k4kekmkmkmkmkvk‚k˜k±kÄkËk×kŞkŞkñkõkõkõküklll'l.l.lHlJlOlblilul|l|l‰l“l“l˜l»l»lÍl·à˜Ì÷C÷C D*DD_DED9DnD}D…D�D’D�D¨D¨D­DâDçDE4E!EVECEjEeE†E•E�E¨EªEµEÀEÀEÅEæEèE F FFF7F9F[F[F[FcF¸\îff%f7f=fHfVfbfyfyf‹f‘fœf¬f·fÅfÒfşf¹ÛÜ— — µ È Ï Ö İ á ã ê ñ õ õ ı    4 ? M ^ b g {  ˆ Œ ‘ — ´ ´  Ù Ş ÷ ! ! ! !!!&!-!@!D!I!]!e!n!r!t!{!�!�!´!¶!Ï!â!æ!æ!æ!ú!ş!" """3"3"A"X"]"v"‡"‹"�"�"�"¢"±"Õ"÷"###/#4#?#S#W#`#d#f#l#…#…#“#ª#¬#Å#Ö#Ú#Ú#á#ô#ø#
$$#$+$4$8$=$D$Z$j$�$†$Ÿ$²$¶$È$È$È$È$Í$ï$ş$"%-%3%I%Z%Z%Z%a%t%�%�%�%œ%œ%¯%Æ%Ñ%â%ç%í%÷%ù%&& &&,&.&9&N&Z&\&g&s&ƒ&Š&‘&›&£&§&«&­&²&º&¾&Ğ&Ò&×&ß&ã&å&å&î&û&'1'K'Y'e'l'l''ƒ'ƒ'ƒ'Š'�'©'·'Ã'Ê'Ê'ä'æ'ë'(( (&(&(3(=(=(O(º  ¿£XJXJuJ„J„J„J¡J¡J²J²J¸JºJºJÀJÂJÂJÈJÊJÊJÑJÕJÚJÚJÚJÚJÚJÚJâJúJúJKK$K1KIKKKjKlK‹K�K¯K´KºKºKÓKÖKıK
Ã(Ã2Ã@ÃGÃKÃUÃcÃjÃnÃxÌÔßãããîõÃÃÃİÃíÃøÃ␍ÄÄÄ-Ä9ÄOÄWÄbÄqÄyĄĉđĜĨĬķļÄĞÄØÄãÄãÄãÄãÄ÷ÄÅÅ)Å-ÅAÅRÅgÅtÅxņśūÅÂÅÛÅôÅöÅÆ Æ ÆÆ/Æ@ÆWÆpÆ~ƉƕÆ�ƟƪƲƲƲÆÏÆİÆëÆÇÇ(Ç5ÇUÇ\Ç\ÇlǀǚǚÇ�Ç´ÇÃÇŞÇéÇÈÈÈ-È-È@È[ÈdÈ{ȕȤȱÈÑÈßÈõÈÉ!É9É9ÉQÉQÉ]ÉxÉ�əəəɥɶÉÎÉ×É×ÉŞÉçÉíÉùÉXÊ®<ùD(�(�M�Y�d�n�t�~�„���œ�¦�¸�Â�È�Ò�Ø�â�é�õ�û�‘/‘>‘A‘C‘M‘_‘i‘{‘…‘š‘š‘�‘§‘¼‘Á‘ёܑá‘õ‘÷‘’+’+’5’J’X’a’i’w’ˆ’˜’©’¶’¶’Ã’Ã’Ë’Ù’ “¯$› PP“P›P¦P¬P°l£:ÇFÇFàFøFG(G:GRGmGmG—GŸG£G¦GªG¯G¹G¼GÃGÉGĞGÖGÚGßGéGúGHH
HHH!H$H/H;H>HOHZH`HgHpH‰HšH£H¬H´H¿HÊHÖHçHøHIIII"I'I+I8I?IbIpIzI„I�I¦I·IÀIÉIÑIÚIàIäIéIíIúIJJJ.J8JAJZJkJtJ}J…J�J”J˜J�J£J­J·JÖJäJêJïJ÷JÿJKKK;K.KPKYKtKˆK›K¢K«K´K»KÄKÍKÖKïKßKÿKL]L±  ¨ˆ¨ˆ¶ˆØˆŞˆ²¸�·z'z'ˆ'�'È'Ê'ÿ'*(*(:(?(?(S(X(X(t(y(y(™(�(�(²(·(·(Ô(Ô(â(),)L)^)p)‚)’)’)’)’)™)r*³$bgÊ%Ê%Î%æ%ø%&´ƒ‡Ã‡Ã™Ã¨Ã¨Ã«Ã´ÃÀÃÀÃÖÃìÃşÃÄ ÄÄ9ÄKÄQÄ`ÄiÄmÄsÄ|ĒĖijÄÑÄãÄéÄøÄ
ÅÅÅ$Å,Å0Å6Å?Å?Å?ÅQÅ\ÅbÅxÅŇÅ�ŤŤŤŲÅÙÅâÅêÅüÅÆ␍ÆÆÆ4Æ;ÆCÆJÆ_ÆpÆpÆwÆwÆwƅƬƹÆÂÆÊÆÜÆäÆíÆíÆøÆÿÆ␍ÇÇÇ5Ç=ÇCÇRÇ[Ç_ÇgÇpÇpÇ~džnjǩDzǺÇÀÇÆÇÆÇÆÇÍÇÔÇãÇëÇñÇ÷Ç÷ÇùÇȵxWÚWÚeÚzÚ�ڌڢÚÌÚèÚïÚÛ␍ÛÛ%Û-Û5Û7Û=ÛCÛRÛZÛ`ÛbÛhÛ¤Ôy×e×eúefff>fUfYfafifofxf„fŒfŒf”fÄfgŞf&g+g3gCgEgsgyg‚g‰g‘g™g¥g­gµgÈgĞgÕgßgÿghhh!hAhHhJhjhqhqhqhzh�hšh h¨h¨h­h±h½hÆhÏhÛhşh i:i=iYifizi”i˜i·iÅiÑiÿijj5j8j8jTjajuj�j—j›j¦j®j¾jÀjîjñjùj k k9k?k?kIkIkTk…k�k�k�k�k–k¢k¸kÑkäkëk÷kşkşklllll!l4l;lGlNlNlhljlol‚l‰l•lœlœl©l³l³l¸lÛlÛlíl·à˜ÌDD,DJD7DDeDYD�D�D¥D°D²D½DÈDÈDÍDEE<ETEAEvEcEŠE…E¦EµE½EÈEÊEÕEàEàEåEFF)F)F0F5FWFYF{F{F{FƒF¸\î/f/fEfWf]fhfvf‚f™f™f«f±f¼fÌf×fåfòfg¹ÛÜ· · Õ è ï ö ı   
    6 @ @ T _ m ~ ‚ ‡ › Ÿ ¨ ¬ ± · Ô Ô â ù ş !(!,!,!,!1!<!F!M!`!d!i!}!…!�!’!”!›!­!½!Ô!Ö!ï!""""""'"+"0"6"S"S"a"x"}"–"§"«"½"½"½"Â"Ñ"õ"#"#(#>#O#T#_#s#w#€#„#†#Œ#¥#¥#³#Ê#Ì#å#ö#ú#ú#$$$*$/$C$K$T$X$]$d$z$Š$¡$¦$¿$Ò$Ö$è$è$è$è$í$%%B%M%S%i%z%z%z%�%”%­%­%­%¼%¼%Ï%æ%ñ%&&␍&&&%&%&,&7&L&N&Y&n&z&|&‡&“&£&ª&±&»&Ã&Ç&Ë&Í&Ò&Ú&Ş&ğ&ò&÷&ÿ&'''''1'Q'k'y'…'Œ'Œ'Ÿ'£'£'£'ª'¯'É'×'ã'ê'ê'(( (%(3(?(F(F(S(](](o(º  ¿£XJXJuJ„J„J„J¡J¡J²J²J¸JºJºJÀJÂJÂJÈJÊJÊJÑJÕJÚJÚJÚJÚJÚJÚJâJúJúJKK$K1KIKKKjKlK‹K�K¯K´KºKºKÓKÖKıK
L"LBLBLKLPLnL\LtLƒLˆL�L˜L«L³L»LÀLÀLÀLÉLâLèLèLMM,MEMGMOMUM]MbMbMhMhMqM‚M„M™M›M£M©M±M¶M¶M¶M¶MÄMÛMİMñMñMùMÿMN NNN&N,N2N4N4N4N<N<NJNaNeNgNsNuN�N–N�N£N¬N·N»NÁNÅNÎNÑNÑNßNğNòNO7O=OEOJOSOXOXO]O_OgOgO‚O”O™O¥O«O®OÅOÇOÊOÚOŞOåOîOıO PPPP&P+P+P3P@PXP]PgP�PšP¥P°P»PÆPÑPÜPçPòPòPòPúPQQ*QGQ`QbQhQjQmQxQzQzQ€Q†Q†Q�Q—Q�Q©Q©Q°Q³QÒQİQåQíQòQòQùQıQRRR#R-R-R:RaRaRjRxR‰R•RœRªR¹RÏRÕRÚRÚRßRõRS SS#S,S:SASCSLSLSVSdSpS‡S�S´SºS¼SÓSØSØSøSøS
TTT T(T6T;T;TRTXTZTeTwT�T�T¡T±TÃTÈTÔTÚTİTôTöTùT UUUU%U<UNUSU_UeUhUU�U„U”U˜U U®U³U¸U¸U¾UÆUËUËUÑUÑUßUåUëUõUÿU␍V"V%V'V1V1V3V;V@VEVJVJVPVXV]V]VbVmVrVwV‚V‡V­V¯V´V¹V¾VÃVÈVÍVÒVÒV×VÜVøVWW*W0W8W8WFWLWRW\WfWtW‰WŒW�W˜W§W¬W¬W¬W´W¹WÂWÂWÇWÇWÍWÕWÚWÚWßWêWïWôWùWXXX X X-X3X9XCXMX[XpXsXuXX�X“X“X“X›X X©X®X®X´X¼XÁXÁXÆXÑXÖXÛXàXïXïXYYYYY Y*Y4YBYWYZY\YfYuYzYzYzY‚Y‡Y�Y•Y•Y›Y£Y¨Y¨YµY»Y»YÉYÏYÕYßYéY÷Y ZZZZ*Z/Z/Z/Z7Z<ZEZJZJZPZXZ]Z]ZjZpZpZ~Z„ZŠZ”Z�Z¬ZÁZÄZÆZĞZßZäZäZäZìZñZúZÿZÿZ [[[[[[&[,[@[E[E[K[U[[[`[`[i[w[€[�[“[“[œ[ª[¶[Ç[Ô[Û[ã[í[û[û[\\ \ \ \\\\\ \$\,\2\4\=\L\T\Y\_\_\g\p\~\‰\�\”\œ\¡\¡\¡\¡\¡\¡\¡\¡\¡\¡\º\À\É\Ï\×\Ü\á\ê\õ\ş\] ] ] ]]]]]"]']']0]>]J]S]Y]Y]b]x]x]~]‡]�]�]¦]¨]®]·]Í]Í]Ö]Ö]Ö]ß]ä]ä]ì]ñ]ñ]^^(^-^3^=^E^J^J^J^^^g^m^^‰^‰^‘^‘^™^›^›^´^¾^Ç^É^É^É^Ï^Ó^Õ^Õ^Õ^Õ^Ú^à^æ^ê^ab»Ìz©ÏlÏlñlülm.m;mRmempm†mrm•m�m�m¬m¬m´mÀmÖmëmúmnnnnn#n(n7nBn\n^ncnrn}nŠn”n”n¢n¼”*K€¥€¥˜¥Ÿ¥¦¥©¥²¥µ¥¸¥¼¥Á¥ã¥Ğ¥ó¥û¥¦¦¦¦!¦*¦0¦3¦D¦b¦s¦~¦°¦½à.¢·B·BÕBàBñBôBøBCCC%C;CLC]CoC�C�CŸC°C¿C¿CÍCÑCÕCÚCŞCëCòCDDD#D1DJDLDPDZDZD_D_D_DdDdDsD|D„DšDšDšDŸDŸD·DÃDÎDÓDÓDÖDÛDÛDúDEEEEEEE:EFERETETEWEYEYEfEhEhEkEkEtEzEE›E›E›E›E›E›E›E›E›E›E›E›E�E®EÀEÏEŞEŞEâEâEêEFF F§F¾,××$×+×3×8×>׿l3J�S�S¥S¿S«SÎSóSßSTTTTTTT#T;TFT\TQTtT~TÀPQaâ$â$ğ$ş$%%&%+%H%N%U%\%j%v%ˆ%Ä%ÁD+ÖåÖåêåøåşå!æ'æ-æRæXæ^ædædælæÂô#œï6ï6÷67
77$787G7d7q7ƒ7¥7Í7Û7÷7 8!888C8d8‚8‘8¬8·8Ò8ë8ë89/9I9d9v9…9”9”9Ÿ9²9Ã9Ö9æ9ó9ÿ9:+:+:3:3:3:D:Q:X:w:€:‘:•:�:¨:À:Ø:á:ñ:ù:ş:";2;B;M;a;f;n;”;–;¡;Ô;î;î;<<<,<5<=<O<q<y<�<Œ<�<�<<Î<æ<ş<='=0=9=K=Y=]=a=à àˆàˆéˆ‰␍‰Ä\ˆ[¾Í¾ÍØÍßÍìÍ÷ÍüÍÎÎÎ2Î8ÎVÎlÎwÎ}ΟΟίÎÄÎÆÎÉÎÕÎİÎåÎíÎûÎÏ
TTT T(T6T;T;TRTXTZTeTwT�T�T¡T±TÃTÈTÔTÚTİTôTöTùT UUUU%U<UNUSU_UeUhUU�U„U”U˜U U®U³U¸U¸U¾UÆUËUËUÑUÑUßUåUëUõUÿU␍V"V%V'V1V1V3V;V@VEVJVJVPVXV]V]VbVmVrVwV‚V‡V­V¯V´V¹V¾VÃVÈVÍVÒVÒV×VÜVøVWW*W0W8W8WFWLWRW\WfWtW‰WŒW�W˜W§W¬W¬W¬W´W¹WÂWÂWÇWÇWÍWÕWÚWÚWßWêWïWôWùWXXX X X-X3X9XCXMX[XpXsXuXX�X“X“X“X›X X©X®X®X´X¼XÁXÁXÆXÑXÖXÛXàXïXïXYYYYY Y*Y4YBYWYZY\YfYuYzYzYzY‚Y‡Y�Y•Y•Y›Y£Y¨Y¨YµY»Y»YÉYÏYÕYßYéY÷Y ZZZZ*Z/Z/Z/Z7Z<ZEZJZJZPZXZ]Z]ZjZpZpZ~Z„ZŠZ”Z�Z¬ZÁZÄZÆZĞZßZäZäZäZìZñZúZÿZÿZ [[[[[[&[,[@[E[E[K[U[[[`[`[i[w[€[�[“[“[œ[ª[¶[Ç[Ô[Û[ã[í[û[û[\\ \ \ \\\\\ \$\,\2\4\=\L\T\Y\_\_\g\p\~\‰\�\”\œ\¡\¡\¡\¡\¡\¡\¡\¡\¡\¡\º\À\É\Ï\×\Ü\á\ê\õ\ş\] ] ] ]]]]]"]']']0]>]J]S]Y]Y]b]x]x]~]‡]�]�]¦]¨]®]·]Í]Í]Ö]Ö]Ö]ß]ä]ä]ì]ñ]ñ]^^(^-^3^=^E^J^J^J^^^g^m^^‰^‰^‘^‘^™^›^›^´^¾^Ç^É^É^É^Ï^Ó^Õ^Õ^Õ^Õ^Ú^à^æ^ê^ab»Ìz©ïlïlmm2mNm[mrm…m�m¦m’mµm½m½mÌmÌmÔmàmöm nn%n8n>n>n>nCnHnWnbn|n~nƒn’n�nªn´n´nÂn¼”*K€¥€¥˜¥Ÿ¥¦¥©¥²¥µ¥¸¥¼¥Á¥ã¥Ğ¥ó¥û¥¦¦¦¦!¦*¦0¦3¦D¦b¦s¦~¦°¦½à.¢×B×BõBCCCC!C(C6CEC[ClC}C�C¡C°C¿CĞCßCßCíCñCõCúCşC DD D4D=DCDQDjDlDpDzDzDDDD„D„D“DœD¤DºDºDºD¿D¿D×DãDîDóDóDöDûDûDE&E3E5E5E9E;E;EZEfErEtEtEwEyEyE†EˆEˆE‹E‹E”EšEŸE»E»E»E»E»E»E»E»E»E»E»E»E½EÎEàEïEşEşEFF
F#F'F,FÇF¾,××$×+×3×8×>׿l3J¯S¯SÅSßSËSîSTÿS"T'T.T.T4T7T;TCT[TfT|TqT”T�TÀPQaâ$â$ğ$ş$%%&%+%H%N%U%\%j%v%ˆ%Ä%ÁD+ÖåÖåêåøåşå!æ'æ-æRæXæ^ædædælæÂô#œ777&7*777D7X7g7„7‘7£7Å7í7û78)8A8X8c8„8¢8±8Ì8×8ò8 9 9&9O9i9„9–9¥9´9´9¿9Ò9ã9ö9:: :.:K:K:S:S:S:d:q:x:—: :±:µ:½:È:à:ø:;;;;B;R;b;m;�;†;�;´;;Á;ô;<<&<5<=<L<U<]<o<‘<™<¡<¬<®<¾<Ö<î<==0=G=P=Y=k=y=}=�=à àˆàˆéˆ‰␍‰Ä\‡Z¾Í¾ÍØÍßÍìÍ÷ÍüÍÎÎÎ2Î8ÎVÎlÎwÎ}ΟΟίÎÄÎÆÎÉÎÕÎİÎåÎíÎûÎÏ
ÏÏÏÏ*Ï0Ï5Ï5ÏLÏLÏjÏjÏ}ÏŠÏ�Ï�ϦϯϾÏÔÏßÏíÏøÏĞĞ'Ğ-Ğ7ĞCĞPĞRĞRĞZĞ_Ğ_ĞgĞlĞlĞtĞyĞyĞ�ІІЌББИĞ�Ğ�ФЩЩдййĞÄĞÉĞÉĞÔĞÙĞÙĞäĞäĞÿĞÑ ÑÑÑÑ1Ñ>ÑMÑTÑWÑiÑkÑqхђѡѡѡѡѫÑÅÑÚÑìÑıÑÒÒÒ"Ò-Ò?ÒPÒ_ÒeÒvÒ�Ò‹Ò›ÒªÒ°Ò»ÒÁÒÖÒÜÒíÒøÒşÒÓÓÓ1Ó=ÓEÓUÓ\ÓbÓsÓ~ÓƒÓ ÓµÓÃÓÓÓßÓñÓüÓ Ô␍Ô Ô'Ô,Ô3Ô7ÔEÔOÔUÔ_ÔeÔpÔvÔxԅԒԜԵÔÃÔÃÔÉÔĞÔ×ÅD#° ­ ­?­a­i­i­w­Š­¤­§­°­Ì­Ì­Ì­Ô­Ö­Ö­Ş­à­à­è­ê­ê­ò­ò­û­®®®®®"®'®-®2®2®2®2®:®C®I®N®N®S®`®y®˜®›®±®Ğ®Ğ®Ğ®Ø®Ú®Ú®Ú®â®ä®ä®ä®ì®î®î®î®ö®ø®ø®¯¯ ¯¯¯¯¯¯ ¯2¯@¯N¯X¯X¯X¯h¯h¯o¯s¯y¯‘¯Ÿ¯²¯¿¯è¯ë¯ô¯û¯°° °+°+°6°<°A°A°A°H°N°c°k°q°|°“°ª°¶°¼°Á°Á°È°Ó°Ó°Ø°ê°ğ°ğ°ğ°ğ°L±Æd*DD2D<D?D?DID\D^DkDmDxDŒD”D¤D©D¯D·DºDÌDÇLWf11.12171B1B1L1R1R1V1^1È\CV²0²0È0È0Ì0Ñ0ä0ç0ì0ì0ö0ü0ü0
1 11É8(2î×î×÷×÷ר ØØØØÊ¨Y¯_¯_Ç_Ï_Ú_í_á_ `ƒ`i`^`D`-`‰`�`�`¾`Ã`à`å`ú`ç` aaaa@akaNa‚a a a a¬aËlF]7.7.Q.z.\.‰.©.Å.».İ.õ.â.//=/O/h/h/o/‘/‘/›/Ì4Š“‡í‡í›í í¦íªí®íÍíÕíÍxÌæ„„B„/„Q„[„b„x„}„‚„†„ˆ„�„”„ª„—„¹„Ò„Ú„ì„………*…Δ"ğ«ğ«ş«¬¬¬$¬/¬:¬B¬M¬X¬]¬s¬z¬�¬Œ¬—¬™¬¤¬¯¬±¬½¬È¬Ó¬Ü¬ä¬ä¬è¬ ­Ï€ø*6*6H6L6P6X6f6i6l6‚6ˆ6Š6œ6 6¤6¬6´6À6Õ6æ6í6ô6ô677ĞŞ` G GOGZGGaG™GÏGÔGÔG×GáGùGH
HH4HUHgHtH�H£H¨HÂHÌHÎHÓHêHI#I0IKIkIaI…I‹I‹I”I´IÀIÃIÅIàIÊIïIïIJJJJDJ:J^J^JcJfJ|JˆJ�JÁJËJÑJáJ KøJKK,K@KTKJKiKoK~K¦K•KµK·KÉKÓKçKñKúKLLL1L;L;LZL`L`L`LiL‰L±L LÀLÅL×LßL
MM M M MEMEMWMÑ`8Ì33N3U3]3f3q3x3�3•3˜3›3¤3²3¼3Á3é3î3û3'4,494Y4^4m4™4¡4¦4»4ç4ï4ô4ô455.525T5e5j5j5–5–5–5–5–5ª5Â5Ç5Ê5Í5Í5ú5ÿ566686O6]6h6„6„6„6‘6¨6ª6ª6ª6·6Î6Ğ6Ğ6İ6ô6ô67 707G7Y7u7u7u7‚7™7›7›7›7¨7¿7Á7Á7Î7å7å7õ7ı78"898K8g8g8g8t8‹8�8�8š8±8±8Å8Ç8Õ8÷899(969@9B9B9B9_9g9i9i9‘9×9Ò¤%Jïéïé ê5ê5êTêdêiêiêxêŠê¤ê¬ê³ê¸êÓêÛêÛêÛêİêİêİêİêùêùêùêùêëëëëë-ë8ëmëÓĞç/…/…E…Q…V…V…b…g…l…w…|…|…|…±…�…À…ç…ç…††2†K†P†P†i†‚†›†´†¹†¹†Ò†ë†‡‡ ‡ ‡8‡Q‡j‡ƒ‡ƒ‡ƒ‡•‡Ô0�‰'í'í5í;í?í^ííí…íÕ<:E99#9.9<9H9T9]9f9o9u9z9ÖluŒª&ª&¸&Â&É&à&à&å&ç&ó&ı& '('*':':'?'A'H'z'×ÈŸÍÿuÿuv=v2vv]v�vuvhvºv¿vÊvØvçvşvwtw\wHwzw…w±w¶w¾wİwåw
xÿwëwx6x"xYxExpxwx£x£x£x£x«xØL^mŸ/Ÿ/½/Ï/Ö/ø/ø/
00'00?0I0Ù$qv§N§N»NÃNÎNÔNÚÈg•b1b1†1Š1©1Ë1×1Ş1é1÷12␍2␍22242?2O2[2b2m2~2€2‘2“2•2•2•2�2�2§2§2¯2·2¿2Ç2Ë2Ö2"3Û PˆPˆ^ˆuˆ{ˆÜ`FZz9z9Š9‘9“9˜9§9­9Â9Â9Ğ9Ğ9Ü9å9è9ö9:: :İ<ö‘‘‘#‘.‘9‘D‘N‘l‘w‘‡‘Ş =?h?hWhihoh{h†h”h h·hÂhÒhähêhğhöh iiii0i6iAiIiWidi¡iß,29ß0ß0í0ş01+1.141à4‰‰‰(‰1‰8‰?‰I‰I‰O‰áÄMzWÿWÿƒÿ†ÿ‹ÿ˜ÿ�ÿ¯ÿ±ÿµÿ¹ÿ¼ÿÏÿèÿ")Bhm†¬±¸Ñ÷ù888Pjy‹â �Ïßwßwıwxxx"x3x@xFxKxKxXxaxgxwx…x‡x¦xºxÁxÍxİxİxëxşx y␍yyyy#y#y/y>yQyWy\ypyvy~y�y–y˜y§y´yºyÀyÅyËyÑyØyäyëyíyòyúyüyz␍zzzzz#z+z-z2z:z<zAzIzIzIzYzYzYzpzvz|z‡zŒz¥z«z¶z¾zÈzÌzÒzëzöz{{{{{{3{;{E{M{U{v{�{Œ{˜{’{¡{ª{¯{´{É{Ğ{Ù{å{ë{÷{û{||||&|(|.|;|@|E|^|i|t|t|z|‡|‰|�|—|°|»|Æ|Ì|Ù|Ù|İ|â|â|ó|õ|õ|}
}
}} } }2}4}4}G}I}I}[}[}a}f}f}}}‘}†}�}¦}­}³}»}Î}Ù}Ğ}é}é}ë}~~~~)~9~E~\~v~{~�~Ÿ~²~·~·~À~Ô~æ~ñ~ù~$8HMMSY^^^ds†“—œœ ¥¥ªµÁÛñıı€€€ €+€:€M€M€Z€f€f€f€f€j€o€€€’€�€¥€­€¯€Á€Æ€Ô€ã€é€ö€ö€␍���1�=�?�H�T�k�k�q�~�€�’�’�����������„ã ŒĞ×V×VõVWW WDWJWOWUWcWjWyW~WŠWœWœWºWÅWØWßWùWX"X=XUXqXzX‰X‘X�X§X¬X¼XÊXêXïX÷XY"Y2Y8YCYLYRY˜Y‚YsY¨YãYÍY¾YóYöYZªZä<+6ĞDĞDñD÷DEE+E3EMEYEå„ |† † ¨ ³ º  Å Å Õ à à ã ê ñ ÷ ı !
1 11É8(2î×î×÷×÷ר ØØØØÊ¨YÏ_Ï_ç_ï_ú_␍``?`£`‰`~`d`M`©`¾`®`Ş`ã`aaaa)a/a/a6a`a‹ana¢aÀaÀaÀaÌaËlF]W.W.q.š.|.©.É.å.Û.ı.//$/=/]/o/ˆ/ˆ/�/±/±/»/Ì4Š“§í§í»íÀíÆíÊíÎíííõíÍxÌæ7„7„b„O„q„{„‚„˜„�„¢„¦„¨„®„´„Ê„·„Ù„ò„ú„ …/…%…>…J…Δ"ğ«ğ«ş«¬¬¬$¬/¬:¬B¬M¬X¬]¬s¬z¬�¬Œ¬—¬™¬¤¬¯¬±¬½¬È¬Ó¬Ü¬ä¬ä¬è¬ ­Ï€ø*6*6H6L6P6X6f6i6l6‚6ˆ6Š6œ6 6¤6¬6´6À6Õ6æ6í6ô6ô677ĞŞ`?G?GoGzGŸG�G¹GïGôGôG÷GHH(H*H2HTHuH‡H”H¯HÃHÈHâHìHîHóH
I1ICIPIkI‹I�I¥I«I«I´IÔIàIãIåIJêIJJ!J!J/J9JdJZJ~J~JƒJ†JœJ¨J½JáJëJñJK)KK8K:KLK`KtKjK‰K�K�KÆKµKÕK×KéKóKLLL1L;L=LQL[L[LzL€L€L€L‰L©LÑLÀLàLåL÷LÿL*M M?M?M?MeMeMwMÑ`8Ì7373n3u3}3†3‘3˜3°3µ3¸3»3Ä3Ò3Ü3á3 444G4L4Y4y4~4�4¹4Á4Æ4Û45555'5:5N5R5t5…5Š5Š5¶5¶5¶5¶5¶5Ê5â5ç5ê5í5í56 6(656=6X6o6}6ˆ6¤6¤6¤6±6È6Ê6Ê6Ê6×6î6ğ6ğ6ı677$7)7P7g7y7•7•7•7¢7¹7»7»7»7È7ß7á7á7î78888"8B8Y8k8‡8‡8‡8”8«8­8­8º8Ñ8Ñ8å8ç8õ8959:9H9V9`9b9b9b99‡9‰9‰9±9÷9Ò¤%Jêê)êUêUêtê„ê‰ê‰ê˜êªêÄêÌêÓêØêóêûêûêûêıêıêıêıêëëëë0ë2ë2ë2ë2ëMëXë�ëÓĞçO…O…e…q…v…v…‚…‡…Œ…—…œ…œ…œ…Ñ…¾…à…†† †9†R†k†p†p†‰†¢†»†Ô†Ù†Ù†ò† ‡$‡=‡?‡?‡X‡q‡Ї£‡£‡£‡µ‡Ô0�‰GíGíUí[í_í~íŸíŸí¥íÕ<:E99#9.9<9H9T9]9f9o9u9z9ÖluŒª&ª&¸&Â&É&à&à&å&ç&ó&ı& '('*':':'?'A'H'z'×ÈŸÍ v v3v]vRv>v}v¯v•vˆvÚvßvêvøvww;w”w|whwšw¥wÑwÖwŞwıwx*x x x=xVxBxyxex�x—xÃxÃxÃxÃxËxØL^m¿/¿/İ/ï/ö/00*070G0=0_0i0Ù$qvÇNÇNÛNãNîNôNÚÈg•b1b1†1Š1©1Ë1×1Ş1é1÷12␍2␍22242?2O2[2b2m2~2€2‘2“2•2•2•2�2�2§2§2¯2·2¿2Ç2Ë2Ö2"3Û PˆPˆ^ˆuˆ{ˆÜ`FZz9z9Š9‘9“9˜9§9­9Â9Â9Ğ9Ğ9Ü9å9è9ö9:: :İ<ö/‘/‘8‘C‘N‘Y‘d‘n‘Œ‘—‘§‘Ş =_h_hwh‰h�h›h¦h´hÀh×hâhòhi
iii)i/i8i>iPiViaiiiwi„iÁiß,29ß0ß0í0ş01+1.141à4‰‰‰(‰1‰8‰?‰I‰I‰O‰áÄMzwÿwÿ£ÿ¦ÿ«ÿ¸ÿ½ÿÏÿÑÿÕÿÙÿÜÿïÿ.7BIbˆ�¦ÌÑØñ2XXXpŠ™«â �Ïÿwÿwx x&x:xBxSx`xfxkxkxxx�x‡x—x¥x§xÆxÚxáxíxıxıx yy)y-y>y>y>yCyCyOy^yqywy|y�y–y�y°y¶y¸yÇyÔyÚyàyåyëyñyøyz z␍zzzz!z-z/z4z<z>zCzKzMzRzZz\zazizizizyzyzyz�z–zœz§z¬zÅzËzÖzŞzèzìzòz {{!{'{4{9{>{>{S{[{e{m{u{–{¡{¬{¸{²{Á{Ê{Ï{Ô{é{ğ{ù{| ||| |%|0|;|F|H|N|[|`|e|~|‰|”|”|š|§|©|®|·|Ğ|Û|æ|ì|ù|ù|ı|}}}}}(}*}*}=}?}?}R}T}T}g}i}i}{}{}�}†}†}�}±}¦}¾}Æ}Í}Ó}Û}î}ù}ğ} ~ ~ ~#~&~(~7~I~Y~e~|~–~›~¯~¿~Ò~×~×~à~ô~!%39>>DXhmmsy~~~„“¦³·¼¼ÀÅÅÊÕáû€€€#€0€2€?€K€Z€m€m€z€†€†€†€†€Š€�€ €²€½€Å€Í€Ï€á€æ€ô€� ���-�=�=�Q�]�_�h�t�‹�‹�‘��� �²�²�½�½�½�½�½�9„ã ŒĞ÷V÷VW#W:W?WdWjWoWuWƒWŠW™W�WªW¼W¼WÚWåWøWÿWX6XBX]XuX‘XšX©X±X¾XÇXÌXÜXêX
YYY0YBYRYXYcYlYrY¸Y¢Y“YÈYZíYŞYZZ;ZÊZä<+6ĞDĞDñD÷DEE+E3EMEYEå„ |† † ¨ ³ º Â Å Å Õ à à ã ê ñ ÷ ı !
!!!!!!#!,!8!>!c!g!j!z!‚!‡!‡!�!—!¨!®!·!Â!Ó!Ó!Ü!á!ë!ò!ù!"" ""."1"@"M"Z"Z"Z"Z"`"r"{"Œ"­"¾"Ö"İ"ç"ï"ö"ö"ÿ"##"#-#-#-#A#U#e#h##$æ„9ò7ò788$8(8>8k8�8’8›8©8»8Ô8Ô8æ899 99çX{Í^^‰“¦±ÃÑ×èï÷␍(=MWYiy‚ˆ�”𠦱¼¿Æàè$'/3ET[c~›Ÿ¨¯ÁÉĞÔİßñ "///1HNN`è 
€ˆ€ˆ‰ˆ�ˆ¢ˆé¤ŸÄ/‚/‚K‚Q‚c‚h‚n‚q‚u‚u‚˜‚�‚Ê‚‚Ù‚ò‚Ş‚ƒƒƒ&ƒ.ƒ3ƒ9ƒ<ƒ@ƒBƒ[ƒGƒjƒjƒjƒ…ƒ´ƒÀƒê˜Ìîââëææúõ ""11@@OO^^m�|‹‹š©¸#ëxÓíßdßdıdee!e8e8eJePe[ekewe€e†eŒe—e¥e²e¾eÌeÛeÛe fìd”©×í×íÛíîíîíîîîî2î2îIîIî`î`îwîwî�î�î�î”îíÌÂñ)0;QQcn‚†‹�‘—©µÊÌåôøøø   ,2<GU\km†  ²îP7G`E`EvE‚EŠE�EŸE­E³E¿EÇEÒEØEÛEåEï ®- > >9>D>H>Q>X>_>u>†>—>©>»>Ê>Ù>ê>ù>ù>??␍??!?*?1?5?U?U?U?U?U?a?e?h?p?~?†?“?›?£?´?¿?Ä?Ä?Ñ?×?æ?ı?ÿ?
@@"@%@+@'@?@V@X@f@h@s@y@y@�@�@“@š@°@°@°@µ@µ@Í@Û@æ@ë@ë@î@ó@ó@A A-A/A/A3A5A5ATAbAnApApAsAuAuA‚A„A„A‡A‡A‡A‡A‡A�A–AšA¦AÆAÓAáAèA°Bğ(rx€‹€‹�‹•‹¥‹¨‹®‹ñ(ntZ&Z&c&m&~&‰&‰&§&òTzKşóşóô"ô%ô.ô8ôPô`ôiôoôrôvôxô�ô ô­ô³ô·ô½ô¿ôÂôÆôÆôéôíôóôóôúôõ1õDõWõ]õdõoõyõ}õ€õ‡õ�õ‘õ—õ¨õ®õ³õ¸õÅõÇõÙõÛõâõïõñõööööö'ö2ö>öUöUöjövö“ö·öÑöÖöíöòö÷÷÷"÷3÷H÷N÷^÷k÷÷†÷’÷ª÷¶÷¶÷¶÷¼÷¿÷Â÷Û÷á÷õ÷û÷ø ø øøø*ø*ø0ø>øUø[ø^øaøhøqøxøxø}øŠø—ø—ø�ø«øÂøÈøËøÎøÕøÕøæøíøúøùùùù ù%ù,ù7ùKùKùeùjùqùyù€ù�ù”ù�ùµùºùÁùãùîùôùüùú)ú)úDúDú^úlúsúzúœú¯úÓúÕúßúûûûû&û7ûPûTû)üóÀ€¬¯a¯aÇaËaĞaßaêaöabøa&b+b+bPb�bdbWb¤b©bÒb×bãbcåbcc1c8c[cqcqc—c—c£cô .0.0=0V0\0õ4‘šçOçOÿO"P/P5P;P>P^Pö8 â.â.ğ.÷./
/////#/÷ :>7171A1I1N1øÎP¯x¯xÍxİxèxşxy*yNy|y‚yˆy�y’yšy¯y²y½yÉyßyüy z/z]zczizqzvz~z“z–z¡z­z²z¸z¾zÆzÎzÖzæzşz {:{@{E{M{]{ƒ{±{·{¼{¼{Í{Ø{ã{||$|,|:|:|?|R|i|k|ˆ| |¬|´|Â|Â|Ç|Ú|ç|ñ|} }8}J}W}y}�}§}µ}·}Î}å}å}î}ú}~)~<~G~Z~^~^~^~e~j~}~ˆ~¢~¤~©~¼~Ç~Ô~Ş~Ş~ğ~ù˜k␍�:�:¦:²:²:È:Ó:Õ:õ:õ:õ:ü:;
;;;;;;4;4;j;v;ˆ;˜;¯;´;·;¼;¼;¼;Ø;ß;ì;ó;û;<<<(<0<5<5<Q<^<f<k<k<‡<“<œ<¤<¬<¸<Î<Ù<ü<=====7=Q=[=g=o=t=t=“=Ÿ=±=¶=Ò=Ş=í=ò=>>>>>>>>>>:>F>X>Z>]>b>b>b>l>t>{>ƒ>Œ>—>�>ª>¸>¸>Â>Ë>Ó>???$?>?C?C?V?^?^?`?`?`?e?e?l?r?v?}?�?�?�?�?�?�?µ?¾?¾?Â?İCú(àCàCîC÷CD Dû�ªÊ§n§nÅnÍnÙnïnooo,o2o2o2o7o<oJoUonopouoƒo�o›o¢o°oü\2E--1-V-8-e-�-w-™-®-›-½-Ö-è-...*.*.4.ı8fp'N'N?NNNbNqNwN}N€N Nş0�—xŒxŒŒŒ˜Œ¦Œ©ŒÁŒÄŒÌŒÿ0S[¶Ø¶ØÊØÒØßØéØüØP>Nø‰ø‰ŠŠŠ/Š7Š;ŠEŠOŠWŠZŠ`ŠT¡²�P�P©P¼P¿PÉPÖPëPíPÿP QQQ#Q&QzQ<˜£ĞŒĞŒäŒëŒ÷Œ���� �'� 26nænæ|æˆæH!/W]W]k]w]�]y]œ]�]¥]°]¼]Ä]D>‹ T TATLTQTYTsTzT|T|T˜T�T T«T²T²T¶TÅTÎTÖTßTçTîTõTùTUUUUU2U6ULU_UeUyU~U‹U‹UŸUªU±UºUÈUÑUôUúUşUVV VVV&V/VCVJV\VpVwVwV~V�VÓVläûNäNäbäxä†ä‘ä•äœä ä©ä¸äºäºäÎäĞäÙäßäßäßäßäçä´KtğEğEF'F,F3F=F=FEFXF\FaFvFxF{FF†FšF�F¦F²F¹F½FÅFÇFÏFİFåFçFêFG GG!G%G3G -Q_s_sos{s‡s—s¯sµsÃsÔsÜsãsüs)tCtPt]tmtstut†t¨t¯tµtÃtËtátìtòtøtu ôB»8j8jRjUj\jgjvjxjƒj’j’jŸj­j°j²j²j·j¼jÅjĞjÖjßjòj÷j kk!k!k7k7kdkxk�k•kšk¡k§k®k³k³k¹k¿kÄkÄk×kåkıklll&l-l-lJlelklplpl›l l lËlòl÷l÷l÷lúlmmmmmm m$m$m;mOmUmxm~m�mšm m®mµm·mËmÑmØmØmÚmÚmÚmßmåmêmîmğmómşm␍nnnnnnn)nSn
˜}Ÿ&$&$B$G$N$X$^$i$y$�$‰$�$™$£$©$´$Ä$Ì$Ü$ã$ë$ó$û$%%%!%!%7%  B†—?—?¯?¶?É?ñ?ü? @@ @@@@@L@T@c@�@Ÿ@Ì@Ô@Ô@ A!AABA0AQAWAfA{A}AˆA�A�A±A¶A¿AËAÓAñAŞA&B BB5BRB=BrBŠBwB¬B™BÍB»BÜBîBäBCCC.C.C:C Ğ1 “ “4“4“Z“Z“z“~“ƒ“ƒ“ƒ“�“”“¤“©“©“©“®“®“ǓΓݓë“ô“”␍”””””””$”+”2”9”@”G”G”I”I”O”T”[•␍D ,ÇrÇrÕrßrérùrşrsss's's)sYs
€ˆ€ˆ‰ˆ�ˆ¢ˆé¤ŸÄO‚O‚k‚q‚ƒ‚ˆ‚�‚‘‚•‚•‚¸‚½‚ê‚Ö‚ù‚ƒş‚!ƒ7ƒ#ƒFƒNƒSƒYƒ\ƒ`ƒbƒ{ƒgƒŠƒŠƒŠƒ¥ƒÔƒàƒê˜Ìîââëææúõ ""11@@OO^^m�|‹‹š©¸#ëxÓíÿdÿde/e5eAeXeXejepe{e‹e—e e¦e¬e·eÅeÒeŞeìeûeûe+fìd”©÷í÷íûíîî(î/î;î;îRîRîiîiî€î€î—î—î®î°î°î´îíÌÂñ''IP[qqƒ�¢¦«¯±·ÉÕêì+@@LR\gu|‹�¦ÀÀÒîP7G`E`EvE‚EŠE�EŸE­E³E¿EÇEÒEØEÛEåEï ®-?>?>Y>d>h>q>x>>•>¦>·>É>Û>ê>ù>
??? ?$?-?:?A?J?Q?U?u?u?u?u?u?�?…?ˆ?�?�?¦?³?»?Ã?Ô?ß?ä?ä?ñ?÷?@@ @*@7@B@E@K@G@_@v@x@†@ˆ@“@™@™@¡@¡@³@º@Ğ@Ğ@Ğ@Õ@Õ@í@û@A A AAAA2A@AMAOAOASAUAUAtA‚A�A�A�A“A•A•A¢A¤A¤A§A§A§A§A§A°AAºAÆAæAóABBĞBğ(rx€‹€‹�‹•‹¥‹¨‹®‹ñ(ntZ&Z&c&m&~&‰&‰&§&òTzKşóşóô"ô%ô.ô8ôPô`ôiôoôrôvôxô�ô ô­ô³ô·ô½ô¿ôÂôÆôÆôéôíôóôóôúôõ1õDõWõ]õdõoõyõ}õ€õ‡õ�õ‘õ—õ¨õ®õ³õ¸õÅõÇõÙõÛõâõïõñõööööö'ö2ö>öUöUöjövö“ö·öÑöÖöíöòö÷÷÷"÷3÷H÷N÷^÷k÷÷†÷’÷ª÷¶÷¶÷¶÷¼÷¿÷Â÷Û÷á÷õ÷û÷ø ø øøø*ø*ø0ø>øUø[ø^øaøhøqøxøxø}øŠø—ø—ø�ø«øÂøÈøËøÎøÕøÕøæøíøúøùùùù ù%ù,ù7ùKùKùeùjùqùyù€ù�ù”ù�ùµùºùÁùãùîùôùüùú)ú)úDúDú^úlúsúzúœú¯úÓúÕúßúûûûû&û7ûPûTû)üóÀ€¬ÏaÏaçaëağaÿa
bb7bbFbKbKbpb¡b„bwbÄbÉbòb÷bc$cc3c8cQcXc{c‘c‘c·c·cÃcô .0.0=0V0\0õ4‘šPP PBPOPUP[P^P~Pö8 â.â.ğ.÷./
/////#/÷ :>7171A1I1N1øÎPÏxÏxíxıxyy;yJynyœy¢y¨y°y²yºyÏyÒyİyéyÿyz+zOz}zƒz‰z‘z–z�z³z¶zÁzÍzÒzØzŞzæzîzöz{{,{Z{`{e{m{}{£{Ñ{×{Ü{Ü{í{ø{| |8|D|L|Z|Z|_|r|‰|‹|¨|À|Ì|Ô|â|â|ç|ú|}}(}?}X}j}w}™}°}Ç}Õ}×}î}~~~~0~I~\~g~z~~~~~~~…~Š~�~¨~Â~Ä~É~Ü~ç~ô~ş~ş~ù˜k␍�:�:¦:²:²:È:Ó:Õ:õ:õ:õ:ü:;
;;;;;;4;4;j;v;ˆ;˜;¯;´;·;¼;¼;¼;Ø;ß;ì;ó;û;<<<(<0<5<5<Q<^<f<k<k<‡<“<œ<¤<¬<¸<Î<Ù<ü<=====7=Q=[=g=o=t=t=“=Ÿ=±=¶=Ò=Ş=í=ò=>>>>>>>>>>:>F>X>Z>]>b>b>b>l>t>{>ƒ>Œ>—>�>ª>¸>¸>Â>Ë>Ó>???$?>?C?C?V?^?^?`?`?`?e?e?l?r?v?}?�?�?�?�?�?�?µ?¾?¾?Â?İCú(àCàCîC÷CD Dû�ªÊÇnÇnånínùno$o2o=oLoRoRoRoWo\ojouo�o�o•o£o®o»oÂoĞoü\2E7-7-Q-v-X-…-¡-—-¹-Î-»-İ-ö-.!.!.(.J.J.T.ı8fpGNGN_NnN‚N‘N—N�N NÀNş0�—xŒxŒŒŒ˜Œ¦Œ©ŒÁŒÄŒÌŒÿ0S[¶Ø¶ØÊØÒØßØéØüØP>Nø‰ø‰ŠŠŠ/Š7Š;ŠEŠOŠWŠZŠ`ŠT¡²¯P¯PÉPÜPßPéPöP Q␍Q Q)Q=Q=QCQFQšQ<˜£ĞŒĞŒäŒëŒ÷Œ���� �'� 26nænæ|æˆæH!/w]w]‹]—]­]™]¼]¾]Å]Ğ]Ü]ä]D>‹?T?TaTlTqTyT“TšTœTœT¸T¾TÀTËTÒTÒTÖTåTîTöTÿTUUUU U(U.U3U;URUVUlUU…U™U�U«U«U¿UÊUÑUÚUèUñUVVV#V(V+V5V:VFVOVcVjV|V�V—V—V�V¡VóVläûNäNäbäxä†ä‘ä•äœä ä©ä¸äºäºäÎäĞäÙäßäßäßäßäçä´KtğEğEF'F,F3F=F=FEFXF\FaFvFxF{FF†FšF�F¦F²F¹F½FÅFÇFÏFİFåFçFêFG GG!G%G3G -Qss�s›s§s·sÏsÕsãsôsüsttItctpt}t�t“t•t¦tÈtÏtÕtãtëtu uuu;u ôB»8j8jRjUj\jgjvjxjƒj’j’jŸj­j°j²j²j·j¼jÅjĞjÖjßjòj÷j kk!k!k7k7kdkxk�k•kšk¡k§k®k³k³k¹k¿kÄkÄk×kåkıklll&l-l-lJlelklplpl›l l lËlòl÷l÷l÷lúlmmmmmm m$m$m;mOmUmxm~m�mšm m®mµm·mËmÑmØmØmÚmÚmÚmßmåmêmîmğmómşm␍nnnnnnn)nSn
˜}Ÿ&$&$B$G$N$X$^$i$y$�$‰$�$™$£$©$´$Ä$Ì$Ü$ã$ë$ó$û$%%%!%!%7%  B†·?·?Ï?Ö?é?@@)@7@+@`@`@l@t@ƒ@½@¿@ì@ô@ô@)AAA.AbAPAqAwA†A›A�A¨A°A°AÑAÖAßAëAóABşAFB,B BUBrB]B’BªB—BÌB¹BíBÛBüBCC%C%C%CNCNCZC Ğ1 “ “4“4“Z“Z“z“~“ƒ“ƒ“ƒ“�“”“¤“©“©“©“®“®“ǓΓݓë“ô“”␍”””””””$”+”2”9”@”G”G”I”I”O”T”[•␍D ,çrçrõrÿr sss's3s5sGsGsIsys
+5 -6
View File
@@ -31,7 +31,7 @@ public extern I64 CmpCtrlSize(CCmpCtrl *cc);
public extern I64 IsLexExpression2Bin(
CCmpCtrl *cc,U8 **machine_code); //FALSE=no err
public extern I64 Lex(CCmpCtrl *cc);
public extern U0 LexAttachDoc(CCmpCtrl *cc,CLexFile *tempf=NULL,
public extern U0 LexAttachDoc(CCmpCtrl *cc,CLexFile *tmpf=NULL,
CDoc *doc=NULL,U8 *abs_filename=NULL,CDocEntry *doc_e=NULL,I64 col=0);
public extern CD2I32 *LexD2I32(CCmpCtrl *cc,CD2I32 *p);
public extern CD3I32 *LexD3I32(CCmpCtrl *cc,CD3I32 *p);
@@ -56,12 +56,11 @@ public extern U0 LexWarn(CCmpCtrl *cc,U8 *str=NULL);
extern CMemberLst *MemberClassBaseFind(
CHashClass *needle_class,CHashClass *haystack_class);
public extern CMemberLst *MemberFind(U8 *needle_str,CHashClass *haystack_class);
extern U0 MemberLstDel(CMemberLst *tempm);
extern U0 MemberLstDel(CMemberLst *tmpm);
public extern I64 MemberMetaData(U8 *st,CMemberLst *ml);
public extern CMemberLstMeta *MemberMetaFind(U8 *st,CMemberLst *ml);
public extern CHashClass *OptClassFwd(CHashClass *tempc);
public extern CHashClass *OptClassFwd(CHashClass *tmpc);
public extern I64 PrsKeyWord(CCmpCtrl *cc);
#help_index "Compiler;Cmd Line (Typically)"
extern I64 Cmp(U8 *filename,
U8 *map_name=NULL,U8 *out_name=NULL,U8 mapfile_drv_let=0);
@@ -74,6 +73,6 @@ public extern I64 Un(U8 *ip,I64 cnt=0x80,I64 seg_size=64);
extern CUAsmGlbls uasm;
#help_index "Hash/System"
public extern I64 HashEntrySize(CHashSrcSym *temph);
public extern I64 HashEntrySize2(CHashSrcSym *temph);
public extern I64 HashEntrySize(CHashSrcSym *tmph);
public extern I64 HashEntrySize2(CHashSrcSym *tmph);
public extern I64 HashTableSize2(CHashTable *table);
+112 -112
View File
@@ -10,17 +10,17 @@ CLexFile *LexFilePush(CCmpCtrl *cc)
CLexFile *LexFilePop(CCmpCtrl *cc)
{//#include file pop.
CLexFile *tempf;
if (tempf=cc->lex_include_stk) {
if ((cc->lex_include_stk=tempf->next) || !(cc->flags & CCF_DONT_FREE_BUF)) {
if (tempf->flags & LFSF_DOC) {
if (tempf->doc)
DocDel(tempf->doc);
CLexFile *tmpf;
if (tmpf=cc->lex_include_stk) {
if ((cc->lex_include_stk=tmpf->next) || !(cc->flags & CCF_DONT_FREE_BUF)) {
if (tmpf->flags & LFSF_DOC) {
if (tmpf->doc)
DocDel(tmpf->doc);
} else
Free(tempf->buf);;
Free(tmpf->buf);;
}
Free(tempf->full_name);
Free(tempf);
Free(tmpf->full_name);
Free(tmpf);
}
return cc->lex_include_stk;
}
@@ -31,7 +31,7 @@ CCmpCtrl *CmpCtrlNew(U8 *buf=NULL,I64 flags=0,U8 *filename=NULL)
//FileName is for error reporting. If files are #included,
//new names are used. See $LK,"Psalmody CmpCtrlNew",A="FF:::/Apps/Psalmody/PsalmodyFile.HC,CmpCtrlNew"$.
CCmpCtrl *cc=CAlloc(sizeof(CCmpCtrl));
CLexFile *tempf;
CLexFile *tmpf;
QueInit(cc);
cc->flags=flags;
cc->opts=1<<OPTf_WARN_UNUSED_VAR|1<<OPTf_WARN_HEADER_MISMATCH;
@@ -42,16 +42,16 @@ CCmpCtrl *CmpCtrlNew(U8 *buf=NULL,I64 flags=0,U8 *filename=NULL)
cc->chars_bmp_alpha_numeric=chars_bmp_alpha_numeric_no_at;
else
cc->chars_bmp_alpha_numeric=chars_bmp_alpha_numeric;
tempf=LexFilePush(cc);
tmpf=LexFilePush(cc);
QueInit(&cc->next_stream_blk);
if (filename)
tempf->full_name=FileNameAbs(filename);
tmpf->full_name=FileNameAbs(filename);
else
tempf->full_name=StrNew(blkdev.temp_filename);
tmpf->full_name=StrNew(blkdev.tmp_filename);
if (flags & CCF_PMT)
buf=CAlloc(8);
tempf->buf=tempf->buf_ptr=tempf->line_start=cc->cur_buf_ptr=buf;
tempf->line_num=1;
tmpf->buf=tmpf->buf_ptr=tmpf->line_start=cc->cur_buf_ptr=buf;
tmpf->line_num=1;
return cc;
}
@@ -69,19 +69,19 @@ U0 CmpCtrlDel(CCmpCtrl *cc)
I64 CmpCtrlSize(CCmpCtrl *cc)
{//Mem size of CCmpCtrl and its members.
CLexFile *tempf=cc->lex_include_stk;
CLexFile *tmpf=cc->lex_include_stk;
I64 res=0;
while (tempf) {
if (tempf->next || !(cc->flags & CCF_DONT_FREE_BUF)) {
if (tempf->flags & LFSF_DOC) {
if (tempf->doc)
res+=DocSize(tempf->doc);
while (tmpf) {
if (tmpf->next || !(cc->flags & CCF_DONT_FREE_BUF)) {
if (tmpf->flags & LFSF_DOC) {
if (tmpf->doc)
res+=DocSize(tmpf->doc);
} else
res+=MSize2(tempf->buf);
res+=MSize2(tmpf->buf);
}
res+=MSize2(tempf->full_name);
res+=MSize2(tempf);
tempf=tempf->next;
res+=MSize2(tmpf->full_name);
res+=MSize2(tmpf);
tmpf=tmpf->next;
}
res+=MSize2(cc->cur_str);
res+=MSize2(cc);
@@ -107,7 +107,7 @@ Bool LexDollar(CCmpCtrl *cc,CDoc *doc,CDocEntry *doc_e)
I64 LexGetChar(CCmpCtrl *cc)
{//Get one char from stream. Allow put-back one.
U8 *ptr,*src;
CLexFile *tempf;
CLexFile *tmpf;
CDoc *doc;
CDocEntry *doc_e;
if (!Btr(&cc->flags,CCf_USE_LAST_U16)) {
@@ -119,50 +119,50 @@ lgc_start1:
switch [cc->last_U16=*src++] {
case 0:
lgc_here:
tempf=cc->lex_include_stk;
if (tempf->flags & LFSF_DOC) {
doc=tempf->doc;
doc_e=tempf->cur_entry;
tmpf=cc->lex_include_stk;
if (tmpf->flags & LFSF_DOC) {
doc=tmpf->doc;
doc_e=tmpf->cur_entry;
doc_e=doc_e->next;
lgc_start2:
if (doc_e!=doc) {
tempf->cur_entry=doc_e;
tmpf->cur_entry=doc_e;
switch [doc_e->type_u8] {
case DOCT_TEXT:
if (doc_e->de_flags & ~(DOCEF_TAG|DOCEF_DEFINE|DOCEF_TAG_CB|
DOCG_BL_IV_UL|DOCEF_WORD_WRAP|DOCEF_HIGHLIGHT|
DOCEF_SKIP|DOCEF_FILTER_SKIP) &&
LexDollar(cc,doc,doc_e) && *(src=cc->dollar_buf)) {
tempf->line_num=doc_e->y+1;
tempf->buf_ptr=cc->cur_buf_ptr=src;
tmpf->line_num=doc_e->y+1;
tmpf->buf_ptr=cc->cur_buf_ptr=src;
} else if (*(src=doc_e->tag))
tempf->buf_ptr=cc->cur_buf_ptr=src;
tmpf->buf_ptr=cc->cur_buf_ptr=src;
else {
doc_e=doc_e->next;
goto lgc_start2;
}
break;
case DOCT_NEW_LINE:
tempf->buf_ptr=cc->cur_buf_ptr=&lex_zeros;
tempf->line_start=doc_e->next;
tempf->line_num=doc_e->y+2;//+1 because NEW_LINE is on prev line
tmpf->buf_ptr=cc->cur_buf_ptr=&lex_zeros;
tmpf->line_start=doc_e->next;
tmpf->line_num=doc_e->y+2;//+1 because NEW_LINE is on prev line
//+1 because doc y starts at zero
cmp.compiled_lines++;
cc->last_U16='\n';
goto lgc_done;
case DOCT_TAB:
tempf->buf_ptr=cc->cur_buf_ptr=&lex_zeros;
tempf->line_num=doc_e->y+1;
tmpf->buf_ptr=cc->cur_buf_ptr=&lex_zeros;
tmpf->line_num=doc_e->y+1;
cc->last_U16='\t';
goto lgc_done;
case DOCT_PAGE_BREAK:
tempf->buf_ptr=cc->cur_buf_ptr=&lex_zeros;
tempf->line_num=doc_e->y+2; //TODO: should be a page down
tmpf->buf_ptr=cc->cur_buf_ptr=&lex_zeros;
tmpf->line_num=doc_e->y+2; //TODO: should be a page down
cc->last_U16=CH_FORM_FEED;
goto lgc_done;
case DOCT_INS_BIN:
tempf->buf_ptr=cc->cur_buf_ptr=&lex_zeros;
tempf->line_num=doc_e->y+1;
tmpf->buf_ptr=cc->cur_buf_ptr=&lex_zeros;
tmpf->line_num=doc_e->y+1;
Free(cc->cur_str);
cc->cur_str=NULL;
cc->cur_str_len=0;
@@ -176,21 +176,21 @@ lgc_start2:
cc->last_U16=TK_INS_BIN;
goto lgc_done;
case DOCT_INS_BIN_SIZE:
tempf->buf_ptr=cc->cur_buf_ptr=&lex_zeros;
tmpf->buf_ptr=cc->cur_buf_ptr=&lex_zeros;
if (doc_e->bin_data)
cc->cur_i64=doc_e->bin_data->size;
else
cc->cur_i64=0;
tempf->line_num=doc_e->y+1;
tmpf->line_num=doc_e->y+1;
cc->last_U16=TK_INS_BIN_SIZE;
goto lgc_done;
case DOCT_SHIFTED_Y:
if (LexDollar(cc,doc,doc_e) && *(src=cc->dollar_buf)) {
tempf->line_num=doc_e->y+1;
tempf->buf_ptr=cc->cur_buf_ptr=src;
tmpf->line_num=doc_e->y+1;
tmpf->buf_ptr=cc->cur_buf_ptr=src;
} else {
tempf->buf_ptr=cc->cur_buf_ptr=&lex_zeros;
tempf->line_num=doc_e->y+1;
tmpf->buf_ptr=cc->cur_buf_ptr=&lex_zeros;
tmpf->line_num=doc_e->y+1;
if (doc_e->attr<0)
cc->last_U16=TK_SUPERSCRIPT;
else if (doc_e->attr>0)
@@ -207,8 +207,8 @@ lgc_start2:
case 0xFF: //nobound switch
default:
if (LexDollar(cc,doc,doc_e) && *(src=cc->dollar_buf)) {
tempf->line_num=doc_e->y+1;
tempf->buf_ptr=cc->cur_buf_ptr=src;
tmpf->line_num=doc_e->y+1;
tmpf->buf_ptr=cc->cur_buf_ptr=src;
} else {
doc_e=doc_e->next;
goto lgc_start2;
@@ -217,25 +217,25 @@ lgc_start2:
}
if (doc_e!=doc)
goto lgc_start1;
tempf->cur_entry=doc->head.last; //When take next, will still be end.
tmpf->cur_entry=doc->head.last; //When take next, will still be end.
}
tempf=cc->lex_include_stk;
if (tempf->next) {
tempf=LexFilePop(cc);
cc->cur_buf_ptr=tempf->buf_ptr;
tmpf=cc->lex_include_stk;
if (tmpf->next) {
tmpf=LexFilePop(cc);
cc->cur_buf_ptr=tmpf->buf_ptr;
cc->flags&=~CCF_USE_LAST_U16;
if (!(cc->last_U16=tempf->last_U16))
if (!(cc->last_U16=tmpf->last_U16))
goto lgc_start1;
} else {
if (cc->flags & CCF_PMT) {
Free(tempf->buf);
Free(tmpf->buf);
ptr=CmdLinePmt;
if (StrCmp(ptr,"\n") && !cc->pmt_line++ && !StrCmp(ptr,"?\n") &&
cc->flags & CCF_QUESTION_HELP) {
Free(ptr);
ptr=StrNew("Help;;\n");
}
tempf->buf=tempf->buf_ptr=tempf->line_start=cc->cur_buf_ptr=ptr;
tmpf->buf=tmpf->buf_ptr=tmpf->line_start=cc->cur_buf_ptr=ptr;
goto lgc_start1;
} else {
if (src)
@@ -248,11 +248,11 @@ lgc_start2:
case CH_FORM_FEED:
goto lgc_start1;
case '\n':
tempf=cc->lex_include_stk;
if (!(tempf->flags & LFSF_DOC)) {
tempf->line_num++;
tmpf=cc->lex_include_stk;
if (!(tmpf->flags & LFSF_DOC)) {
tmpf->line_num++;
cmp.compiled_lines++;
tempf->line_start=src;
tmpf->line_start=src;
}
break;
case 0xFF: //nobound switch
@@ -277,21 +277,21 @@ U0 LexSkipEol(CCmpCtrl *cc)
U8 *LexFirstRem(CCmpCtrl *cc,U8 *marker,I64 _len=NULL)
{//$LK,"LexGetChar",A="MN:LexGetChar"$() chars making str until marker.
U8 *res,*ptr;
CQueVectU8 *tempv=QueVectU8New;
CQueVectU8 *tmpv=QueVectU8New;
I64 i,len=0;
while (TRUE) {
i=LexGetChar(cc);
if (!i||StrOcc(marker,i))
break;
QueVectU8Put(tempv,len++,i);
QueVectU8Put(tmpv,len++,i);
}
if (i)
Bts(&cc->flags,CCf_USE_LAST_U16);
res=ptr=MAlloc(len+1);
for (i=0;i<len;i++)
*ptr++=QueVectU8Get(tempv,i);
*ptr++=QueVectU8Get(tmpv,i);
*ptr=0;
QueVectU8Del(tempv);
QueVectU8Del(tmpv);
if (_len) *_len=len;
return res;
}
@@ -299,13 +299,13 @@ U8 *LexFirstRem(CCmpCtrl *cc,U8 *marker,I64 _len=NULL)
U0 LexIncludeStr(CCmpCtrl *cc,U8 *abs_filename,U8 *src,Bool actual_file)
{
LexBackupLastChar(cc);
CLexFile *tempf=LexFilePush(cc);
CLexFile *tmpf=LexFilePush(cc);
if (actual_file)
tempf->full_name=StrNew(abs_filename);
tmpf->full_name=StrNew(abs_filename);
else
tempf->full_name=StrNew(blkdev.temp_filename);
tempf->line_num=1;
tempf->buf=tempf->buf_ptr=tempf->line_start=cc->cur_buf_ptr=src;
tmpf->full_name=StrNew(blkdev.tmp_filename);
tmpf->line_num=1;
tmpf->buf=tmpf->buf_ptr=tmpf->line_start=cc->cur_buf_ptr=src;
}
CDoc *LexDocRead(U8 *abs_filename,I64 flags)
@@ -328,19 +328,19 @@ CDoc *LexDocRead(U8 *abs_filename,I64 flags)
I64 cmp_type_flags_src_code[(DOCT_NUM_TYPES+63)/64]={
1<<DOCT_TEXT|1<<DOCT_TAB|1<<DOCT_INS_BIN|1<<DOCT_INS_BIN_SIZE};
U0 LexAttachDoc(CCmpCtrl *cc,CLexFile *tempf=NULL,
U0 LexAttachDoc(CCmpCtrl *cc,CLexFile *tmpf=NULL,
CDoc *doc=NULL,U8 *abs_filename=NULL,CDocEntry *doc_e=NULL,I64 col=0)
{//Start lexing doc. Give either doc or abs_filename.
if (!doc)
doc=LexDocRead(abs_filename,DOCF_DBL_DOLLARS);
if (!tempf) {
if (!tmpf) {
LexBackupLastChar(cc);
tempf=LexFilePush(cc);
tmpf=LexFilePush(cc);
}
if (!doc_e)
doc_e=doc->head.next;
tempf->full_name=StrNew(doc->filename.name);
tempf->doc=doc;
tmpf->full_name=StrNew(doc->filename.name);
tmpf->doc=doc;
while (doc_e!=doc) {
if (Bt(cmp_type_flags_src_code,doc_e->type_u8))
break;
@@ -349,25 +349,25 @@ U0 LexAttachDoc(CCmpCtrl *cc,CLexFile *tempf=NULL,
}
if (doc_e!=doc) {
col=ClampI64(col,doc_e->min_col,doc_e->max_col);
tempf->line_start=doc_e;
tempf->buf=NULL;
tempf->line_num=doc_e->y+1;
tmpf->line_start=doc_e;
tmpf->buf=NULL;
tmpf->line_num=doc_e->y+1;
if (doc_e->type_u8==DOCT_TEXT) {
tempf->cur_entry=doc_e;
tempf->buf_ptr=doc_e->tag;
tmpf->cur_entry=doc_e;
tmpf->buf_ptr=doc_e->tag;
} else {
tempf->cur_entry=doc_e->last; //TODO: might be problem at begin of file
tempf->buf_ptr=&lex_zeros;
tmpf->cur_entry=doc_e->last; //TODO: might be problem at begin of file
tmpf->buf_ptr=&lex_zeros;
}
tempf->flags=LFSF_DOC;
tmpf->flags=LFSF_DOC;
} else {//TODO: DocDel(doc)?
col=0;
tempf->buf=tempf->buf_ptr=tempf->line_start=CAlloc(1);
tempf->line_num=1;
tempf->flags=0;
tmpf->buf=tmpf->buf_ptr=tmpf->line_start=CAlloc(1);
tmpf->line_num=1;
tmpf->flags=0;
}
cc->cur_buf_ptr=tempf->buf_ptr+col;
tempf->last_U16=0;
cc->cur_buf_ptr=tmpf->buf_ptr+col;
tmpf->last_U16=0;
}
I64 LexInStr(CCmpCtrl *cc,U8 *buf,I64 size,Bool *done)
@@ -447,7 +447,7 @@ I64 LexInStr(CCmpCtrl *cc,U8 *buf,I64 size,Bool *done)
I64 Lex(CCmpCtrl *cc)
{//Fetch next token.
I64 i,j,k,l,ch;
CHash *temph;
CHash *tmph;
Bool str_done,neg_e;
U8 *fbuf,*buf2,*buf3,buf[STR_LEN];
cc->last_line_num=cc->lex_include_stk->line_num;
@@ -496,23 +496,23 @@ lex_ident:
}
}
buf[i++]=0;
temph=NULL;
tmph=NULL;
if (cc->htc.local_var_lst)
cc->local_var_entry=MemberFind(buf,cc->htc.local_var_lst);
else
cc->local_var_entry=NULL;
if (!cc->local_var_entry && cc->htc.hash_table_lst)
temph=HashFind(buf,cc->htc.hash_table_lst,cc->htc.hash_mask);
if (temph)
j=temph->type;
tmph=HashFind(buf,cc->htc.hash_table_lst,cc->htc.hash_mask);
if (tmph)
j=tmph->type;
else
j=0;
if (j & HTT_DEFINE_STR && !(cc->flags & CCF_NO_DEFINES)) {
LexIncludeStr(cc,
temph->str,StrNew(temph(CHashDefineStr *)->data),FALSE);
tmph->str,StrNew(tmph(CHashDefineStr *)->data),FALSE);
cc->lex_include_stk->flags|=LFSF_DEFINE;
} else {
cc->hash_entry=temph;
cc->hash_entry=tmph;
Free(cc->cur_str);
cc->cur_str=StrNew(buf);
cc->cur_str_len=i;
@@ -694,11 +694,11 @@ lex_float_start:
}
if (Lex(cc)!=TK_IDENT) //skip '#'
goto lex_end;
if (!(temph=cc->hash_entry))
if (!(tmph=cc->hash_entry))
goto lex_end;
if (!(temph->type & HTT_KEYWORD))
if (!(tmph->type & HTT_KEYWORD))
goto lex_end;
switch (i=temph(CHashGeneric *)->user_data0) {
switch (i=tmph(CHashGeneric *)->user_data0) {
case KW_INCLUDE:
if (Lex(cc)!=TK_STR)
goto lex_end;
@@ -714,11 +714,11 @@ lex_float_start:
case KW_DEFINE:
cc->flags|=CCF_NO_DEFINES;
if (Lex(cc)==TK_IDENT) {
temph=CAlloc(sizeof(CHashDefineStr));
temph->str=cc->cur_str;
tmph=CAlloc(sizeof(CHashDefineStr));
tmph->str=cc->cur_str;
cc->cur_str=0;
temph->type=HTT_DEFINE_STR;
HashSrcFileSet(cc,temph);
tmph->type=HTT_DEFINE_STR;
HashSrcFileSet(cc,tmph);
do ch=LexGetChar(cc); //skip space between define name and start
while (Bt(chars_bmp_non_eol_white_space,ch));
@@ -788,9 +788,9 @@ lex_float_start:
buf2=buf3;
MemCpy(buf2,buf,j);
}
temph(CHashDefineStr *)->data=buf2;
temph(CHashDefineStr *)->cnt=-1;
HashAdd(temph,cc->htc.define_hash_table);
tmph(CHashDefineStr *)->data=buf2;
tmph(CHashDefineStr *)->cnt=-1;
HashAdd(tmph,cc->htc.define_hash_table);
}
cc->flags&=~CCF_NO_DEFINES;
break;
@@ -1032,13 +1032,13 @@ lex_ifjit:
case KW_HELP_FILE:
if (Lex(cc)!=TK_STR)
goto lex_end;
temph=CAlloc(sizeof(CHashSrcSym));
tmph=CAlloc(sizeof(CHashSrcSym));
fbuf=DftExt(cc->cur_str,"DD.Z");
temph->str=FileNameAbs(fbuf);
tmph->str=FileNameAbs(fbuf);
Free(fbuf);
temph->type=HTT_HELP_FILE|HTF_PUBLIC;
HashSrcFileSet(cc,temph);
HashAdd(temph,cc->htc.glbl_hash_table);
tmph->type=HTT_HELP_FILE|HTF_PUBLIC;
HashSrcFileSet(cc,tmph);
HashAdd(tmph,cc->htc.glbl_hash_table);
break;
}
break;
+126 -126
View File
@@ -1,45 +1,45 @@
U0 LexBackupLastChar(CCmpCtrl *cc)
{
CLexFile *tempf=cc->lex_include_stk;
tempf->buf_ptr=cc->cur_buf_ptr;
CLexFile *tmpf=cc->lex_include_stk;
tmpf->buf_ptr=cc->cur_buf_ptr;
if (cc->flags & CCF_USE_LAST_U16) {
tempf->last_U16=cc->last_U16;
tmpf->last_U16=cc->last_U16;
cc->flags&=~CCF_USE_LAST_U16;
} else
tempf->last_U16=0;
tmpf->last_U16=0;
}
U0 LexPush(CCmpCtrl *cc)
{//Create token-stream save point.
CLexFile *tempf;
CLexFile *tmpf;
LexBackupLastChar(cc);
if (cc->lex_include_stk->last_U16)
cc->flags|=CCF_USE_LAST_U16;
tempf=MAllocIdent(cc->lex_include_stk);
tempf->next=cc->lex_prs_stk;
cc->lex_prs_stk=tempf;
tmpf=MAllocIdent(cc->lex_include_stk);
tmpf->next=cc->lex_prs_stk;
cc->lex_prs_stk=tmpf;
}
U0 LexPopRestore(CCmpCtrl *cc)
{//Restore token-stream saved-point.
//Bad things can happen if you cross an #include file boundary.
CLexFile *tempf=cc->lex_prs_stk;
cc->cur_buf_ptr=tempf->buf_ptr;
if (cc->last_U16=tempf->last_U16)
CLexFile *tmpf=cc->lex_prs_stk;
cc->cur_buf_ptr=tmpf->buf_ptr;
if (cc->last_U16=tmpf->last_U16)
cc->flags|=CCF_USE_LAST_U16;
else
cc->flags&=~CCF_USE_LAST_U16;
MemCpy(cc->lex_include_stk(U8 *)+sizeof(U8 *),tempf(U8 *)+sizeof(U8 *),
MemCpy(cc->lex_include_stk(U8 *)+sizeof(U8 *),tmpf(U8 *)+sizeof(U8 *),
sizeof(CLexFile)-sizeof(U8 *));
cc->lex_prs_stk=tempf->next;
Free(tempf);
cc->lex_prs_stk=tmpf->next;
Free(tmpf);
}
U0 LexPopNoRestore(CCmpCtrl *cc)
{//Don't restore token-stream saved-point.
CLexFile *tempf=cc->lex_prs_stk;
cc->lex_prs_stk=tempf->next;
Free(tempf);
CLexFile *tmpf=cc->lex_prs_stk;
cc->lex_prs_stk=tmpf->next;
Free(tmpf);
}
I64 MemberMetaData(U8 *needle_str,CMemberLst *haystack_member_lst)
@@ -67,18 +67,18 @@ CMemberLstMeta *MemberMetaFind(U8 *needle_str,CMemberLst *haystack_member_lst)
CMemberLst *MemberFind(U8 *needle_str,CHashClass *haystack_class)
{//Find class member. See $LK,"ClassRep",A="MN:ClassRep"$() and $LK,"DocForm",A="MN:DocForm"$().
I64 i;
CMemberLst *tempm;
CMemberLst *tmpm;
do {
tempm=haystack_class->member_lst_and_root;
while (tempm) {
if (!(i=StrCmp(tempm->str,needle_str))) {
tempm->use_cnt++;
return tempm;
tmpm=haystack_class->member_lst_and_root;
while (tmpm) {
if (!(i=StrCmp(tmpm->str,needle_str))) {
tmpm->use_cnt++;
return tmpm;
}
if (i<=0)
tempm=tempm->left;
tmpm=tmpm->left;
else
tempm=tempm->right;
tmpm=tmpm->right;
}
} while (haystack_class=haystack_class->base_class);
return NULL;
@@ -87,64 +87,64 @@ CMemberLst *MemberFind(U8 *needle_str,CHashClass *haystack_class)
CMemberLst *MemberClassBaseFind(CHashClass *needle_class,
CHashClass *haystack_class)
{//Find class member class base. For finding dup class local vars.
CMemberLst *tempm;
tempm=haystack_class->member_class_base_root;
while (tempm) {
if (needle_class==tempm->member_class_base)
return tempm;
if (needle_class<tempm->member_class_base)
tempm=tempm->left_class_base;
CMemberLst *tmpm;
tmpm=haystack_class->member_class_base_root;
while (tmpm) {
if (needle_class==tmpm->member_class_base)
return tmpm;
if (needle_class<tmpm->member_class_base)
tmpm=tmpm->left_class_base;
else
tempm=tempm->right_class_base;
tmpm=tmpm->right_class_base;
}
return NULL;
}
U0 MemberAdd(CCmpCtrl *cc,CMemberLst *tempm,CHashClass *tempc,I64 mode)
U0 MemberAdd(CCmpCtrl *cc,CMemberLst *tmpm,CHashClass *tmpc,I64 mode)
{
U8 *st=tempm->str;
CMemberLst **tempm1,*tempm2;
U8 *st=tmpm->str;
CMemberLst **tmpm1,*tmpm2;
if (MemberFind(st,tempc) && StrCmp(st,"pad") &&
if (MemberFind(st,tmpc) && StrCmp(st,"pad") &&
StrCmp(st,"reserved") && StrCmp(st,"_anon_"))
LexExcept(cc,"Duplicate member at ");
tempm1=&tempc->member_lst_and_root;
while (tempm2=*tempm1) {
if (StrCmp(tempm2->str,st)<=0)
tempm1=&tempm2->left;
tmpm1=&tmpc->member_lst_and_root;
while (tmpm2=*tmpm1) {
if (StrCmp(tmpm2->str,st)<=0)
tmpm1=&tmpm2->left;
else
tempm1=&tempm2->right;
tmpm1=&tmpm2->right;
}
*tempm1=tempm;
*tmpm1=tmpm;
if (mode==PRS1B_LOCAL_VAR) {
tempm->member_class_base=
tempm->member_class-tempm->member_class->ptr_stars_cnt;
tmpm->member_class_base=
tmpm->member_class-tmpm->member_class->ptr_stars_cnt;
if (Bt(&cc->opts,OPTf_WARN_DUP_TYPES) &&
MemberClassBaseFind(tempm->member_class_base,tempc))
MemberClassBaseFind(tmpm->member_class_base,tmpc))
LexWarn(cc,"Duplicate type at ");
tempm1=&tempc->member_class_base_root;
while (tempm2=*tempm1) {
if (tempm->member_class_base<tempm2->member_class_base)
tempm1=&tempm2->left_class_base;
else if (tempm->member_class_base>tempm2->member_class_base)
tempm1=&tempm2->right_class_base;
tmpm1=&tmpc->member_class_base_root;
while (tmpm2=*tmpm1) {
if (tmpm->member_class_base<tmpm2->member_class_base)
tmpm1=&tmpm2->left_class_base;
else if (tmpm->member_class_base>tmpm2->member_class_base)
tmpm1=&tmpm2->right_class_base;
else {
tempm1=NULL;
tmpm1=NULL;
break;
}
}
if (tempm1)
*tempm1=tempm;
if (tmpm1)
*tmpm1=tmpm;
} else
tempm->member_class_base=NULL;
tmpm->member_class_base=NULL;
tempm->left=NULL;
tempm->right=NULL;
tempm->left_class_base=NULL;
tempm->right_class_base=NULL;
tempm2=tempc->last_in_member_lst;
tempm2->next=tempc->last_in_member_lst=tempm;
tmpm->left=NULL;
tmpm->right=NULL;
tmpm->left_class_base=NULL;
tmpm->right_class_base=NULL;
tmpm2=tmpc->last_in_member_lst;
tmpm2->next=tmpc->last_in_member_lst=tmpm;
}
CMemberLst *MemberLstNew(I64 _reg)
@@ -154,93 +154,93 @@ CMemberLst *MemberLstNew(I64 _reg)
return res;
}
Bool MemberLstCmp(CMemberLst *tempm1,CMemberLst *tempm2,I64 cnt=MAX_I64)
Bool MemberLstCmp(CMemberLst *tmpm1,CMemberLst *tmpm2,I64 cnt=MAX_I64)
{
while (tempm1 && tempm2 && cnt--) {
if (StrCmp(tempm1->str,tempm2->str) ||
tempm1->member_class!=tempm2->member_class ||
tempm1->member_class_base!=tempm2->member_class_base)
while (tmpm1 && tmpm2 && cnt--) {
if (StrCmp(tmpm1->str,tmpm2->str) ||
tmpm1->member_class!=tmpm2->member_class ||
tmpm1->member_class_base!=tmpm2->member_class_base)
return FALSE;
if (tempm1->flags&MLF_DFT_AVAILABLE || tempm2->flags&MLF_DFT_AVAILABLE) {
if (tempm1->flags&(MLF_DFT_AVAILABLE|MLF_STR_DFT_AVAILABLE)!=
tempm2->flags&(MLF_DFT_AVAILABLE|MLF_STR_DFT_AVAILABLE))
if (tmpm1->flags&MLF_DFT_AVAILABLE || tmpm2->flags&MLF_DFT_AVAILABLE) {
if (tmpm1->flags&(MLF_DFT_AVAILABLE|MLF_STR_DFT_AVAILABLE)!=
tmpm2->flags&(MLF_DFT_AVAILABLE|MLF_STR_DFT_AVAILABLE))
return FALSE;
if (tempm1->flags&MLF_STR_DFT_AVAILABLE) {
if (StrCmp(tempm1->dft_val,tempm2->dft_val))
if (tmpm1->flags&MLF_STR_DFT_AVAILABLE) {
if (StrCmp(tmpm1->dft_val,tmpm2->dft_val))
return FALSE;
} else if (tempm1->dft_val!=tempm2->dft_val)
} else if (tmpm1->dft_val!=tmpm2->dft_val)
return FALSE;
}
tempm1=tempm1->next;
tempm2=tempm2->next;
tmpm1=tmpm1->next;
tmpm2=tmpm2->next;
}
if (cnt<0 || !tempm1 && !tempm2)
if (cnt<0 || !tmpm1 && !tmpm2)
return TRUE;
else
return FALSE;
}
U0 MemberLstDel(CMemberLst *tempm)
U0 MemberLstDel(CMemberLst *tmpm)
{
CMemberLst *tempm1;
CMemberLstMeta *temp_meta,*temp_meta1;
while (tempm) {
tempm1=tempm->next;
Free(tempm->str);
LinkedLstDel(tempm->dim.next);
if (tempm->flags & MLF_STR_DFT_AVAILABLE)
Free(tempm->dft_val);
if (tempm->flags & MLF_FUN)
HashDel(tempm->fun_ptr-tempm->fun_ptr->ptr_stars_cnt);
temp_meta=tempm->meta;
while (temp_meta) {
temp_meta1=temp_meta->next;
Free(temp_meta->str);
if (temp_meta->flags&MLMF_IS_STR)
Free(temp_meta->user_data);
Free(temp_meta);
temp_meta=temp_meta1;
CMemberLst *tmpm1;
CMemberLstMeta *tmp_meta,*tmp_meta1;
while (tmpm) {
tmpm1=tmpm->next;
Free(tmpm->str);
LinkedLstDel(tmpm->dim.next);
if (tmpm->flags & MLF_STR_DFT_AVAILABLE)
Free(tmpm->dft_val);
if (tmpm->flags & MLF_FUN)
HashDel(tmpm->fun_ptr-tmpm->fun_ptr->ptr_stars_cnt);
tmp_meta=tmpm->meta;
while (tmp_meta) {
tmp_meta1=tmp_meta->next;
Free(tmp_meta->str);
if (tmp_meta->flags&MLMF_IS_STR)
Free(tmp_meta->user_data);
Free(tmp_meta);
tmp_meta=tmp_meta1;
}
Free(tempm);
tempm=tempm1;
Free(tmpm);
tmpm=tmpm1;
}
}
U0 ClassMemberLstDel(CHashClass *tempc)
U0 ClassMemberLstDel(CHashClass *tmpc)
{
MemberLstDel(tempc->member_lst_and_root);
tempc->size=0;
tempc->last_in_member_lst=&tempc->member_lst_and_root;
tempc->member_lst_and_root=NULL;
tempc->member_class_base_root=NULL;
tempc->member_cnt=0;
if (tempc->type&HTT_FUN)
tempc(CHashFun *)->arg_cnt=0;
MemberLstDel(tmpc->member_lst_and_root);
tmpc->size=0;
tmpc->last_in_member_lst=&tmpc->member_lst_and_root;
tmpc->member_lst_and_root=NULL;
tmpc->member_class_base_root=NULL;
tmpc->member_cnt=0;
if (tmpc->type&HTT_FUN)
tmpc(CHashFun *)->arg_cnt=0;
}
I64 MemberLstSize(CHashClass *tempc)
I64 MemberLstSize(CHashClass *tmpc)
{
CMemberLst *tempm;
CMemberLstMeta *temp_meta;
CMemberLst *tmpm;
CMemberLstMeta *tmp_meta;
I64 res=0;
tempm=tempc->member_lst_and_root;
while (tempm) {
res+=MSize2(tempm->str);
res+=LinkedLstSize(tempm->dim.next);
if (tempm->flags & MLF_STR_DFT_AVAILABLE)
res+=MSize2(tempm->dft_val);
if (tempm->flags & MLF_FUN)
res+=HashEntrySize2(tempm->fun_ptr-tempm->fun_ptr->ptr_stars_cnt);
temp_meta=tempm->meta;
while (temp_meta) {
res+=MSize2(temp_meta->str);
if (temp_meta->flags&MLMF_IS_STR)
res+=MSize2(temp_meta->user_data);
res+=MSize2(temp_meta);
temp_meta=temp_meta->next;
tmpm=tmpc->member_lst_and_root;
while (tmpm) {
res+=MSize2(tmpm->str);
res+=LinkedLstSize(tmpm->dim.next);
if (tmpm->flags & MLF_STR_DFT_AVAILABLE)
res+=MSize2(tmpm->dft_val);
if (tmpm->flags & MLF_FUN)
res+=HashEntrySize2(tmpm->fun_ptr-tmpm->fun_ptr->ptr_stars_cnt);
tmp_meta=tmpm->meta;
while (tmp_meta) {
res+=MSize2(tmp_meta->str);
if (tmp_meta->flags&MLMF_IS_STR)
res+=MSize2(tmp_meta->user_data);
res+=MSize2(tmp_meta);
tmp_meta=tmp_meta->next;
}
res+=MSize2(tempm);
tempm=tempm->next;
res+=MSize2(tmpm);
tmpm=tmpm->next;
}
return res;
}
+1 -1
View File
@@ -1005,7 +1005,7 @@ OPCODE STD 0xFD;
OPCODE STI 0xFB;
OPCODE STOSB 0xAA;
OPCODE STOSW 0xAB, 16;
OPCODE STOSD $MA+LA,"",LM="NO;"$0xAB, 32;
OPCODE STOSD 0xAB, 32;
OPCODE STOSQ 0xAB, 32=;
OPCODE STR
0x0F 0x00,/1 16 RM16
+333 -333
View File
@@ -6,78 +6,78 @@ CCodeMisc *OptLabelFwd(CCodeMisc *lb)
return lb;
}
CHashClass *OptClassFwd(CHashClass *tempc)
CHashClass *OptClassFwd(CHashClass *tmpc)
{//Class forwarding for unions and subclasses.
CHashClass *tempc1;
while (tempc1=tempc->fwd_class)
tempc=tempc1;
return tempc;
CHashClass *tmpc1;
while (tmpc1=tmpc->fwd_class)
tmpc=tmpc1;
return tmpc;
}
U0 OptSetNOP1(CIntermediateCode *tempi)
U0 OptSetNOP1(CIntermediateCode *tmpi)
{
tempi->ic_code=IC_NOP1;
tempi->ic_flags=0;
tempi->a1.type=MDF_NULL+tempi->a1.type.raw_type;
tempi->r.type =MDF_NULL+tempi->r.type.raw_type;
tmpi->ic_code=IC_NOP1;
tmpi->ic_flags=0;
tmpi->a1.type=MDF_NULL+tmpi->a1.type.raw_type;
tmpi->r.type =MDF_NULL+tmpi->r.type.raw_type;
}
U0 OptSetNOP2(CIntermediateCode *tempi,I64 stk_delta=1)
U0 OptSetNOP2(CIntermediateCode *tmpi,I64 stk_delta=1)
{
tempi->ic_code=IC_NOP2;
tempi->ic_data=stk_delta;
tempi->a1.type=MDF_NULL+tempi->a1.type.raw_type;
tempi->r.type =MDF_NULL+tempi->r.type.raw_type;
tmpi->ic_code=IC_NOP2;
tmpi->ic_data=stk_delta;
tmpi->a1.type=MDF_NULL+tmpi->a1.type.raw_type;
tmpi->r.type =MDF_NULL+tmpi->r.type.raw_type;
}
CIntermediateCode *OptFree(CIntermediateCode *tempi)
CIntermediateCode *OptFree(CIntermediateCode *tmpi)
{//We might access freed entries in CICTreeLinks
QueRem(tempi);
Free(tempi);
QueRem(tmpi);
Free(tmpi);
return NULL;
}
CIntermediateCode *OptLag(CIntermediateCode *tempi)
CIntermediateCode *OptLag(CIntermediateCode *tmpi)
{
do {
if (!tempi->ic_code)
if (!tmpi->ic_code)
return NULL;
else
tempi=tempi->last;
} while (tempi->ic_code<=IC_END_EXP);
return tempi;
tmpi=tmpi->last;
} while (tmpi->ic_code<=IC_END_EXP);
return tmpi;
}
CIntermediateCode *OptLag1(CIntermediateCode *tempi)
CIntermediateCode *OptLag1(CIntermediateCode *tmpi)
{
do {
if (!tempi->ic_code)
if (!tmpi->ic_code)
return NULL;
else
tempi=tempi->last;
} while (tempi->ic_code==IC_NOP1||tempi->ic_code==IC_NOP2);
return tempi;
tmpi=tmpi->last;
} while (tmpi->ic_code==IC_NOP1||tmpi->ic_code==IC_NOP2);
return tmpi;
}
CIntermediateCode *OptLag2(CIntermediateCode *tempi)
CIntermediateCode *OptLag2(CIntermediateCode *tmpi)
{
do {
if (!tempi->ic_code)
if (!tmpi->ic_code)
return NULL;
else
tempi=tempi->last;
} while (tempi->ic_code<IC_END_EXP);
return tempi;
tmpi=tmpi->last;
} while (tmpi->ic_code<IC_END_EXP);
return tmpi;
}
CIntermediateCode *OptLead1(CIntermediateCode *tempi)
CIntermediateCode *OptLead1(CIntermediateCode *tmpi)
{
do {
tempi=tempi->next;
if (!tempi->ic_code)
tmpi=tmpi->next;
if (!tmpi->ic_code)
return NULL;
} while (tempi->ic_code==IC_NOP1||tempi->ic_code==IC_NOP2);
return tempi;
} while (tmpi->ic_code==IC_NOP1||tmpi->ic_code==IC_NOP2);
return tmpi;
}
I64 CmpOffset2Reg(I64 offset,COptReg *reg_offsets)
@@ -93,64 +93,64 @@ I64 CmpOffset2Reg(I64 offset,COptReg *reg_offsets)
#define FBO1_INT 1
#define FBO1_F64 2
Bool OptFixupBinaryOp1(CIntermediateCode *tempi,
CIntermediateCode *tempi1,CIntermediateCode *tempi2,
Bool OptFixupBinaryOp1(CIntermediateCode *tmpi,
CIntermediateCode *tmpi1,CIntermediateCode *tmpi2,
Bool *is_unsigned)
{
CIntermediateCode *tempii;
CHashClass *tempc=tempi->ic_class,*tempc1,*tempc2;
CIntermediateCode *tmpii;
CHashClass *tmpc=tmpi->ic_class,*tmpc1,*tmpc2;
if (tempi1->ic_flags&ICF_R_TO_INT)
tempc1=cmp.internal_types[RT_I64];
else if (tempi1->ic_flags&ICF_R_TO_F64)
tempc1=cmp.internal_types[RT_F64];
if (tmpi1->ic_flags&ICF_R_TO_INT)
tmpc1=cmp.internal_types[RT_I64];
else if (tmpi1->ic_flags&ICF_R_TO_F64)
tmpc1=cmp.internal_types[RT_F64];
else {
tempc1=OptClassFwd(tempi1->ic_class);
tmpc1=OptClassFwd(tmpi1->ic_class);
}
if (tempi2->ic_flags&ICF_R_TO_INT)
tempc2=cmp.internal_types[RT_I64];
else if (tempi2->ic_flags&ICF_R_TO_F64)
tempc2=cmp.internal_types[RT_F64];
if (tmpi2->ic_flags&ICF_R_TO_INT)
tmpc2=cmp.internal_types[RT_I64];
else if (tmpi2->ic_flags&ICF_R_TO_F64)
tmpc2=cmp.internal_types[RT_F64];
else {
tempc2=OptClassFwd(tempi2->ic_class);
tmpc2=OptClassFwd(tmpi2->ic_class);
}
if (tempc1->raw_type>tempc2->raw_type)
tempc=tempi->ic_class=tempc1;
if (tmpc1->raw_type>tmpc2->raw_type)
tmpc=tmpi->ic_class=tmpc1;
else
tempc=tempi->ic_class=tempc2;
tmpc=tmpi->ic_class=tmpc2;
if (tempc->raw_type==RT_F64) {
if (tempi1->ic_code==IC_IMM_I64) {
tempi1->ic_data(F64)=tempi1->ic_data;
tempi1->ic_class=cmp.internal_types[RT_F64];
tempi1->ic_code=IC_IMM_F64;
tempi1->ic_flags&=~ICF_R_TO_F64;
if (tmpc->raw_type==RT_F64) {
if (tmpi1->ic_code==IC_IMM_I64) {
tmpi1->ic_data(F64)=tmpi1->ic_data;
tmpi1->ic_class=cmp.internal_types[RT_F64];
tmpi1->ic_code=IC_IMM_F64;
tmpi1->ic_flags&=~ICF_R_TO_F64;
} else
if (tempc1->raw_type!=RT_F64)
tempi1->ic_flags|=ICF_R_TO_F64;
if (tempi2->ic_code==IC_IMM_I64) {
tempi2->ic_data(F64)=tempi2->ic_data;
tempi2->ic_class=cmp.internal_types[RT_F64];
tempi2->ic_code=IC_IMM_F64;
tempi2->ic_flags&=~ICF_R_TO_F64;
if (tmpc1->raw_type!=RT_F64)
tmpi1->ic_flags|=ICF_R_TO_F64;
if (tmpi2->ic_code==IC_IMM_I64) {
tmpi2->ic_data(F64)=tmpi2->ic_data;
tmpi2->ic_class=cmp.internal_types[RT_F64];
tmpi2->ic_code=IC_IMM_F64;
tmpi2->ic_flags&=~ICF_R_TO_F64;
} else
if (tempc2->raw_type!=RT_F64)
tempi2->ic_flags|=ICF_R_TO_F64;
if (IC_LESS<=tempi->ic_code<=IC_GREATER_EQU && (tempii=OptLead1(tempi)) &&
tempii->ic_code!=IC_PUSH_CMP && tempii->ic_code!=IC_AND_AND) {
if (tmpc2->raw_type!=RT_F64)
tmpi2->ic_flags|=ICF_R_TO_F64;
if (IC_LESS<=tmpi->ic_code<=IC_GREATER_EQU && (tmpii=OptLead1(tmpi)) &&
tmpii->ic_code!=IC_PUSH_CMP && tmpii->ic_code!=IC_AND_AND) {
//We are looking for float comparisons to zero to convert to int.
if (tempi1->ic_code==IC_IMM_F64 && !tempi1->ic_data &&
tempi2->ic_code==IC_DEREF && tempc2==cmp.internal_types[RT_F64]) {
tempi1->ic_code==IC_IMM_I64;
if (tmpi1->ic_code==IC_IMM_F64 && !tmpi1->ic_data &&
tmpi2->ic_code==IC_DEREF && tmpc2==cmp.internal_types[RT_F64]) {
tmpi1->ic_code==IC_IMM_I64;
goto fb_here1;
} else if (tempi2->ic_code==IC_IMM_F64 && !tempi2->ic_data &&
tempi1->ic_code==IC_DEREF && tempc1==cmp.internal_types[RT_F64]) {
tempi2->ic_code==IC_IMM_I64;
} else if (tmpi2->ic_code==IC_IMM_F64 && !tmpi2->ic_data &&
tmpi1->ic_code==IC_DEREF && tmpc1==cmp.internal_types[RT_F64]) {
tmpi2->ic_code==IC_IMM_I64;
fb_here1:
tempi1->ic_flags&=~ICF_R_TO_F64;
tempi->ic_class=tempi1->ic_class=tempi2->ic_class=
tmpi1->ic_flags&=~ICF_R_TO_F64;
tmpi->ic_class=tmpi1->ic_class=tmpi2->ic_class=
cmp.internal_types[RT_I64];
*is_unsigned=FALSE;
return FBO1_NOT_CONST;
@@ -158,399 +158,399 @@ fb_here1:
goto fb_here2;
} else {
fb_here2:
if (tempi1->ic_code==IC_IMM_F64 && tempi2->ic_code==IC_IMM_F64 &&
!(tempi->ic_flags&(ICF_PUSH_CMP|ICF_POP_CMP))) {
tempi->ic_flags|=tempi1->ic_flags|tempi2->ic_flags;
OptSetNOP1(tempi1);
OptSetNOP1(tempi2);
if (tmpi1->ic_code==IC_IMM_F64 && tmpi2->ic_code==IC_IMM_F64 &&
!(tmpi->ic_flags&(ICF_PUSH_CMP|ICF_POP_CMP))) {
tmpi->ic_flags|=tmpi1->ic_flags|tmpi2->ic_flags;
OptSetNOP1(tmpi1);
OptSetNOP1(tmpi2);
return FBO1_F64;
} else
return FBO1_NOT_CONST;
}
}
*is_unsigned=tempc1->raw_type&RTF_UNSIGNED || tempc2->raw_type&RTF_UNSIGNED;
if (tempi1->ic_code==IC_IMM_I64 && tempi2->ic_code==IC_IMM_I64 &&
!(tempi->ic_flags&(ICF_PUSH_CMP|ICF_POP_CMP))) {
tempi->ic_flags|=tempi1->ic_flags|tempi2->ic_flags;
OptSetNOP1(tempi1);
OptSetNOP1(tempi2);
*is_unsigned=tmpc1->raw_type&RTF_UNSIGNED || tmpc2->raw_type&RTF_UNSIGNED;
if (tmpi1->ic_code==IC_IMM_I64 && tmpi2->ic_code==IC_IMM_I64 &&
!(tmpi->ic_flags&(ICF_PUSH_CMP|ICF_POP_CMP))) {
tmpi->ic_flags|=tmpi1->ic_flags|tmpi2->ic_flags;
OptSetNOP1(tmpi1);
OptSetNOP1(tmpi2);
return FBO1_INT;
} else
return FBO1_NOT_CONST;
}
Bool OptFixupBinaryOp2(CIntermediateCode **tempi1,CIntermediateCode **tempi2)
Bool OptFixupBinaryOp2(CIntermediateCode **tmpi1,CIntermediateCode **tmpi2)
{
CIntermediateCode *tempii1=*tempi1,
*tempii2=*tempi2;
if (tempii1->ic_code==IC_IMM_I64 && !(tempii1->ic_flags & ICF_R_TO_F64))
CIntermediateCode *tmpii1=*tmpi1,
*tmpii2=*tmpi2;
if (tmpii1->ic_code==IC_IMM_I64 && !(tmpii1->ic_flags & ICF_R_TO_F64))
return TRUE;
if (tempii2->ic_code==IC_IMM_I64 && !(tempii2->ic_flags & ICF_R_TO_F64)) {
*tempi1=tempii2;
*tempi2=tempii1;
if (tmpii2->ic_code==IC_IMM_I64 && !(tmpii2->ic_flags & ICF_R_TO_F64)) {
*tmpi1=tmpii2;
*tmpi2=tmpii1;
return TRUE;
}
return FALSE;
}
Bool OptFixupUnaryOp(CIntermediateCode *tempi, CIntermediateCode *tempi1,
Bool OptFixupUnaryOp(CIntermediateCode *tmpi, CIntermediateCode *tmpi1,
Bool *is_unsigned)
{
CHashClass *tempc,*tempc1;
tempc1=OptClassFwd(tempi1->ic_class);
tempi->ic_class=tempc1;
tempc=tempi->ic_class;
if (tempc->raw_type==RT_F64) {
if (tempi1->ic_code==IC_IMM_I64) {
tempi1->ic_data(F64)=tempi1->ic_data;
tempi1->ic_class=cmp.internal_types[RT_F64];
tempi1->ic_code=IC_IMM_F64;
tempi1->ic_flags&=~ICF_R_TO_F64;
CHashClass *tmpc,*tmpc1;
tmpc1=OptClassFwd(tmpi1->ic_class);
tmpi->ic_class=tmpc1;
tmpc=tmpi->ic_class;
if (tmpc->raw_type==RT_F64) {
if (tmpi1->ic_code==IC_IMM_I64) {
tmpi1->ic_data(F64)=tmpi1->ic_data;
tmpi1->ic_class=cmp.internal_types[RT_F64];
tmpi1->ic_code=IC_IMM_F64;
tmpi1->ic_flags&=~ICF_R_TO_F64;
} else
if (tempc1->raw_type!=RT_F64)
tempi1->ic_flags|=ICF_R_TO_F64;
if (tempi1->ic_code==IC_IMM_F64) {
tempi->ic_flags|=tempi1->ic_flags;
OptSetNOP1(tempi1);
if (tmpc1->raw_type!=RT_F64)
tmpi1->ic_flags|=ICF_R_TO_F64;
if (tmpi1->ic_code==IC_IMM_F64) {
tmpi->ic_flags|=tmpi1->ic_flags;
OptSetNOP1(tmpi1);
return FBO1_F64;
} else
return FBO1_NOT_CONST;
}
*is_unsigned=tempc1->raw_type&RTF_UNSIGNED;
if (tempi1->ic_code==IC_IMM_I64) {
tempi->ic_flags|=tempi1->ic_flags;
OptSetNOP1(tempi1);
*is_unsigned=tmpc1->raw_type&RTF_UNSIGNED;
if (tmpi1->ic_code==IC_IMM_I64) {
tmpi->ic_flags|=tmpi1->ic_flags;
OptSetNOP1(tmpi1);
return FBO1_INT;
} else
return FBO1_NOT_CONST;
}
extern CIntermediateCode *OptBrNotZero(CCmpCtrl *cc,CIntermediateCode *tempi);
extern CIntermediateCode *OptBrNotZero(CCmpCtrl *cc,CIntermediateCode *tmpi);
CIntermediateCode *OptBrZero(CCmpCtrl *cc,CIntermediateCode *tempi)
CIntermediateCode *OptBrZero(CCmpCtrl *cc,CIntermediateCode *tmpi)
{
CCodeMisc *lb_true,*lb_false;
CIntermediateCode *tempii=OptLag(tempi),*tempii2;
switch (tempii->ic_code) {
CIntermediateCode *tmpii=OptLag(tmpi),*tmpii2;
switch (tmpii->ic_code) {
case IC_NOT:
tempi->ic_code=IC_BR_NOT_ZERO;
tempi->ic_class=tempii->ic_class;
tempi->ic_flags|=tempii->ic_flags;
tempi->t.a1c=tempii->t.a1c;
tempi->t.a1t=tempii->t.a1t;
OptFree(tempii);
return OptBrNotZero(cc,tempi);
tmpi->ic_code=IC_BR_NOT_ZERO;
tmpi->ic_class=tmpii->ic_class;
tmpi->ic_flags|=tmpii->ic_flags;
tmpi->t.a1c=tmpii->t.a1c;
tmpi->t.a1t=tmpii->t.a1t;
OptFree(tmpii);
return OptBrNotZero(cc,tmpi);
case IC_EQU_EQU...IC_LESS_EQU:
tempi->ic_code=(tempii->ic_code-IC_EQU_EQU)^1+IC_BR_EQU_EQU;
tmpi->ic_code=(tmpii->ic_code-IC_EQU_EQU)^1+IC_BR_EQU_EQU;
break;
case IC_OR_OR:
tempi->ic_code=IC_BR_OR_OR_ZERO;
tmpi->ic_code=IC_BR_OR_OR_ZERO;
break;
case IC_AND_AND:
tempi->ic_code=IC_BR_AND_AND_ZERO;
tmpi->ic_code=IC_BR_AND_AND_ZERO;
break;
case IC_AND:
tempi->ic_code=IC_BR_AND_ZERO;
tmpi->ic_code=IC_BR_AND_ZERO;
break;
case IC_MM_:
if (cc->pass==2 && !(tempii->ic_flags&ICF_R_TO_F64) &&
tempii->ic_class->raw_type!=RT_F64)
tempi->ic_code=IC_BR_MM_ZERO;
if (cc->pass==2 && !(tmpii->ic_flags&ICF_R_TO_F64) &&
tmpii->ic_class->raw_type!=RT_F64)
tmpi->ic_code=IC_BR_MM_ZERO;
break;
case IC_CALL_END:
tempii2=OptLag(tempii);
switch (tempii2->ic_code) {
tmpii2=OptLag(tmpii);
switch (tmpii2->ic_code) {
start:
case IC_CARRY:
tempii2->ic_code=IC_BR_NOT_CARRY;
tmpii2->ic_code=IC_BR_NOT_CARRY;
break;
case IC_BT:
tempii2->ic_code=IC_BR_NOT_BT;
tmpii2->ic_code=IC_BR_NOT_BT;
break;
case IC_LBTS:
tempii2->ic_flags|=ICF_LOCK;
tmpii2->ic_flags|=ICF_LOCK;
case IC_BTS:
tempii2->ic_code=IC_BR_NOT_BTS;
tmpii2->ic_code=IC_BR_NOT_BTS;
break;
case IC_LBTR:
tempii2->ic_flags|=ICF_LOCK;
tmpii2->ic_flags|=ICF_LOCK;
case IC_BTR:
tempii2->ic_code=IC_BR_NOT_BTR;
tmpii2->ic_code=IC_BR_NOT_BTR;
break;
case IC_LBTC:
tempii2->ic_flags|=ICF_LOCK;
tmpii2->ic_flags|=ICF_LOCK;
case IC_BTC:
tempii2->ic_code=IC_BR_NOT_BTC;
tmpii2->ic_code=IC_BR_NOT_BTC;
break;
end:
tempii2->ic_data=tempi->ic_data;
tempii->ic_code=IC_CALL_END2;
OptSetNOP1(tempi);
return tempii;
tmpii2->ic_data=tmpi->ic_data;
tmpii->ic_code=IC_CALL_END2;
OptSetNOP1(tmpi);
return tmpii;
}
break;
}
if (tempi->ic_code!=IC_BR_ZERO) {
tempi->ic_class=tempii->ic_class;
tempi->ic_flags|=tempii->ic_flags;
tempi->t.a1c=tempii->t.a1c;
tempi->t.a2c=tempii->t.a2c;
tempi->t.a1t=tempii->t.a1t;
tempi->t.a2t=tempii->t.a2t;
OptFree(tempii);
if (tmpi->ic_code!=IC_BR_ZERO) {
tmpi->ic_class=tmpii->ic_class;
tmpi->ic_flags|=tmpii->ic_flags;
tmpi->t.a1c=tmpii->t.a1c;
tmpi->t.a2c=tmpii->t.a2c;
tmpi->t.a1t=tmpii->t.a1t;
tmpi->t.a2t=tmpii->t.a2t;
OptFree(tmpii);
if (tempi->ic_flags&ICF_PUSH_CMP &&
IC_BR_NOT_EQU<=tempi->ic_code<=IC_BR_LESS_EQU &&
!(tempi->ic_flags&ICF_USE_F64)) {
tempi->ic_code+=IC_BR_EQU_EQU2-IC_BR_EQU_EQU;
tempi->ic_flags&=~ICF_PUSH_CMP;
tempii=tempi->next; //IC_PUSH_CMP inst
while (tempii->ic_code!=IC_PUSH_CMP)
tempii=tempii->next;
tempii->t.a1t=tempi;
OptSetNOP1(tempii);
if (tmpi->ic_flags&ICF_PUSH_CMP &&
IC_BR_NOT_EQU<=tmpi->ic_code<=IC_BR_LESS_EQU &&
!(tmpi->ic_flags&ICF_USE_F64)) {
tmpi->ic_code+=IC_BR_EQU_EQU2-IC_BR_EQU_EQU;
tmpi->ic_flags&=~ICF_PUSH_CMP;
tmpii=tmpi->next; //IC_PUSH_CMP inst
while (tmpii->ic_code!=IC_PUSH_CMP)
tmpii=tmpii->next;
tmpii->t.a1t=tmpi;
OptSetNOP1(tmpii);
}
lb_true=tempi->ic_data;
if (tempi->ic_code==IC_BR_AND_AND_ZERO) {
tempii=tempi->t.a1t->next;
tempii->ic_data=lb_true;
tempii->t.a1t=tempi->t.a1t;
tempii->t.a1c=tempi->t.a1c;
tempii->ic_code=IC_BR_ZERO;
OptBrZero(cc,tempii);
tempii=tempi->t.a2t->next;
tempii->t.a1t=tempi->t.a2t;
tempii->t.a1c=tempi->t.a2c;
tempii->ic_data=lb_true;
tempii->ic_code=IC_BR_ZERO;
tempii=OptBrZero(cc,tempii);
OptSetNOP1(tempi);
} else if (tempi->ic_code==IC_BR_OR_OR_ZERO) {
lb_true=tmpi->ic_data;
if (tmpi->ic_code==IC_BR_AND_AND_ZERO) {
tmpii=tmpi->t.a1t->next;
tmpii->ic_data=lb_true;
tmpii->t.a1t=tmpi->t.a1t;
tmpii->t.a1c=tmpi->t.a1c;
tmpii->ic_code=IC_BR_ZERO;
OptBrZero(cc,tmpii);
tmpii=tmpi->t.a2t->next;
tmpii->t.a1t=tmpi->t.a2t;
tmpii->t.a1c=tmpi->t.a2c;
tmpii->ic_data=lb_true;
tmpii->ic_code=IC_BR_ZERO;
tmpii=OptBrZero(cc,tmpii);
OptSetNOP1(tmpi);
} else if (tmpi->ic_code==IC_BR_OR_OR_ZERO) {
lb_false=COCMiscNew(cc,CMT_LABEL);
tempi->ic_code=IC_LABEL;
tempi->ic_flags=0;
tempi->ic_data=lb_false;
tempii=tempi->t.a1t->next;
tempii->t.a1t=tempi->t.a1t;
tempii->t.a1c=tempi->t.a1c;
tempii->ic_data=lb_false;
tempii->ic_code=IC_BR_NOT_ZERO;
OptBrNotZero(cc,tempii);
tempii=tempi->t.a2t->next;
tempii->t.a1t=tempi->t.a2t;
tempii->t.a1c=tempi->t.a2c;
tempii->ic_data=lb_true;
tempii->ic_code=IC_BR_ZERO;
tempii=OptBrZero(cc,tempii);
tmpi->ic_code=IC_LABEL;
tmpi->ic_flags=0;
tmpi->ic_data=lb_false;
tmpii=tmpi->t.a1t->next;
tmpii->t.a1t=tmpi->t.a1t;
tmpii->t.a1c=tmpi->t.a1c;
tmpii->ic_data=lb_false;
tmpii->ic_code=IC_BR_NOT_ZERO;
OptBrNotZero(cc,tmpii);
tmpii=tmpi->t.a2t->next;
tmpii->t.a1t=tmpi->t.a2t;
tmpii->t.a1c=tmpi->t.a2c;
tmpii->ic_data=lb_true;
tmpii->ic_code=IC_BR_ZERO;
tmpii=OptBrZero(cc,tmpii);
} else
tempii=tempi;
if (tempi->ic_flags&ICF_POP_CMP && tempi->t.a1t->ic_code==IC_NOP1) {
tempi->t.a1t=tempi->t.a1t->t.a1t;
tempi->ic_flags&=~ICF_POP_CMP;
tmpii=tmpi;
if (tmpi->ic_flags&ICF_POP_CMP && tmpi->t.a1t->ic_code==IC_NOP1) {
tmpi->t.a1t=tmpi->t.a1t->t.a1t;
tmpi->ic_flags&=~ICF_POP_CMP;
}
return tempii;
return tmpii;
}
return tempi;
return tmpi;
}
CIntermediateCode *OptBrNotZero(CCmpCtrl *cc,CIntermediateCode *tempi)
CIntermediateCode *OptBrNotZero(CCmpCtrl *cc,CIntermediateCode *tmpi)
{
CCodeMisc *lb_true,*lb_false;
CIntermediateCode *tempii=OptLag(tempi),*tempii2;
switch (tempii->ic_code) {
CIntermediateCode *tmpii=OptLag(tmpi),*tmpii2;
switch (tmpii->ic_code) {
case IC_NOT:
tempi->ic_code=IC_BR_ZERO;
tempi->ic_class=tempii->ic_class;
tempi->ic_flags|=tempii->ic_flags;
tempi->t.a1c=tempii->t.a1c;
tempi->t.a1t=tempii->t.a1t;
OptFree(tempii);
return OptBrZero(cc,tempi);
tmpi->ic_code=IC_BR_ZERO;
tmpi->ic_class=tmpii->ic_class;
tmpi->ic_flags|=tmpii->ic_flags;
tmpi->t.a1c=tmpii->t.a1c;
tmpi->t.a1t=tmpii->t.a1t;
OptFree(tmpii);
return OptBrZero(cc,tmpi);
case IC_EQU_EQU...IC_LESS_EQU:
tempi->ic_code=tempii->ic_code+IC_BR_EQU_EQU-IC_EQU_EQU;
tmpi->ic_code=tmpii->ic_code+IC_BR_EQU_EQU-IC_EQU_EQU;
break;
case IC_OR_OR:
tempi->ic_code=IC_BR_OR_OR_NOT_ZERO;
tmpi->ic_code=IC_BR_OR_OR_NOT_ZERO;
break;
case IC_AND_AND:
tempi->ic_code=IC_BR_AND_AND_NOT_ZERO;
tmpi->ic_code=IC_BR_AND_AND_NOT_ZERO;
break;
case IC_AND:
tempi->ic_code=IC_BR_AND_NOT_ZERO;
tmpi->ic_code=IC_BR_AND_NOT_ZERO;
break;
case IC_MM_:
if (cc->pass==2 && !(tempii->ic_flags&ICF_R_TO_F64) &&
tempii->ic_class->raw_type!=RT_F64)
tempi->ic_code=IC_BR_MM_NOT_ZERO;
if (cc->pass==2 && !(tmpii->ic_flags&ICF_R_TO_F64) &&
tmpii->ic_class->raw_type!=RT_F64)
tmpi->ic_code=IC_BR_MM_NOT_ZERO;
break;
case IC_CALL_END:
tempii2=OptLag(tempii);
switch (tempii2->ic_code) {
tmpii2=OptLag(tmpii);
switch (tmpii2->ic_code) {
start:
case IC_CARRY:
tempii2->ic_code=IC_BR_CARRY;
tmpii2->ic_code=IC_BR_CARRY;
break;
case IC_BT:
tempii2->ic_code=IC_BR_BT;
tmpii2->ic_code=IC_BR_BT;
break;
case IC_LBTS:
tempii2->ic_flags|=ICF_LOCK;
tmpii2->ic_flags|=ICF_LOCK;
case IC_BTS:
tempii2->ic_code=IC_BR_BTS;
tmpii2->ic_code=IC_BR_BTS;
break;
case IC_LBTR:
tempii2->ic_flags|=ICF_LOCK;
tmpii2->ic_flags|=ICF_LOCK;
case IC_BTR:
tempii2->ic_code=IC_BR_BTR;
tmpii2->ic_code=IC_BR_BTR;
break;
case IC_LBTC:
tempii2->ic_flags|=ICF_LOCK;
tmpii2->ic_flags|=ICF_LOCK;
case IC_BTC:
tempii2->ic_code=IC_BR_BTC;
tmpii2->ic_code=IC_BR_BTC;
break;
end:
tempii2->ic_data=tempi->ic_data;
tempii->ic_code=IC_CALL_END2;
OptSetNOP1(tempi);
return tempii;
tmpii2->ic_data=tmpi->ic_data;
tmpii->ic_code=IC_CALL_END2;
OptSetNOP1(tmpi);
return tmpii;
}
break;
}
if (tempi->ic_code!=IC_BR_NOT_ZERO) {
tempi->ic_class=tempii->ic_class;
tempi->ic_flags|=tempii->ic_flags;
tempi->t.a1c=tempii->t.a1c;
tempi->t.a2c=tempii->t.a2c;
tempi->t.a1t=tempii->t.a1t;
tempi->t.a2t=tempii->t.a2t;
OptFree(tempii);
if (tmpi->ic_code!=IC_BR_NOT_ZERO) {
tmpi->ic_class=tmpii->ic_class;
tmpi->ic_flags|=tmpii->ic_flags;
tmpi->t.a1c=tmpii->t.a1c;
tmpi->t.a2c=tmpii->t.a2c;
tmpi->t.a1t=tmpii->t.a1t;
tmpi->t.a2t=tmpii->t.a2t;
OptFree(tmpii);
if (tempi->ic_flags&ICF_PUSH_CMP &&
IC_BR_NOT_EQU<=tempi->ic_code<=IC_BR_LESS_EQU &&
!(tempi->ic_flags&ICF_USE_F64)) {
tempi->ic_code+=IC_BR_EQU_EQU2-IC_BR_EQU_EQU;
tempi->ic_flags&=~ICF_PUSH_CMP;
tempii=tempi->next; //IC_PUSH_CMP inst
while (tempii->ic_code!=IC_PUSH_CMP)
tempii=tempii->next;
tempii->t.a1t=tempi;
OptSetNOP1(tempii);
if (tmpi->ic_flags&ICF_PUSH_CMP &&
IC_BR_NOT_EQU<=tmpi->ic_code<=IC_BR_LESS_EQU &&
!(tmpi->ic_flags&ICF_USE_F64)) {
tmpi->ic_code+=IC_BR_EQU_EQU2-IC_BR_EQU_EQU;
tmpi->ic_flags&=~ICF_PUSH_CMP;
tmpii=tmpi->next; //IC_PUSH_CMP inst
while (tmpii->ic_code!=IC_PUSH_CMP)
tmpii=tmpii->next;
tmpii->t.a1t=tmpi;
OptSetNOP1(tmpii);
}
lb_true=tempi->ic_data;
if (tempi->ic_code==IC_BR_OR_OR_NOT_ZERO) {
tempii=tempi->t.a1t->next;
tempii->t.a1t=tempi->t.a1t;
tempii->t.a1c=tempi->t.a1c;
tempii->ic_data=lb_true;
tempii->ic_code=IC_BR_NOT_ZERO;
OptBrNotZero(cc,tempii);
tempii=tempi->t.a2t->next;
tempii->t.a1t=tempi->t.a2t;
tempii->t.a1c=tempi->t.a2c;
tempii->ic_data=lb_true;
tempii->ic_code=IC_BR_NOT_ZERO;
tempii=OptBrNotZero(cc,tempii);
OptSetNOP1(tempi);
} else if (tempi->ic_code==IC_BR_AND_AND_NOT_ZERO) {
lb_true=tmpi->ic_data;
if (tmpi->ic_code==IC_BR_OR_OR_NOT_ZERO) {
tmpii=tmpi->t.a1t->next;
tmpii->t.a1t=tmpi->t.a1t;
tmpii->t.a1c=tmpi->t.a1c;
tmpii->ic_data=lb_true;
tmpii->ic_code=IC_BR_NOT_ZERO;
OptBrNotZero(cc,tmpii);
tmpii=tmpi->t.a2t->next;
tmpii->t.a1t=tmpi->t.a2t;
tmpii->t.a1c=tmpi->t.a2c;
tmpii->ic_data=lb_true;
tmpii->ic_code=IC_BR_NOT_ZERO;
tmpii=OptBrNotZero(cc,tmpii);
OptSetNOP1(tmpi);
} else if (tmpi->ic_code==IC_BR_AND_AND_NOT_ZERO) {
lb_false=COCMiscNew(cc,CMT_LABEL);
tempi->ic_code=IC_LABEL;
tempi->ic_flags=0;
tempi->ic_data=lb_false;
tempii=tempi->t.a1t->next;
tempii->t.a1t=tempi->t.a1t;
tempii->t.a1c=tempi->t.a1c;
tempii->ic_data=lb_false;
tempii->ic_code=IC_BR_ZERO;
OptBrZero(cc,tempii);
tempii=tempi->t.a2t->next;
tempii->t.a1t=tempi->t.a2t;
tempii->t.a1c=tempi->t.a2c;
tempii->ic_data=lb_true;
tempii->ic_code=IC_BR_NOT_ZERO;
tempii=OptBrNotZero(cc,tempii);
tmpi->ic_code=IC_LABEL;
tmpi->ic_flags=0;
tmpi->ic_data=lb_false;
tmpii=tmpi->t.a1t->next;
tmpii->t.a1t=tmpi->t.a1t;
tmpii->t.a1c=tmpi->t.a1c;
tmpii->ic_data=lb_false;
tmpii->ic_code=IC_BR_ZERO;
OptBrZero(cc,tmpii);
tmpii=tmpi->t.a2t->next;
tmpii->t.a1t=tmpi->t.a2t;
tmpii->t.a1c=tmpi->t.a2c;
tmpii->ic_data=lb_true;
tmpii->ic_code=IC_BR_NOT_ZERO;
tmpii=OptBrNotZero(cc,tmpii);
} else
tempii=tempi;
if (tempi->ic_flags&ICF_POP_CMP && tempi->t.a1t->ic_code==IC_NOP1) {
tempi->t.a1t=tempi->t.a1t->t.a1t;
tempi->ic_flags&=~ICF_POP_CMP;
tmpii=tmpi;
if (tmpi->ic_flags&ICF_POP_CMP && tmpi->t.a1t->ic_code==IC_NOP1) {
tmpi->t.a1t=tmpi->t.a1t->t.a1t;
tmpi->ic_flags&=~ICF_POP_CMP;
}
return tempii;
return tmpii;
}
return tempi;
return tmpi;
}
U0 OptFixSizeOf(CIntermediateCode *tempi1,
CIntermediateCode *tempi_push,CHashClass *tempcc)
U0 OptFixSizeOf(CIntermediateCode *tmpi1,
CIntermediateCode *tmpi_push,CHashClass *tmpcc)
{
if (tempi1->ic_code==IC_MUL && tempi1->t.a2t->ic_code==IC_SIZEOF) {
tempi1->t.a2t->ic_code=IC_IMM_I64;
tempi1->t.a2t->ic_class=tempcc;
tempi_push->ic_class=tempcc;
if (tempcc->ptr_stars_cnt) {
tempcc--;
if (tempcc->size==1)
if (tmpi1->ic_code==IC_MUL && tmpi1->t.a2t->ic_code==IC_SIZEOF) {
tmpi1->t.a2t->ic_code=IC_IMM_I64;
tmpi1->t.a2t->ic_class=tmpcc;
tmpi_push->ic_class=tmpcc;
if (tmpcc->ptr_stars_cnt) {
tmpcc--;
if (tmpcc->size==1)
goto here;
tempi1->t.a2t->ic_data=tempcc->size;
tmpi1->t.a2t->ic_data=tmpcc->size;
} else {
here:
if (tempi_push==tempi1)
tempi1->t.a2t->ic_data=1;
if (tmpi_push==tmpi1)
tmpi1->t.a2t->ic_data=1;
else {
OptSetNOP1(tempi1->t.a2t);
OptSetNOP1(tempi1);
OptSetNOP1(tmpi1->t.a2t);
OptSetNOP1(tmpi1);
}
}
}
}
I64 CmpRawType(CHashClass *tempc)
I64 CmpRawType(CHashClass *tmpc)
{
if (tempc) {
tempc=OptClassFwd(tempc);
return tempc->raw_type;
if (tmpc) {
tmpc=OptClassFwd(tmpc);
return tmpc->raw_type;
}
return 0;
}
I64 CmpRawTypePointed(CHashClass *tempc)
I64 CmpRawTypePointed(CHashClass *tmpc)
{
if (tempc) {
if (tempc->ptr_stars_cnt)
tempc--;
tempc=OptClassFwd(tempc);
return tempc->raw_type;
if (tmpc) {
if (tmpc->ptr_stars_cnt)
tmpc--;
tmpc=OptClassFwd(tmpc);
return tmpc->raw_type;
}
return 0;
}
U0 CmpMinTypePointed(CIntermediateCode *tempi,I64 pt1)
U0 CmpMinTypePointed(CIntermediateCode *tmpi,I64 pt1)
{
I64 pt;
if ((pt=tempi->a1_type_pointed_to) && pt!=RT_F64 && 0<pt1<pt)
tempi->a1_type_pointed_to=pt;
if ((pt=tmpi->a1_type_pointed_to) && pt!=RT_F64 && 0<pt1<pt)
tmpi->a1_type_pointed_to=pt;
}
U0 CmpF1PushPop(CIntermediateCode *tempi,CIntermediateCode *tempi2)
U0 CmpF1PushPop(CIntermediateCode *tmpi,CIntermediateCode *tmpi2)
{
if (intermediate_code_table[tempi2->ic_code].fpop||
tempi2->ic_flags&ICF_R_TO_F64)
Bts(&tempi->ic_flags,ICf_DONT_PUSH_FLOAT0);
if (intermediate_code_table[tmpi2->ic_code].fpop||
tmpi2->ic_flags&ICF_R_TO_F64)
Bts(&tmpi->ic_flags,ICf_DONT_PUSH_FLOAT0);
}
U0 CmpF2PushPop(CIntermediateCode *tempi,
CIntermediateCode *tempi1,CIntermediateCode *tempi2)
U0 CmpF2PushPop(CIntermediateCode *tmpi,
CIntermediateCode *tmpi1,CIntermediateCode *tmpi2)
{
if ((tempi2->ic_code==IC_MOV || tempi2->ic_code==IC_IMM_F64) &&
!(tempi2->ic_flags&ICF_R_TO_F64) &&
(intermediate_code_table[tempi1->ic_code].fpop ||
tempi1->ic_flags&ICF_R_TO_F64))
Bts(&tempi->ic_flags,ICf_DONT_PUSH_FLOAT0);
else if ((intermediate_code_table[tempi2->ic_code].fpop ||
tempi2->ic_flags&ICF_R_TO_F64)&&
!(tempi1->ic_flags&ICF_R_TO_F64))
Bts(&tempi->ic_flags,ICf_DONT_PUSH_FLOAT0);
if ((tmpi2->ic_code==IC_MOV || tmpi2->ic_code==IC_IMM_F64) &&
!(tmpi2->ic_flags&ICF_R_TO_F64) &&
(intermediate_code_table[tmpi1->ic_code].fpop ||
tmpi1->ic_flags&ICF_R_TO_F64))
Bts(&tmpi->ic_flags,ICf_DONT_PUSH_FLOAT0);
else if ((intermediate_code_table[tmpi2->ic_code].fpop ||
tmpi2->ic_flags&ICF_R_TO_F64)&&
!(tmpi1->ic_flags&ICF_R_TO_F64))
Bts(&tmpi->ic_flags,ICf_DONT_PUSH_FLOAT0);
}
class COptMemberVar
+721 -721
View File
File diff suppressed because it is too large. Load diff
+227 -227
View File
@@ -1,14 +1,14 @@
U0 OptPass3(CCmpCtrl *cc,COptReg *reg_offsets)
{
CHashClass *tempc,*tempc1,*tempc2;
CHashClass *tmpc,*tmpc1,*tmpc2;
CCodeMisc *lb;
CIntermediateCode *tempi,*tempi1,*tempi2,*tempi_next,
*tempil1,*tempil2;
CIntermediateCode *tmpi,*tmpi1,*tmpi2,*tmpi_next,
*tmpil1,*tmpil2;
I64 code,i,j,l,member_cnt,used_reg_mask=0;
CMemberLst *tempm;
CMemberLst *tmpm;
COptMemberVar *mv=NULL;
CAOT *tempaot;
CAOTImportExport *tempie;
CAOT *tmpaot;
CAOTImportExport *tmpie;
CPrsStk *ps=cc->ps;
ps->ptr=0;
ps->ptr2=0;
@@ -23,126 +23,126 @@ U0 OptPass3(CCmpCtrl *cc,COptReg *reg_offsets)
member_cnt+=2;
mv=CAlloc(member_cnt*sizeof(COptMemberVar));
member_cnt=0;
tempm=cc->htc.fun->member_lst_and_root;
while (tempm) {
tempc=OptClassFwd(tempm->member_class);
if (0<=tempm->reg<NUM_REGS) {
if (Bts(&used_reg_mask,tempm->reg))
tmpm=cc->htc.fun->member_lst_and_root;
while (tmpm) {
tmpc=OptClassFwd(tmpm->member_class);
if (0<=tmpm->reg<NUM_REGS) {
if (Bts(&used_reg_mask,tmpm->reg))
PrintWarn("Reg in use\n $$LK,\"FL:%s,%d\"$$ '%s' in '%s'\n",
cc->lex_include_stk->full_name,
cc->lex_include_stk->line_num,tempm->str,cc->htc.fun->str);
reg_offsets[tempm->reg].offset=tempm->offset;
reg_offsets[tempm->reg].m=tempm;
} else if (tempc->raw_type!=RT_F64 && tempm->reg!=REG_NONE ||
tempm->reg==REG_ALLOC) {
if (tempm->reg==REG_ALLOC)
cc->lex_include_stk->line_num,tmpm->str,cc->htc.fun->str);
reg_offsets[tmpm->reg].offset=tmpm->offset;
reg_offsets[tmpm->reg].m=tmpm;
} else if (tmpc->raw_type!=RT_F64 && tmpm->reg!=REG_NONE ||
tmpm->reg==REG_ALLOC) {
if (tmpm->reg==REG_ALLOC)
mv[member_cnt].score=MAX_I64/2; //big but not too big
mv[member_cnt].offset_start=tempm->offset;
mv[member_cnt].offset_end=tempm->offset+MaxI64(1,tempm->size);
mv[member_cnt++].m=tempm;
} else if (tempm->reg==REG_ALLOC)
mv[member_cnt].offset_start=tmpm->offset;
mv[member_cnt].offset_end=tmpm->offset+MaxI64(1,tmpm->size);
mv[member_cnt++].m=tmpm;
} else if (tmpm->reg==REG_ALLOC)
PrintWarn("Can't reg var\n $$LK,\"FL:%s,%d\"$$ '%s' in '%s'\n",
cc->lex_include_stk->full_name,
cc->lex_include_stk->line_num,tempm->str,cc->htc.fun->str);
tempm=tempm->next;
cc->lex_include_stk->line_num,tmpm->str,cc->htc.fun->str);
tmpm=tmpm->next;
}
} else
member_cnt=0;
tempi=cc->coc.coc_head.next;
while (code=tempi->ic_code) {
tempi_next=tempi->next;
tmpi=cc->coc.coc_head.next;
while (code=tmpi->ic_code) {
tmpi_next=tmpi->next;
if (code==IC_NOP1)
OptFree(tempi);
OptFree(tmpi);
else {
if (tempil1=OptLag(tempi)) {
if (!(tempil2=OptLag(tempil1)))
tempil2=&cmp.ic_nop;
if (tmpil1=OptLag(tmpi)) {
if (!(tmpil2=OptLag(tmpil1)))
tmpil2=&cmp.ic_nop;
} else
tempil1=tempil2=&cmp.ic_nop;
tempc=tempi->ic_class;
tmpil1=tmpil2=&cmp.ic_nop;
tmpc=tmpi->ic_class;
switch [intermediate_code_table[code].arg_cnt] {
case IS_V_ARG:
ps->ptr-=tempi->ic_data>>3;
ps->ptr-=tmpi->ic_data>>3;
break;
case IS_2_ARG:
tempi2=PrsPop(ps);
if (tempi2->ic_flags&ICF_R_TO_F64)
tempc2=cmp.internal_types[RT_F64];
else if (tempi2->ic_flags & ICF_R_TO_INT)
tempc2=cmp.internal_types[RT_I64];
tmpi2=PrsPop(ps);
if (tmpi2->ic_flags&ICF_R_TO_F64)
tmpc2=cmp.internal_types[RT_F64];
else if (tmpi2->ic_flags & ICF_R_TO_INT)
tmpc2=cmp.internal_types[RT_I64];
else
tempc2=tempi->t.a2c;
tempi->a2.type=MDF_STK+CmpRawType(tempc2);
tempi->ic_flags|=ICF_A2_WAS_STK;
tmpc2=tmpi->t.a2c;
tmpi->a2.type=MDF_STK+CmpRawType(tmpc2);
tmpi->ic_flags|=ICF_A2_WAS_STK;
case IS_1_ARG:
tempi1=PrsPop(ps);
if (tempi1->ic_flags&ICF_R_TO_F64)
tempc1=cmp.internal_types[RT_F64];
else if (tempi1->ic_flags & ICF_R_TO_INT)
tempc1=cmp.internal_types[RT_I64];
tmpi1=PrsPop(ps);
if (tmpi1->ic_flags&ICF_R_TO_F64)
tmpc1=cmp.internal_types[RT_F64];
else if (tmpi1->ic_flags & ICF_R_TO_INT)
tmpc1=cmp.internal_types[RT_I64];
else
tempc1=tempi->t.a1c;
tempi->a1.type=MDF_STK+CmpRawType(tempc1);
tempi->a1_type_pointed_to=CmpRawTypePointed(tempc1);
tempi->ic_flags|=ICF_A1_WAS_STK;
tmpc1=tmpi->t.a1c;
tmpi->a1.type=MDF_STK+CmpRawType(tmpc1);
tmpi->a1_type_pointed_to=CmpRawTypePointed(tmpc1);
tmpi->ic_flags|=ICF_A1_WAS_STK;
break;
case IS_0_ARG: //nobound switch
break;
}
if (intermediate_code_table[code].res_cnt) {
tempi->r.type=MDF_STK+CmpRawType(tempc);
tempi->ic_flags|=ICF_R_WAS_STK;
PrsPush(ps,tempi);
tmpi->r.type=MDF_STK+CmpRawType(tmpc);
tmpi->ic_flags|=ICF_R_WAS_STK;
PrsPush(ps,tmpi);
}
switch [code] {
case IC_IMM_F64:
tempi->ic_flags&=~ICF_R_TO_F64;
if (tempi->ic_flags&ICF_R_TO_INT) {
tempi->ic_data=ToI64(tempi->ic_data(F64));
tempi->ic_flags&=~ICF_R_TO_INT;
tempi->ic_code=IC_IMM_I64;
tmpi->ic_flags&=~ICF_R_TO_F64;
if (tmpi->ic_flags&ICF_R_TO_INT) {
tmpi->ic_data=ToI64(tmpi->ic_data(F64));
tmpi->ic_flags&=~ICF_R_TO_INT;
tmpi->ic_code=IC_IMM_I64;
}
break;
case IC_IMM_I64:
tempi->ic_flags&=~ICF_R_TO_INT;
if (tempi->ic_flags&ICF_R_TO_F64) {
tempi->ic_data(F64)=ToF64(tempi->ic_data);
tempi->ic_flags&=~ICF_R_TO_F64;
tempi->ic_code=IC_IMM_F64;
tmpi->ic_flags&=~ICF_R_TO_INT;
if (tmpi->ic_flags&ICF_R_TO_F64) {
tmpi->ic_data(F64)=ToF64(tmpi->ic_data);
tmpi->ic_flags&=~ICF_R_TO_F64;
tmpi->ic_code=IC_IMM_F64;
}
break;
case IC_RBP:
tempi->ic_code=IC_REG;
tempi->a1.reg=REG_RBP;
tmpi->ic_code=IC_REG;
tmpi->a1.reg=REG_RBP;
break;
case IC_DEREF:
tempi->a1_type_pointed_to=tempi->r.type.raw_type;
if (tempi1->ic_code==IC_LEA) {
tempi->ic_flags|=tempi1->ic_flags;
tempi->a1.reg=tempi1->a1.reg;
tempi->a1.disp=tempi1->a1.disp;
tempi->a1.type=MDF_DISP+tempi->r.type.raw_type;
tempi->a1_type_pointed_to=CmpRawTypePointed(tempc);
tempi->ic_code=IC_MOV;
OptFree(tempi1);
if (tempi->a1.reg==REG_RBP)
tmpi->a1_type_pointed_to=tmpi->r.type.raw_type;
if (tmpi1->ic_code==IC_LEA) {
tmpi->ic_flags|=tmpi1->ic_flags;
tmpi->a1.reg=tmpi1->a1.reg;
tmpi->a1.disp=tmpi1->a1.disp;
tmpi->a1.type=MDF_DISP+tmpi->r.type.raw_type;
tmpi->a1_type_pointed_to=CmpRawTypePointed(tmpc);
tmpi->ic_code=IC_MOV;
OptFree(tmpi1);
if (tmpi->a1.reg==REG_RBP)
for (i=0;i<member_cnt;i++)
if (mv[i].offset_start==tempi->a1.disp) {
if (mv[i].offset_start==tmpi->a1.disp) {
mv[i].lea_balance--;
mv[i].score++;
break;
}
} else if (tempil1->ic_code==IC_ADD_CONST) {
if (tempil2->ic_code==IC_REG) {
tempi->ic_flags|=tempil2->ic_flags|tempil1->ic_flags;
tempi->a1.reg=tempil2->a1.reg;
tempi->a1.disp=tempi->ic_data;
tempi->a1.type=MDF_DISP+tempi->r.type.raw_type;
tempi->a1_type_pointed_to=CmpRawTypePointed(tempc);
tempi->ic_code=IC_MOV;
OptFree(tempil2);
OptFree(tempil1);
} else if (tmpil1->ic_code==IC_ADD_CONST) {
if (tmpil2->ic_code==IC_REG) {
tmpi->ic_flags|=tmpil2->ic_flags|tmpil1->ic_flags;
tmpi->a1.reg=tmpil2->a1.reg;
tmpi->a1.disp=tmpi->ic_data;
tmpi->a1.type=MDF_DISP+tmpi->r.type.raw_type;
tmpi->a1_type_pointed_to=CmpRawTypePointed(tmpc);
tmpi->ic_code=IC_MOV;
OptFree(tmpil2);
OptFree(tmpil1);
}
}
break;
@@ -150,82 +150,82 @@ U0 OptPass3(CCmpCtrl *cc,COptReg *reg_offsets)
case IC__MM:
case IC_PP_:
case IC_MM_:
CmpMinTypePointed(tempi,CmpRawTypePointed(tempi->t.a1c));
CmpMinTypePointed(tmpi,CmpRawTypePointed(tmpi->t.a1c));
case IC_DEREF_PP:
case IC_DEREF_MM:
if (tempi1->ic_code==IC_LEA && tempi1->a1.type&MDF_DISP &&
tempi1->a1.reg==REG_RBP)
if (tmpi1->ic_code==IC_LEA && tmpi1->a1.type&MDF_DISP &&
tmpi1->a1.reg==REG_RBP)
for (i=0;i<member_cnt;i++)
if (mv[i].offset_start==tempi1->a1.disp) {
if (mv[i].offset_start==tmpi1->a1.disp) {
mv[i].lea_balance--;
mv[i].score++;
break;
}
tempi->a1_type_pointed_to=tempi->r.type.raw_type;
tmpi->a1_type_pointed_to=tmpi->r.type.raw_type;
break;
case IC_MUL:
case IC_DIV:
if (tempc->raw_type==RT_F64) {
CmpF2PushPop(tempi,tempi1,tempi2);
if (tmpc->raw_type==RT_F64) {
CmpF2PushPop(tmpi,tmpi1,tmpi2);
break;
}
break;
case IC_ADD:
if (tempc->raw_type==RT_F64) {
CmpF2PushPop(tempi,tempi1,tempi2);
if (tmpc->raw_type==RT_F64) {
CmpF2PushPop(tmpi,tmpi1,tmpi2);
break;
}
if (OptFixupBinaryOp2(&tempi1,&tempi2)) {
tempi->ic_flags|=tempi1->ic_flags;
if (tempi->t.a1t!=tempi2)
tempi->t.a1c=tempi->t.a2c;
tempi->ic_data=tempi1->ic_data;
tempi->ic_code=IC_ADD_CONST;
tempi->a1_type_pointed_to=tempi->r.type.raw_type;
tempi->a2.type=MDF_NULL;
OptFree(tempi1);
if (tempil2->ic_code==IC_REG && tempil2->a1.reg==REG_RBP) {
tempi->ic_flags|=tempil2->ic_flags;
tempi->ic_code=IC_LEA;
tempi->a1.reg=REG_RBP;
tempi->a1.type=MDF_DISP+tempi->a1.type.raw_type;
tempi->a1.disp=tempi->ic_data;
if (OptFixupBinaryOp2(&tmpi1,&tmpi2)) {
tmpi->ic_flags|=tmpi1->ic_flags;
if (tmpi->t.a1t!=tmpi2)
tmpi->t.a1c=tmpi->t.a2c;
tmpi->ic_data=tmpi1->ic_data;
tmpi->ic_code=IC_ADD_CONST;
tmpi->a1_type_pointed_to=tmpi->r.type.raw_type;
tmpi->a2.type=MDF_NULL;
OptFree(tmpi1);
if (tmpil2->ic_code==IC_REG && tmpil2->a1.reg==REG_RBP) {
tmpi->ic_flags|=tmpil2->ic_flags;
tmpi->ic_code=IC_LEA;
tmpi->a1.reg=REG_RBP;
tmpi->a1.type=MDF_DISP+tmpi->a1.type.raw_type;
tmpi->a1.disp=tmpi->ic_data;
for (i=0;i<member_cnt;i++)
if (mv[i].offset_start<=tempi->ic_data<mv[i].offset_end) {
if (mv[i].offset_start<=tmpi->ic_data<mv[i].offset_end) {
mv[i].lea_balance++;
mv[i].score++;
break;
}
OptFree(tempil2);
OptFree(tmpil2);
}
}
break;
case IC_SUB:
if (tempc->raw_type==RT_F64) {
CmpF2PushPop(tempi,tempi1,tempi2);
if (tmpc->raw_type==RT_F64) {
CmpF2PushPop(tmpi,tmpi1,tmpi2);
break;
}
if (tempi2->ic_code==IC_IMM_I64) {
tempi->ic_flags|=tempi2->ic_flags;
tempi->ic_data=tempi2->ic_data;
tempi->ic_code=IC_SUB_CONST;
tempi->a2.type=MDF_NULL;
OptFree(tempi2);
if (tmpi2->ic_code==IC_IMM_I64) {
tmpi->ic_flags|=tmpi2->ic_flags;
tmpi->ic_data=tmpi2->ic_data;
tmpi->ic_code=IC_SUB_CONST;
tmpi->a2.type=MDF_NULL;
OptFree(tmpi2);
}
break;
case IC_LESS:
case IC_GREATER_EQU:
case IC_GREATER:
case IC_LESS_EQU:
if (tempi->ic_flags&ICF_USE_F64)
CmpF2PushPop(tempi,tempi1,tempi2);
if (tmpi->ic_flags&ICF_USE_F64)
CmpF2PushPop(tmpi,tmpi1,tmpi2);
break;
case IC_MUL_EQU:
case IC_DIV_EQU:
case IC_ADD_EQU:
case IC_SUB_EQU:
if (tempc->raw_type==RT_F64)
CmpF1PushPop(tempi,tempi2);
if (tmpc->raw_type==RT_F64)
CmpF1PushPop(tmpi,tmpi2);
case IC_ASSIGN_PP:
case IC_ASSIGN_MM:
case IC_ASSIGN:
@@ -235,25 +235,25 @@ U0 OptPass3(CCmpCtrl *cc,COptReg *reg_offsets)
case IC_AND_EQU:
case IC_OR_EQU:
case IC_XOR_EQU:
if (tempi1->ic_code==IC_LEA && tempi1->a1.type&MDF_DISP &&
tempi1->a1.reg==REG_RBP)
if (tmpi1->ic_code==IC_LEA && tmpi1->a1.type&MDF_DISP &&
tmpi1->a1.reg==REG_RBP)
for (i=0;i<member_cnt;i++)
if (mv[i].offset_start==tempi1->a1.disp) {
if (mv[i].offset_start==tmpi1->a1.disp) {
mv[i].lea_balance--;
mv[i].score++;
break;
}
tempi->a1_type_pointed_to=tempi->r.type.raw_type;
CmpMinTypePointed(tempi,CmpRawTypePointed(tempi->t.a1c));
tmpi->a1_type_pointed_to=tmpi->r.type.raw_type;
CmpMinTypePointed(tmpi,CmpRawTypePointed(tmpi->t.a1c));
break;
case IC_RETURN_VAL:
case IC_RETURN_VAL2:
if (tempc) {
if (tempc->raw_type==RT_F64 && tempil1->ic_class->raw_type!=RT_F64)
tempil1->ic_flags|=ICF_R_TO_F64;
else if (tempc->raw_type!=RT_F64 &&
tempil1->ic_class->raw_type==RT_F64)
tempil1->ic_flags|=ICF_R_TO_INT;
if (tmpc) {
if (tmpc->raw_type==RT_F64 && tmpil1->ic_class->raw_type!=RT_F64)
tmpil1->ic_flags|=ICF_R_TO_F64;
else if (tmpc->raw_type!=RT_F64 &&
tmpil1->ic_class->raw_type==RT_F64)
tmpil1->ic_flags|=ICF_R_TO_INT;
}
break;
case IC_SQR:
@@ -263,118 +263,118 @@ U0 OptPass3(CCmpCtrl *cc,COptReg *reg_offsets)
case IC_COS:
case IC_TAN:
case IC_ATAN:
if (tempc->raw_type==RT_F64)
CmpF1PushPop(tempi,tempi1);
if (tmpc->raw_type==RT_F64)
CmpF1PushPop(tmpi,tmpi1);
break;
case IC_NOBOUND_SWITCH:
case IC_SWITCH:
lb=OptLabelFwd(tempi->ic_data(CCodeMisc *)->dft);
lb=OptLabelFwd(tmpi->ic_data(CCodeMisc *)->dft);
lb->use_cnt++;
break;
case IC_ASM:
tempaot=tempi->ic_data;
tempie=tempaot->next_ie;
while (tempie!=&tempaot->next_ie) {
if (IET_REL_I0<=tempie->type<=IET_IMM_I64 &&
tempie->str && tempie->flags&IEF_GOTO_LABEL &&
(lb=COCGoToLabelFind(cc,tempie->str)))
tmpaot=tmpi->ic_data;
tmpie=tmpaot->next_ie;
while (tmpie!=&tmpaot->next_ie) {
if (IET_REL_I0<=tmpie->type<=IET_IMM_I64 &&
tmpie->str && tmpie->flags&IEF_GOTO_LABEL &&
(lb=COCGoToLabelFind(cc,tmpie->str)))
lb->use_cnt++; //Prevent deadcode elimination.
tempie=tempie->next;
tmpie=tmpie->next;
}
break;
case IC_BR_NOT_EQU:
case IC_BR_EQU_EQU:
if ((tempi1->ic_code==IC_IMM_I64 ||
tempi1->ic_code==IC_IMM_F64) && !tempi1->ic_data) {
OptFree(tempi1);
MemCpy(&tempi->a1,&tempi->a2,sizeof(CICArg));
tempi->a2.type=MDF_NULL;
if ((tmpi1->ic_code==IC_IMM_I64 ||
tmpi1->ic_code==IC_IMM_F64) && !tmpi1->ic_data) {
OptFree(tmpi1);
MemCpy(&tmpi->a1,&tmpi->a2,sizeof(CICArg));
tmpi->a2.type=MDF_NULL;
if (code==IC_BR_EQU_EQU)
code=tempi->ic_code=IC_BR_ZERO;
code=tmpi->ic_code=IC_BR_ZERO;
else
code=tempi->ic_code=IC_BR_NOT_ZERO;
tempi1=tempi2;
tempc1=tempc2;
} else if ((tempi2->ic_code==IC_IMM_I64 ||
tempi2->ic_code==IC_IMM_F64) && !tempi2->ic_data) {
OptFree(tempi2);
tempi->a2.type=MDF_NULL;
code=tmpi->ic_code=IC_BR_NOT_ZERO;
tmpi1=tmpi2;
tmpc1=tmpc2;
} else if ((tmpi2->ic_code==IC_IMM_I64 ||
tmpi2->ic_code==IC_IMM_F64) && !tmpi2->ic_data) {
OptFree(tmpi2);
tmpi->a2.type=MDF_NULL;
if (code==IC_BR_EQU_EQU)
code=tempi->ic_code=IC_BR_ZERO;
code=tmpi->ic_code=IC_BR_ZERO;
else
code=tempi->ic_code=IC_BR_NOT_ZERO;
code=tmpi->ic_code=IC_BR_NOT_ZERO;
} else
goto here1;
case IC_BR_ZERO:
case IC_BR_NOT_ZERO:
if (tempi1->ic_code==IC_IMM_I64 || tempi1->ic_code==IC_IMM_F64) {
if (code==IC_BR_ZERO ^^ tempi1->ic_data) {
OptFree(tempi1);
tempi->a1.type=MDF_NULL;
tempi->ic_code=IC_JMP;
if (tmpi1->ic_code==IC_IMM_I64 || tmpi1->ic_code==IC_IMM_F64) {
if (code==IC_BR_ZERO ^^ tmpi1->ic_data) {
OptFree(tmpi1);
tmpi->a1.type=MDF_NULL;
tmpi->ic_code=IC_JMP;
} else {
OptFree(tempi1);
tempi=OptFree(tempi);
OptFree(tmpi1);
tmpi=OptFree(tmpi);
break;
}
}
goto here1;
case IC_BR_AND_ZERO:
if (tempi1->ic_code==IC_IMM_I64) {
i=Bsr(tempi1->ic_data);
if (0<=i==Bsf(tempi1->ic_data)) {
tempi1->ic_data=i;
tempi->ic_flags|=ICF_BY_VAL;
tempi->ic_code=IC_BR_NOT_BT;
if (tmpi1->ic_code==IC_IMM_I64) {
i=Bsr(tmpi1->ic_data);
if (0<=i==Bsf(tmpi1->ic_data)) {
tmpi1->ic_data=i;
tmpi->ic_flags|=ICF_BY_VAL;
tmpi->ic_code=IC_BR_NOT_BT;
goto here1;
}
}
if (tempi2->ic_code==IC_IMM_I64) {
i=Bsr(tempi2->ic_data);
if (0<=i==Bsf(tempi2->ic_data)) {
tempi2->ic_data=i;
tempi->ic_flags|=ICF_SWAP|ICF_BY_VAL;
tempi->ic_code=IC_BR_NOT_BT;
if (tmpi2->ic_code==IC_IMM_I64) {
i=Bsr(tmpi2->ic_data);
if (0<=i==Bsf(tmpi2->ic_data)) {
tmpi2->ic_data=i;
tmpi->ic_flags|=ICF_SWAP|ICF_BY_VAL;
tmpi->ic_code=IC_BR_NOT_BT;
}
}
goto here1;
case IC_BR_AND_NOT_ZERO:
if (tempi1->ic_code==IC_IMM_I64) {
i=Bsr(tempi1->ic_data);
if (0<=i==Bsf(tempi1->ic_data)) {
tempi1->ic_data=i;
tempi->ic_flags|=ICF_BY_VAL;
tempi->ic_code=IC_BR_BT;
if (tmpi1->ic_code==IC_IMM_I64) {
i=Bsr(tmpi1->ic_data);
if (0<=i==Bsf(tmpi1->ic_data)) {
tmpi1->ic_data=i;
tmpi->ic_flags|=ICF_BY_VAL;
tmpi->ic_code=IC_BR_BT;
goto here1;
}
}
if (tempi2->ic_code==IC_IMM_I64) {
i=Bsr(tempi2->ic_data);
if (0<=i==Bsf(tempi2->ic_data)) {
tempi2->ic_data=i;
tempi->ic_flags|=ICF_SWAP|ICF_BY_VAL;
tempi->ic_code=IC_BR_BT;
if (tmpi2->ic_code==IC_IMM_I64) {
i=Bsr(tmpi2->ic_data);
if (0<=i==Bsf(tmpi2->ic_data)) {
tmpi2->ic_data=i;
tmpi->ic_flags|=ICF_SWAP|ICF_BY_VAL;
tmpi->ic_code=IC_BR_BT;
}
}
goto here1;
case IC_BR_MM_ZERO:
case IC_BR_MM_NOT_ZERO:
if (tempi1->ic_code==IC_LEA && tempi1->a1.type&MDF_DISP &&
tempi1->a1.reg==REG_RBP)
if (tmpi1->ic_code==IC_LEA && tmpi1->a1.type&MDF_DISP &&
tmpi1->a1.reg==REG_RBP)
for (i=0;i<member_cnt;i++)
if (mv[i].offset_start==tempi1->a1.disp) {
if (mv[i].offset_start==tmpi1->a1.disp) {
mv[i].lea_balance--;
mv[i].score++;
break;
}
tempi->a1_type_pointed_to=CmpRawType(tempc);
tmpi->a1_type_pointed_to=CmpRawType(tmpc);
goto here1;
case IC_BR_LESS:
case IC_BR_GREATER_EQU:
case IC_BR_GREATER:
case IC_BR_LESS_EQU:
if (tempi->ic_flags&ICF_USE_F64)
CmpF2PushPop(tempi,tempi1,tempi2);
if (tmpi->ic_flags&ICF_USE_F64)
CmpF2PushPop(tmpi,tmpi1,tmpi2);
case IC_BR_EQU_EQU2...IC_BR_LESS_EQU2:
case IC_BR_CARRY:
case IC_BR_NOT_CARRY:
@@ -390,17 +390,17 @@ U0 OptPass3(CCmpCtrl *cc,COptReg *reg_offsets)
case IC_JMP:
case IC_SUB_CALL:
here1:
if (tempi->ic_flags&ICF_PUSH_CMP)
lb=tempi->ic_data;
if (tmpi->ic_flags&ICF_PUSH_CMP)
lb=tmpi->ic_data;
else
lb=OptLabelFwd(tempi->ic_data);
lb=OptLabelFwd(tmpi->ic_data);
lb->use_cnt++;
break;
case IC_NOP1:
tempi=OptFree(tempi);
tmpi=OptFree(tmpi);
break;
case IC_NOP2:
ps->ptr+=tempi->ic_data;
ps->ptr+=tmpi->ic_data;
break;
case IC_SHL_CONST:
case IC_SHR_CONST:
@@ -505,11 +505,11 @@ here1:
break;
default:
"Pass:%d Missing IC handler\n",cc->pass;
ICPut(cc,tempi);
ICPut(cc,tmpi);
LexExcept(cc,"Compiler Optimization Error at ");
}
}
tempi=tempi_next;
tmpi=tmpi_next;
}
/* REGISTER VARIABLE ASSIGNMENT
@@ -557,56 +557,56 @@ R12 and R13 as non-pointer register variables, such as index variables i,j,k.
if (j>cmp.num_reg_vars) {
l=0;
for (i=0;i<j && l<cmp.num_non_ptr_vars;i++) {
tempm=mv[i].m;
tempc=OptClassFwd(tempm->member_class);
if (!tempc->ptr_stars_cnt && !tempm->dim.next) {
tmpm=mv[i].m;
tmpc=OptClassFwd(tmpm->member_class);
if (!tmpc->ptr_stars_cnt && !tmpm->dim.next) {
while (l<cmp.num_non_ptr_vars &&
Bts(&cc->htc.fun->used_reg_mask,cmp.non_ptr_vars_map[l]))
l++;
if (l<cmp.num_non_ptr_vars) {
tempm->reg=cmp.non_ptr_vars_map[l++];
reg_offsets[tempm->reg].offset=mv[i].offset_start;
reg_offsets[tempm->reg].m=tempm;
tmpm->reg=cmp.non_ptr_vars_map[l++];
reg_offsets[tmpm->reg].offset=mv[i].offset_start;
reg_offsets[tmpm->reg].m=tmpm;
if (Bt(&cc->flags,CCf_PASS_TRACE_PRESENT))
"Reg %Z Var \"%-15ts\" %016X[RBP]\n",tempm->reg,"ST_U64_REGS",
tempm->str,reg_offsets[tempm->reg].offset;
"Reg %Z Var \"%-15ts\" %016X[RBP]\n",tmpm->reg,"ST_U64_REGS",
tmpm->str,reg_offsets[tmpm->reg].offset;
mv[i].offset_start=0; //flag as reg var
if (tempm->size<8 &&
!StrIMatch("Bool",tempm->member_class->str) &&
tempm->member_class->type&HTT_INTERNAL_TYPE)
if (tmpm->size<8 &&
!StrIMatch("Bool",tmpm->member_class->str) &&
tmpm->member_class->type&HTT_INTERNAL_TYPE)
PrintWarn("Using 64-bit reg var.\n "
"$$LK,\"FL:%s,%d\"$$ '%s' in '%s'\n",
cc->lex_include_stk->full_name,
cc->lex_include_stk->line_num,
tempm->str,cc->htc.fun->str);
tmpm->str,cc->htc.fun->str);
}
}
}
}
l=0;
for (i=0;i<j && l<cmp.num_reg_vars;i++) {
tempm=mv[i].m;
tmpm=mv[i].m;
//if not just flagged as reg var
if (mv[i].offset_start && (!mv[i].m->dim.next||
tempm->offset>0 && StrCmp(tempm->str,"argv"))) {
tmpm->offset>0 && StrCmp(tmpm->str,"argv"))) {
while (l<cmp.num_reg_vars &&
Bts(&cc->htc.fun->used_reg_mask,cmp.to_reg_vars_map[l]))
l++;
if (l<cmp.num_reg_vars) {
tempm->reg=cmp.to_reg_vars_map[l++];
reg_offsets[tempm->reg].offset=mv[i].offset_start;
reg_offsets[tempm->reg].m=tempm;
tmpm->reg=cmp.to_reg_vars_map[l++];
reg_offsets[tmpm->reg].offset=mv[i].offset_start;
reg_offsets[tmpm->reg].m=tmpm;
if (Bt(&cc->flags,CCf_PASS_TRACE_PRESENT))
"Reg %Z Var \"%-15ts\" %016X[RBP]\n",tempm->reg,"ST_U64_REGS",
tempm->str,reg_offsets[tempm->reg].offset;
if (tempm->size<8 &&
!StrIMatch("Bool",tempm->member_class->str) &&
tempm->member_class->type&HTT_INTERNAL_TYPE)
"Reg %Z Var \"%-15ts\" %016X[RBP]\n",tmpm->reg,"ST_U64_REGS",
tmpm->str,reg_offsets[tmpm->reg].offset;
if (tmpm->size<8 &&
!StrIMatch("Bool",tmpm->member_class->str) &&
tmpm->member_class->type&HTT_INTERNAL_TYPE)
PrintWarn("Using 64-bit reg var.\n "
"$$LK,\"FL:%s,%d\"$$ '%s' in '%s'\n",
cc->lex_include_stk->full_name,
cc->lex_include_stk->line_num,
tempm->str,cc->htc.fun->str);
tmpm->str,cc->htc.fun->str);
}
}
}
+344 -344
View File
@@ -1,128 +1,128 @@
Bool OptIC4(CIntermediateCode *tempi)
Bool OptIC4(CIntermediateCode *tmpi)
{
I64 i;
CIntermediateCode *tempil1,*tempil2;
CIntermediateCode *tmpil1,*tmpil2;
if (tempi->ic_code<IC_IMM_I64) return FALSE;
if (tmpi->ic_code<IC_IMM_I64) return FALSE;
tempil1=tempi;
if (!(tempil2=OptLag1(tempil1)))
tmpil1=tmpi;
if (!(tmpil2=OptLag1(tmpil1)))
return FALSE;
if (tempil2->r.type&MDF_STK && !(tempil2->ic_flags&ICF_PUSH_RES)) {
if (tempil1->ic_code==IC_ADD_CONST && tempil1->a1.type&MDF_STK) {
if ((tempil2->ic_code==IC_REG || tempil2->ic_code==IC_MOV) &&
tempil2->a1.type&MDF_REG) {
i=tempil1->ic_data;
if (tmpil2->r.type&MDF_STK && !(tmpil2->ic_flags&ICF_PUSH_RES)) {
if (tmpil1->ic_code==IC_ADD_CONST && tmpil1->a1.type&MDF_STK) {
if ((tmpil2->ic_code==IC_REG || tmpil2->ic_code==IC_MOV) &&
tmpil2->a1.type&MDF_REG) {
i=tmpil1->ic_data;
if (MIN_I32<=i<=MAX_I32 &&
!Bt(&cmp.non_ptr_vars_mask,tempil2->a1.reg)) {
tempil1->ic_flags|=tempil2->ic_flags&ICG_NO_CVT_MASK;
tempil1->ic_code=IC_LEA;
tempil1->a1.type=MDF_DISP+tempil1->a1.type.raw_type;
tempil1->a1.reg=tempil2->a1.reg;
tempil1->a1.disp=i;
OptFree(tempil2);
!Bt(&cmp.non_ptr_vars_mask,tmpil2->a1.reg)) {
tmpil1->ic_flags|=tmpil2->ic_flags&ICG_NO_CVT_MASK;
tmpil1->ic_code=IC_LEA;
tmpil1->a1.type=MDF_DISP+tmpil1->a1.type.raw_type;
tmpil1->a1.reg=tmpil2->a1.reg;
tmpil1->a1.disp=i;
OptFree(tmpil2);
return TRUE;
}
} else if (tempil2->ic_code==IC_SHL_CONST && tempil2->a1.type&MDF_REG) {
i=tempil1->ic_data;
if (MIN_I32<=i<=MAX_I32 && tempil2->a1.reg!=REG_RSP &&
1<=tempil2->ic_data<=3) {
tempil1->ic_flags|=tempil2->ic_flags&ICG_NO_CVT_MASK;
tempil1->ic_code=IC_LEA;
tempil1->a1.type=MDF_SIB+tempil1->a1.type.raw_type;
tempil1->a1.reg=tempil2->a1.reg<<8+REG_NONE;
if (tempil2->ic_data==1)
tempil1->a1.reg|=0x4000;
else if (tempil2->ic_data==2)
tempil1->a1.reg|=0x8000;
} else if (tmpil2->ic_code==IC_SHL_CONST && tmpil2->a1.type&MDF_REG) {
i=tmpil1->ic_data;
if (MIN_I32<=i<=MAX_I32 && tmpil2->a1.reg!=REG_RSP &&
1<=tmpil2->ic_data<=3) {
tmpil1->ic_flags|=tmpil2->ic_flags&ICG_NO_CVT_MASK;
tmpil1->ic_code=IC_LEA;
tmpil1->a1.type=MDF_SIB+tmpil1->a1.type.raw_type;
tmpil1->a1.reg=tmpil2->a1.reg<<8+REG_NONE;
if (tmpil2->ic_data==1)
tmpil1->a1.reg|=0x4000;
else if (tmpil2->ic_data==2)
tmpil1->a1.reg|=0x8000;
else
tempil1->a1.reg|=0xC000;
tempil1->a1.disp=i;
OptFree(tempil2);
tmpil1->a1.reg|=0xC000;
tmpil1->a1.disp=i;
OptFree(tmpil2);
return TRUE;
}
}
}
if (tempil2->ic_code==IC_MOV || tempil2->ic_code==IC_REG) {
if (tempil1->a2.type&MDF_STK) {
if (tempil2->ic_flags & ICF_R_TO_INT) {
if (tempil2->a1.type&MDF_IMM)
tempil2->a1.disp=tempil2->a1.disp(F64);
if (tmpil2->ic_code==IC_MOV || tmpil2->ic_code==IC_REG) {
if (tmpil1->a2.type&MDF_STK) {
if (tmpil2->ic_flags & ICF_R_TO_INT) {
if (tmpil2->a1.type&MDF_IMM)
tmpil2->a1.disp=tmpil2->a1.disp(F64);
else
tempil1->ic_flags|=ICF_A2_TO_INT;
} else if (tempil2->ic_flags&ICF_R_TO_F64) {
if (tempil2->a1.type&MDF_IMM)
tempil2->a1.disp(F64)=tempil2->a1.disp;
tmpil1->ic_flags|=ICF_A2_TO_INT;
} else if (tmpil2->ic_flags&ICF_R_TO_F64) {
if (tmpil2->a1.type&MDF_IMM)
tmpil2->a1.disp(F64)=tmpil2->a1.disp;
else
tempil1->ic_flags|=ICF_A2_TO_F64;
tmpil1->ic_flags|=ICF_A2_TO_F64;
}
tempil1->a2.type=tempil2->a1.type&MDG_MASK+
MinI64(tempil1->a2.type.raw_type,
MinI64(tempil2->r.type.raw_type,tempil2->a1.type.raw_type));
tempil1->a2.reg=tempil2->a1.reg;
tempil1->a2.disp=tempil2->a1.disp;
tempil1->ic_flags|=tempil2->ic_flags&ICG_NO_CVT_MASK;
OptSetNOP2(tempil2);
tmpil1->a2.type=tmpil2->a1.type&MDG_MASK+
MinI64(tmpil1->a2.type.raw_type,
MinI64(tmpil2->r.type.raw_type,tmpil2->a1.type.raw_type));
tmpil1->a2.reg=tmpil2->a1.reg;
tmpil1->a2.disp=tmpil2->a1.disp;
tmpil1->ic_flags|=tmpil2->ic_flags&ICG_NO_CVT_MASK;
OptSetNOP2(tmpil2);
return TRUE;
}
if (tempil1->a1.type&MDF_STK) {
if (tempil2->ic_flags & ICF_R_TO_INT) {
if (tempil2->a1.type&MDF_IMM)
tempil2->a1.disp=tempil2->a1.disp(F64);
if (tmpil1->a1.type&MDF_STK) {
if (tmpil2->ic_flags & ICF_R_TO_INT) {
if (tmpil2->a1.type&MDF_IMM)
tmpil2->a1.disp=tmpil2->a1.disp(F64);
else
tempil1->ic_flags|=ICF_A1_TO_INT;
} else if (tempil2->ic_flags&ICF_R_TO_F64) {
if (tempil2->a1.type&MDF_IMM) {
if (tempil2->a1.type&RTF_UNSIGNED)
tempil2->a1.disp(F64)=tempil2->a1.disp(U64);
tmpil1->ic_flags|=ICF_A1_TO_INT;
} else if (tmpil2->ic_flags&ICF_R_TO_F64) {
if (tmpil2->a1.type&MDF_IMM) {
if (tmpil2->a1.type&RTF_UNSIGNED)
tmpil2->a1.disp(F64)=tmpil2->a1.disp(U64);
else
tempil2->a1.disp(F64)=tempil2->a1.disp(I64);
tmpil2->a1.disp(F64)=tmpil2->a1.disp(I64);
} else
tempil1->ic_flags|=ICF_A1_TO_F64;
tmpil1->ic_flags|=ICF_A1_TO_F64;
}
tempil1->a1.type=tempil2->a1.type&MDG_MASK+
MinI64(tempil1->a1.type.raw_type,
MinI64(tempil2->r.type.raw_type,tempil2->a1.type.raw_type));
CmpMinTypePointed(tempil1,tempil2->a1_type_pointed_to);
tempil1->a1.reg=tempil2->a1.reg;
tempil1->a1.disp=tempil2->a1.disp;
tempil1->ic_flags|=tempil2->ic_flags&ICG_NO_CVT_MASK;
OptSetNOP2(tempil2);
tmpil1->a1.type=tmpil2->a1.type&MDG_MASK+
MinI64(tmpil1->a1.type.raw_type,
MinI64(tmpil2->r.type.raw_type,tmpil2->a1.type.raw_type));
CmpMinTypePointed(tmpil1,tmpil2->a1_type_pointed_to);
tmpil1->a1.reg=tmpil2->a1.reg;
tmpil1->a1.disp=tmpil2->a1.disp;
tmpil1->ic_flags|=tmpil2->ic_flags&ICG_NO_CVT_MASK;
OptSetNOP2(tmpil2);
return TRUE;
}
}
if (tempil1->ic_code==IC_DEREF) {
if (tempil2->ic_code==IC_ADD_CONST && tempil2->a1.type&MDF_REG &&
tempil1->a1.type&MDF_STK) {
i=tempil2->ic_data;
if (tmpil1->ic_code==IC_DEREF) {
if (tmpil2->ic_code==IC_ADD_CONST && tmpil2->a1.type&MDF_REG &&
tmpil1->a1.type&MDF_STK) {
i=tmpil2->ic_data;
if (MIN_I32<=i<=MAX_I32 &&
!Bt(&cmp.non_ptr_vars_mask,tempil2->a1.reg)) {
tempil1->ic_flags|=tempil2->ic_flags;
tempil1->ic_code=IC_MOV;
tempil1->a1.type=MDF_DISP+tempil1->a1_type_pointed_to;
tempil1->a1.reg=tempil2->a1.reg;
tempil1->a1.disp=i;
OptSetNOP2(tempil2,-1);
!Bt(&cmp.non_ptr_vars_mask,tmpil2->a1.reg)) {
tmpil1->ic_flags|=tmpil2->ic_flags;
tmpil1->ic_code=IC_MOV;
tmpil1->a1.type=MDF_DISP+tmpil1->a1_type_pointed_to;
tmpil1->a1.reg=tmpil2->a1.reg;
tmpil1->a1.disp=i;
OptSetNOP2(tmpil2,-1);
return TRUE;
}
}
if (tempil2->ic_code==IC_LEA && tempil1->a1.type&MDF_STK) {
tempil1->ic_flags|=tempil2->ic_flags;
tempil1->ic_code=IC_MOV;
tempil1->a1.type=tempil2->a1.type&MDG_MASK+tempil1->a1_type_pointed_to;
tempil1->a1.reg=tempil2->a1.reg;
tempil1->a1.disp=tempil2->a1.disp;
OptFree(tempil2);
if (tmpil2->ic_code==IC_LEA && tmpil1->a1.type&MDF_STK) {
tmpil1->ic_flags|=tmpil2->ic_flags;
tmpil1->ic_code=IC_MOV;
tmpil1->a1.type=tmpil2->a1.type&MDG_MASK+tmpil1->a1_type_pointed_to;
tmpil1->a1.reg=tmpil2->a1.reg;
tmpil1->a1.disp=tmpil2->a1.disp;
OptFree(tmpil2);
return TRUE;
}
}
}
if (tempil1->ic_code==IC_DEREF) {
if (tempil1->a1.type&MDF_REG) {
tempil1->a1.type=MDF_DISP+tempil1->a1_type_pointed_to;
tempil1->a1.disp=0;
tempil1->ic_code=IC_MOV;
if (tmpil1->ic_code==IC_DEREF) {
if (tmpil1->a1.type&MDF_REG) {
tmpil1->a1.type=MDF_DISP+tmpil1->a1_type_pointed_to;
tmpil1->a1.disp=0;
tmpil1->ic_code=IC_MOV;
return TRUE;
}
}
@@ -131,9 +131,9 @@ Bool OptIC4(CIntermediateCode *tempi)
U0 OptPass4(CCmpCtrl *cc,COptReg *reg_offsets,I64 *_type)
{
CHashClass *tempc,*tempc1,*tempc2;
CIntermediateCode *tempi,*tempi1,*tempi2,*tempil1,*tempil2,*tempil3,
*tempi_next;
CHashClass *tmpc,*tmpc1,*tmpc2;
CIntermediateCode *tmpi,*tmpi1,*tmpi2,*tmpil1,*tmpil2,*tmpil3,
*tmpi_next;
I64 code,i;
Bool dead_code=FALSE;
CCodeMisc *lb;
@@ -144,37 +144,37 @@ U0 OptPass4(CCmpCtrl *cc,COptReg *reg_offsets,I64 *_type)
if (_type)
*_type=RT_I64;
tempi=cc->coc.coc_head.next;
while (code=tempi->ic_code) {
tempi_next=tempi->next;
tmpi=cc->coc.coc_head.next;
while (code=tmpi->ic_code) {
tmpi_next=tmpi->next;
if (dead_code&&code!=IC_LABEL) {
if (code==IC_JMP||code==IC_SUB_CALL) {
lb=OptLabelFwd(tempi->ic_data);
lb=OptLabelFwd(tmpi->ic_data);
if (lb->use_cnt>0)
lb->use_cnt--;
}
tempi=OptFree(tempi);
tmpi=OptFree(tmpi);
} else {
tempc=tempi->ic_class;
tempi1=tempi2=&cmp.ic_nop;
if (tempil1=OptLag2(tempi)) {
if (tempil2=OptLag2(tempil1)) {
if (!(tempil3=OptLag2(tempil2)))
tempil3=&cmp.ic_nop;
tmpc=tmpi->ic_class;
tmpi1=tmpi2=&cmp.ic_nop;
if (tmpil1=OptLag2(tmpi)) {
if (tmpil2=OptLag2(tmpil1)) {
if (!(tmpil3=OptLag2(tmpil2)))
tmpil3=&cmp.ic_nop;
} else
tempil2=tempil3=&cmp.ic_nop;
tmpil2=tmpil3=&cmp.ic_nop;
} else
tempil1=tempil2=tempil3=&cmp.ic_nop;
tmpil1=tmpil2=tmpil3=&cmp.ic_nop;
switch [intermediate_code_table[code].arg_cnt] {
case IS_V_ARG:
ps->ptr-=tempi->ic_data>>3;
ps->ptr-=tmpi->ic_data>>3;
break;
case IS_2_ARG:
tempi2=PrsPop(ps);
tempc2=tempi2->ic_class;
tmpi2=PrsPop(ps);
tmpc2=tmpi2->ic_class;
case IS_1_ARG:
tempi1=PrsPop(ps);
tempc1=tempi1->ic_class;
tmpi1=PrsPop(ps);
tmpc1=tmpi1->ic_class;
break;
case IS_0_ARG: //nobound switch
break;
@@ -182,52 +182,52 @@ U0 OptPass4(CCmpCtrl *cc,COptReg *reg_offsets,I64 *_type)
switch [code] {
case IC_IMM_I64:
case IC_TYPE:
tempi->a1.type=MDF_IMM+RT_I64;
tempi->a1.disp=tempi->ic_data;
tempi->ic_code=IC_MOV;
tmpi->a1.type=MDF_IMM+RT_I64;
tmpi->a1.disp=tmpi->ic_data;
tmpi->ic_code=IC_MOV;
break;
case IC_IMM_F64:
tempi->a1.type=MDF_IMM+RT_I64;
tempi->a1.disp=tempi->ic_data;
tempi->a1_type_pointed_to=RT_F64;
tempi->ic_code=IC_MOV;
tmpi->a1.type=MDF_IMM+RT_I64;
tmpi->a1.disp=tmpi->ic_data;
tmpi->a1_type_pointed_to=RT_F64;
tmpi->ic_code=IC_MOV;
break;
case IC_MOV:
if (tempi->a1.type&MDF_DISP && tempi->a1.reg==REG_RBP) {
i=CmpOffset2Reg(tempi->a1.disp,reg_offsets);
if (tmpi->a1.type&MDF_DISP && tmpi->a1.reg==REG_RBP) {
i=CmpOffset2Reg(tmpi->a1.disp,reg_offsets);
if (i>=0) {
tempi->a1.type=MDF_REG+tempi->a1.type.raw_type;
tempi->a1.reg=i;
tempi->a1.disp=0;
tmpi->a1.type=MDF_REG+tmpi->a1.type.raw_type;
tmpi->a1.reg=i;
tmpi->a1.disp=0;
}
}
break;
case IC_DEREF:
if (tempi1->ic_code==IC_LEA) {
if (tempi1->a1.type&MDF_DISP && tempi1->a1.reg==REG_RBP) {
i=CmpOffset2Reg(tempi1->a1.disp,reg_offsets);
if (tmpi1->ic_code==IC_LEA) {
if (tmpi1->a1.type&MDF_DISP && tmpi1->a1.reg==REG_RBP) {
i=CmpOffset2Reg(tmpi1->a1.disp,reg_offsets);
if (i>=0) {
tempi->ic_flags|=tempi1->ic_flags;
tempi->ic_code=IC_REG;
tempi->a1.type=MDF_REG+tempi->a1.type.raw_type;
tempi->a1.reg=i;
tempi->a1.disp=0;
OptFree(tempi1);
tmpi->ic_flags|=tmpi1->ic_flags;
tmpi->ic_code=IC_REG;
tmpi->a1.type=MDF_REG+tmpi->a1.type.raw_type;
tmpi->a1.reg=i;
tmpi->a1.disp=0;
OptFree(tmpi1);
}
}
} else if ((tempi1->ic_code==IC_ABS_ADDR ||
tempi1->ic_code==IC_MOV &&
tempi1->a1.type==MDF_IMM+RT_I64 &&
0<=tempi1->a1.disp<=MAX_I32)&& !(tempi1->ic_flags&ICF_NO_RIP)) {
if (tempi1->ic_code==IC_ABS_ADDR)
tempi->a1.disp=tempi1->ic_data;
} else if ((tmpi1->ic_code==IC_ABS_ADDR ||
tmpi1->ic_code==IC_MOV &&
tmpi1->a1.type==MDF_IMM+RT_I64 &&
0<=tmpi1->a1.disp<=MAX_I32)&& !(tmpi1->ic_flags&ICF_NO_RIP)) {
if (tmpi1->ic_code==IC_ABS_ADDR)
tmpi->a1.disp=tmpi1->ic_data;
else
tempi->a1.disp=tempi1->a1.disp;
tempi->ic_flags|=tempi1->ic_flags;
tempi->ic_code=IC_MOV;
tempi->a1.type=MDF_RIP_DISP32+tempi->a1_type_pointed_to;
tempi->a1.reg=REG_RIP;
OptFree(tempi1);
tmpi->a1.disp=tmpi1->a1.disp;
tmpi->ic_flags|=tmpi1->ic_flags;
tmpi->ic_code=IC_MOV;
tmpi->a1.type=MDF_RIP_DISP32+tmpi->a1_type_pointed_to;
tmpi->a1.reg=REG_RIP;
OptFree(tmpi1);
}
break;
case IC_BR_MM_ZERO:
@@ -239,106 +239,106 @@ U0 OptPass4(CCmpCtrl *cc,COptReg *reg_offsets,I64 *_type)
case IC__MM:
case IC_PP_:
case IC_MM_:
if (tempi1->ic_code==IC_LEA) {
if (tempi1->a1.type&MDF_DISP && tempi1->a1.reg==REG_RBP) {
i=CmpOffset2Reg(tempi1->a1.disp,reg_offsets);
if (tmpi1->ic_code==IC_LEA) {
if (tmpi1->a1.type&MDF_DISP && tmpi1->a1.reg==REG_RBP) {
i=CmpOffset2Reg(tmpi1->a1.disp,reg_offsets);
if (i>=0) {
tempi->ic_flags|=tempi1->ic_flags;
tempi->a1.type=MDF_REG+tempi->a1.type.raw_type;
tempi->a1.reg=i;
tempi->a1.disp=0;
tempi->ic_flags|=ICF_BY_VAL;
OptSetNOP2(tempi1);
tmpi->ic_flags|=tmpi1->ic_flags;
tmpi->a1.type=MDF_REG+tmpi->a1.type.raw_type;
tmpi->a1.reg=i;
tmpi->a1.disp=0;
tmpi->ic_flags|=ICF_BY_VAL;
OptSetNOP2(tmpi1);
} else
goto p4_lea_gone;
} else {
p4_lea_gone:
tempi->ic_flags|=tempi1->ic_flags;
tempi->a1.type=tempi1->a1.type;
tempi->a1.reg=tempi1->a1.reg;
tempi->a1.disp=tempi1->a1.disp;
tempi->ic_flags|=ICF_BY_VAL;
OptSetNOP2(tempi1);
tmpi->ic_flags|=tmpi1->ic_flags;
tmpi->a1.type=tmpi1->a1.type;
tmpi->a1.reg=tmpi1->a1.reg;
tmpi->a1.disp=tmpi1->a1.disp;
tmpi->ic_flags|=ICF_BY_VAL;
OptSetNOP2(tmpi1);
}
} else if ((tempi1->ic_code==IC_ABS_ADDR || tempi1->ic_code==IC_MOV &&
tempi1->a1.type==MDF_IMM+RT_I64 &&
0<=tempi1->a1.disp<=MAX_I32)&& !(tempi1->ic_flags&ICF_NO_RIP)) {
tempi->ic_flags|=tempi1->ic_flags;
if (tempi1->ic_code==IC_ABS_ADDR)
tempi->a1.disp=tempi1->ic_data;
} else if ((tmpi1->ic_code==IC_ABS_ADDR || tmpi1->ic_code==IC_MOV &&
tmpi1->a1.type==MDF_IMM+RT_I64 &&
0<=tmpi1->a1.disp<=MAX_I32)&& !(tmpi1->ic_flags&ICF_NO_RIP)) {
tmpi->ic_flags|=tmpi1->ic_flags;
if (tmpi1->ic_code==IC_ABS_ADDR)
tmpi->a1.disp=tmpi1->ic_data;
else
tempi->a1.disp=tempi1->a1.disp;
tempi->a1.type=MDF_RIP_DISP32+tempi->a1_type_pointed_to;
tempi->a1.reg=REG_RIP;
tempi->ic_flags|=ICF_BY_VAL;
OptFree(tempi1);
tmpi->a1.disp=tmpi1->a1.disp;
tmpi->a1.type=MDF_RIP_DISP32+tmpi->a1_type_pointed_to;
tmpi->a1.reg=REG_RIP;
tmpi->ic_flags|=ICF_BY_VAL;
OptFree(tmpi1);
}
break;
case IC_ADD:
if (tempi1->ic_code==IC_MOV && tempi1->a1.type==MDF_REG+RT_I64 ||
tempi1->ic_code==IC_REG) {
if (tempi2->ic_code==IC_MOV && tempi2->a1.type==MDF_REG+RT_I64 ||
tempi2->ic_code==IC_REG) {
if (tempi2->a1.reg!=REG_RSP) {
tempi->a1.disp=0;
tempi->a1.reg=tempi1->a1.reg+tempi2->a1.reg<<8;
if (tmpi1->ic_code==IC_MOV && tmpi1->a1.type==MDF_REG+RT_I64 ||
tmpi1->ic_code==IC_REG) {
if (tmpi2->ic_code==IC_MOV && tmpi2->a1.type==MDF_REG+RT_I64 ||
tmpi2->ic_code==IC_REG) {
if (tmpi2->a1.reg!=REG_RSP) {
tmpi->a1.disp=0;
tmpi->a1.reg=tmpi1->a1.reg+tmpi2->a1.reg<<8;
goto p4_sib;
} else if (tempi1->a1.reg!=REG_RSP) {
tempi->a1.disp=0;
tempi->a1.reg=tempi2->a1.reg+tempi1->a1.reg<<8;
} else if (tmpi1->a1.reg!=REG_RSP) {
tmpi->a1.disp=0;
tmpi->a1.reg=tmpi2->a1.reg+tmpi1->a1.reg<<8;
p4_sib:
tempi->ic_flags|=(tempi1->ic_flags|tempi2->ic_flags)
tmpi->ic_flags|=(tmpi1->ic_flags|tmpi2->ic_flags)
&ICG_NO_CVT_MASK;
OptSetNOP2(tempi1);
OptFree(tempi2);
OptSetNOP2(tmpi1);
OptFree(tmpi2);
tempi->ic_code=IC_LEA;
tempi->a1.type=MDF_SIB+RT_I64;
tempi->a1_type_pointed_to=RT_I64;
tmpi->ic_code=IC_LEA;
tmpi->a1.type=MDF_SIB+RT_I64;
tmpi->a1_type_pointed_to=RT_I64;
tempi->a2.type=MDF_NULL+tempi->a2.type.raw_type;
tmpi->a2.type=MDF_NULL+tmpi->a2.type.raw_type;
}
} else if (tempi2->ic_code==IC_SHL_CONST &&
tempi2->a1.type==MDF_REG+RT_I64 && tempi2->ic_data<=3) {
if (tempi2->a1.reg!=REG_RSP) {
tempi->a1.disp=0;
tempi->a1.reg=tempi1->a1.reg+tempi2->a1.reg<<8;
if (tempi2->ic_data==1)
tempi->a1.reg|=0x4000;
else if (tempi2->ic_data==2)
tempi->a1.reg|=0x8000;
} else if (tmpi2->ic_code==IC_SHL_CONST &&
tmpi2->a1.type==MDF_REG+RT_I64 && tmpi2->ic_data<=3) {
if (tmpi2->a1.reg!=REG_RSP) {
tmpi->a1.disp=0;
tmpi->a1.reg=tmpi1->a1.reg+tmpi2->a1.reg<<8;
if (tmpi2->ic_data==1)
tmpi->a1.reg|=0x4000;
else if (tmpi2->ic_data==2)
tmpi->a1.reg|=0x8000;
else
tempi->a1.reg|=0xC000;
tmpi->a1.reg|=0xC000;
goto p4_sib;
}
}
} else if (tempi1->ic_code==IC_LEA &&
tempi1->a1.type&MDF_DISP) {
if (tempi1->a1.reg==REG_RBP &&
CmpOffset2Reg(tempi1->a1.disp,reg_offsets)>=0)
} else if (tmpi1->ic_code==IC_LEA &&
tmpi1->a1.type&MDF_DISP) {
if (tmpi1->a1.reg==REG_RBP &&
CmpOffset2Reg(tmpi1->a1.disp,reg_offsets)>=0)
break;
if (tempi2->ic_code==IC_MOV && tempi2->a1.type==MDF_REG+RT_I64 ||
tempi2->ic_code==IC_REG) {
if (tempi2->a1.reg!=REG_RSP) {
tempi->a1.disp=tempi1->a1.disp;
tempi->a1.reg=tempi1->a1.reg+tempi2->a1.reg<<8;
if (tmpi2->ic_code==IC_MOV && tmpi2->a1.type==MDF_REG+RT_I64 ||
tmpi2->ic_code==IC_REG) {
if (tmpi2->a1.reg!=REG_RSP) {
tmpi->a1.disp=tmpi1->a1.disp;
tmpi->a1.reg=tmpi1->a1.reg+tmpi2->a1.reg<<8;
goto p4_sib;
} else if (tempi1->a1.reg!=REG_RSP) {
tempi->a1.disp=tempi1->a1.disp;
tempi->a1.reg=tempi2->a1.reg+tempi1->a1.reg<<8;
} else if (tmpi1->a1.reg!=REG_RSP) {
tmpi->a1.disp=tmpi1->a1.disp;
tmpi->a1.reg=tmpi2->a1.reg+tmpi1->a1.reg<<8;
goto p4_sib;
}
} else if (tempi2->ic_code==IC_SHL_CONST &&
tempi2->a1.type==MDF_REG+RT_I64 && tempi2->ic_data<=3) {
if (tempi2->a1.reg!=REG_RSP) {
tempi->a1.disp=tempi1->a1.disp;
tempi->a1.reg=tempi1->a1.reg+tempi2->a1.reg<<8;
if (tempi2->ic_data==1)
tempi->a1.reg|=0x4000;
else if (tempi2->ic_data==2)
tempi->a1.reg|=0x8000;
} else if (tmpi2->ic_code==IC_SHL_CONST &&
tmpi2->a1.type==MDF_REG+RT_I64 && tmpi2->ic_data<=3) {
if (tmpi2->a1.reg!=REG_RSP) {
tmpi->a1.disp=tmpi1->a1.disp;
tmpi->a1.reg=tmpi1->a1.reg+tmpi2->a1.reg<<8;
if (tmpi2->ic_data==1)
tmpi->a1.reg|=0x4000;
else if (tmpi2->ic_data==2)
tmpi->a1.reg|=0x8000;
else
tempi->a1.reg|=0xC000;
tmpi->a1.reg|=0xC000;
goto p4_sib;
}
}
@@ -347,7 +347,7 @@ p4_sib:
case IC_ASSIGN_PP:
case IC_ASSIGN_MM:
//this val was stashed during pass012 for pointer arithmetic
tempi->ic_class2=tempi->t.class2; //See $LK,"ic_class2",A="FF:::/Compiler/BackB.HC,ic_class2"$
tmpi->ic_class2=tmpi->t.class2; //See $LK,"ic_class2",A="FF:::/Compiler/BackB.HC,ic_class2"$
case IC_ASSIGN:
case IC_SHL_EQU:
case IC_SHR_EQU:
@@ -359,79 +359,79 @@ p4_sib:
case IC_XOR_EQU:
case IC_ADD_EQU:
case IC_SUB_EQU:
if (tempi1->ic_code==IC_LEA) {
if (tempi1->a1.type&(MDF_DISP|MDF_SIB)) {
tempi2=tempi->next;
if (tempi1->a1.type&MDF_DISP && tempi1->a1.reg==REG_RBP) {
i=CmpOffset2Reg(tempi1->a1.disp,reg_offsets);
if (tmpi1->ic_code==IC_LEA) {
if (tmpi1->a1.type&(MDF_DISP|MDF_SIB)) {
tmpi2=tmpi->next;
if (tmpi1->a1.type&MDF_DISP && tmpi1->a1.reg==REG_RBP) {
i=CmpOffset2Reg(tmpi1->a1.disp,reg_offsets);
if (i>=0) {
tempi->ic_flags|=tempi1->ic_flags;
tempi->a1.type=MDF_REG+tempi->a1.type.raw_type;
tempi->a1.reg=i;
tempi->a1.disp=0;
OptSetNOP2(tempi1);
tmpi->ic_flags|=tmpi1->ic_flags;
tmpi->a1.type=MDF_REG+tmpi->a1.type.raw_type;
tmpi->a1.reg=i;
tmpi->a1.disp=0;
OptSetNOP2(tmpi1);
} else {
tempi->ic_flags|=tempi1->ic_flags;
tempi->a1.type=MDF_DISP+tempi->a1.type.raw_type;
tempi->a1.reg=REG_RBP;
tempi->a1.disp=tempi1->a1.disp;
OptSetNOP2(tempi1);
tmpi->ic_flags|=tmpi1->ic_flags;
tmpi->a1.type=MDF_DISP+tmpi->a1.type.raw_type;
tmpi->a1.reg=REG_RBP;
tmpi->a1.disp=tmpi1->a1.disp;
OptSetNOP2(tmpi1);
}
} else {
tempi->ic_flags|=tempi1->ic_flags;
tempi->a1.type=tempi1->a1.type&MDG_MASK+tempi->a1.type.raw_type;
tempi->a1.reg=tempi1->a1.reg;
tempi->a1.disp=tempi1->a1.disp;
OptSetNOP2(tempi1);
tmpi->ic_flags|=tmpi1->ic_flags;
tmpi->a1.type=tmpi1->a1.type&MDG_MASK+tmpi->a1.type.raw_type;
tmpi->a1.reg=tmpi1->a1.reg;
tmpi->a1.disp=tmpi1->a1.disp;
OptSetNOP2(tmpi1);
}
if (tempi->r.type&MDF_STK && tempi2->a2.type&MDF_STK &&
if (tmpi->r.type&MDF_STK && tmpi2->a2.type&MDF_STK &&
code!=IC_ASSIGN_PP && code!=IC_ASSIGN_MM) {
tempi->r.type=tempi->a1.type;
tempi->r.reg=tempi->a1.reg;
tempi->r.disp=tempi->a1.disp;
tempi2->a2.type=tempi->a1.type;
tempi2->a2.reg=tempi->a1.reg;
tempi2->a2.disp=tempi->a1.disp;
CmpMinTypePointed(tempi2,tempi->a1_type_pointed_to);
tmpi->r.type=tmpi->a1.type;
tmpi->r.reg=tmpi->a1.reg;
tmpi->r.disp=tmpi->a1.disp;
tmpi2->a2.type=tmpi->a1.type;
tmpi2->a2.reg=tmpi->a1.reg;
tmpi2->a2.disp=tmpi->a1.disp;
CmpMinTypePointed(tmpi2,tmpi->a1_type_pointed_to);
}
tempi->ic_flags|=ICF_BY_VAL;
tmpi->ic_flags|=ICF_BY_VAL;
}
} else if ((tempi1->ic_code==IC_ABS_ADDR ||
tempi1->ic_code==IC_MOV && tempi1->a1.type==MDF_IMM+RT_I64 &&
0<=tempi1->a1.disp<=MAX_I32)&& !(tempi1->ic_flags&ICF_NO_RIP)) {
tempi->ic_flags|=tempi1->ic_flags;
if (tempi1->ic_code==IC_ABS_ADDR)
tempi->a1.disp=tempi1->ic_data;
} else if ((tmpi1->ic_code==IC_ABS_ADDR ||
tmpi1->ic_code==IC_MOV && tmpi1->a1.type==MDF_IMM+RT_I64 &&
0<=tmpi1->a1.disp<=MAX_I32)&& !(tmpi1->ic_flags&ICF_NO_RIP)) {
tmpi->ic_flags|=tmpi1->ic_flags;
if (tmpi1->ic_code==IC_ABS_ADDR)
tmpi->a1.disp=tmpi1->ic_data;
else
tempi->a1.disp=tempi1->a1.disp;
tempi->a1.type=MDF_RIP_DISP32+tempi->a1.type.raw_type;
tempi->a1.reg=REG_RIP;
tempi->ic_flags|=ICF_BY_VAL;
OptSetNOP2(tempi1);
tmpi->a1.disp=tmpi1->a1.disp;
tmpi->a1.type=MDF_RIP_DISP32+tmpi->a1.type.raw_type;
tmpi->a1.reg=REG_RIP;
tmpi->ic_flags|=ICF_BY_VAL;
OptSetNOP2(tmpi1);
}
break;
case IC_RETURN_VAL:
case IC_RETURN_VAL2:
if (!tempi->ic_class) {
if (!tmpi->ic_class) {
if (_type) {
tempil1=tempi;
while (tempil1=OptLag1(tempil1))
if (tempil1->ic_class) {
if (tempil1->ic_flags & ICF_R_TO_F64)
tmpil1=tmpi;
while (tmpil1=OptLag1(tmpil1))
if (tmpil1->ic_class) {
if (tmpil1->ic_flags & ICF_R_TO_F64)
*_type=RT_F64;
else if (tempil1->ic_flags & ICF_R_TO_INT)
else if (tmpil1->ic_flags & ICF_R_TO_INT)
*_type=RT_I64;
else
*_type=tempil1->ic_class->raw_type;
*_type=tmpil1->ic_class->raw_type;
break;
}
}
tempi->ic_class=cmp.internal_types[RT_I64];
tmpi->ic_class=cmp.internal_types[RT_I64];
} else if (_type)
*_type=tempi->ic_class->raw_type;
*_type=tmpi->ic_class->raw_type;
break;
case IC_NOP1:
tempi=OptFree(tempi);
tmpi=OptFree(tmpi);
break;
case IC_BR_BT:
case IC_BR_BTS:
@@ -448,66 +448,66 @@ p4_sib:
case IC_LBTS:
case IC_LBTR:
case IC_LBTC:
if (!(tempi->ic_flags&ICF_BY_VAL)) {
if (tempi2->ic_code==IC_ADDR) {
if (tempi2->a1.type&MDF_STK &&
tempi2->r.type&MDF_STK) {
if (tempil2=OptLag1(tempi2)) {
if (tempil2->ic_code==IC_LEA) {
if (tempil2->a1.type&(MDF_IMM|MDG_REG_DISP_SIB_RIP)) {
if (tempi2) {
tempi->ic_flags|=tempi2->ic_flags;
OptFree(tempi2);
if (!(tmpi->ic_flags&ICF_BY_VAL)) {
if (tmpi2->ic_code==IC_ADDR) {
if (tmpi2->a1.type&MDF_STK &&
tmpi2->r.type&MDF_STK) {
if (tmpil2=OptLag1(tmpi2)) {
if (tmpil2->ic_code==IC_LEA) {
if (tmpil2->a1.type&(MDF_IMM|MDG_REG_DISP_SIB_RIP)) {
if (tmpi2) {
tmpi->ic_flags|=tmpi2->ic_flags;
OptFree(tmpi2);
}
tempi->ic_flags|=tempil2->ic_flags|ICF_BY_VAL;
tempi->a2.type=tempil2->a1.type;
tempi->a2.reg =tempil2->a1.reg;
tempi->a2.disp=tempil2->a1.disp;
OptFree(tempil2);
tmpi->ic_flags|=tmpil2->ic_flags|ICF_BY_VAL;
tmpi->a2.type=tmpil2->a1.type;
tmpi->a2.reg =tmpil2->a1.reg;
tmpi->a2.disp=tmpil2->a1.disp;
OptFree(tmpil2);
}
break;
} else if (tempil2->ic_code!=IC_ABS_ADDR &&
!(tempil2->ic_code==IC_MOV &&
tempil2->a1.type==MDF_IMM+RT_I64 &&
0<=tempil2->a1.disp<=MAX_I32) ||
tempil2->ic_flags&ICF_NO_RIP)
tempil2=NULL;
} else if (tmpil2->ic_code!=IC_ABS_ADDR &&
!(tmpil2->ic_code==IC_MOV &&
tmpil2->a1.type==MDF_IMM+RT_I64 &&
0<=tmpil2->a1.disp<=MAX_I32) ||
tmpil2->ic_flags&ICF_NO_RIP)
tmpil2=NULL;
else {
if (tempil2->ic_code==IC_ABS_ADDR)
tempi->a2.disp=tempil2->ic_data;
if (tmpil2->ic_code==IC_ABS_ADDR)
tmpi->a2.disp=tmpil2->ic_data;
else
tempi->a2.disp=tempil2->a1.disp;
tmpi->a2.disp=tmpil2->a1.disp;
}
}
} else {
if (tempi2->a1.type==MDF_IMM+RT_I64 &&
0<=tempi2->a1.disp<=MAX_I32 &&
!(tempi2->ic_flags&ICF_NO_RIP)) {
tempil2=tempi2;
tempi2=NULL;
tempi->a2.disp=tempil2->a1.disp;
if (tmpi2->a1.type==MDF_IMM+RT_I64 &&
0<=tmpi2->a1.disp<=MAX_I32 &&
!(tmpi2->ic_flags&ICF_NO_RIP)) {
tmpil2=tmpi2;
tmpi2=NULL;
tmpi->a2.disp=tmpil2->a1.disp;
} else
tempil2=NULL;
tmpil2=NULL;
}
if (tempil2) {
if (tempi2) {
tempi->ic_flags|=tempi2->ic_flags;
OptFree(tempi2);
if (tmpil2) {
if (tmpi2) {
tmpi->ic_flags|=tmpi2->ic_flags;
OptFree(tmpi2);
}
tempi->ic_flags|=tempil2->ic_flags|ICF_BY_VAL;
tempi->a2.type=MDF_RIP_DISP32+tempi->a2.type.raw_type;
tempi->a2.reg=REG_RIP;
OptFree(tempil2);
tmpi->ic_flags|=tmpil2->ic_flags|ICF_BY_VAL;
tmpi->a2.type=MDF_RIP_DISP32+tmpi->a2.type.raw_type;
tmpi->a2.reg=REG_RIP;
OptFree(tmpil2);
}
} else if (tempi2->ic_code==IC_MOV && tempi2->r.type&MDF_STK &&
tempi2->a1.type==MDF_IMM+RT_I64 &&
0<=tempi2->a1.disp<=MAX_I32 &&
!(tempi2->ic_flags&ICF_NO_RIP)) {
tempi->a2.disp=tempi2->a1.disp;
tempi->ic_flags|=tempi2->ic_flags|ICF_BY_VAL;
tempi->a2.type=MDF_RIP_DISP32+tempi->a2.type.raw_type;
tempi->a2.reg=REG_RIP;
OptFree(tempi2);
} else if (tmpi2->ic_code==IC_MOV && tmpi2->r.type&MDF_STK &&
tmpi2->a1.type==MDF_IMM+RT_I64 &&
0<=tmpi2->a1.disp<=MAX_I32 &&
!(tmpi2->ic_flags&ICF_NO_RIP)) {
tmpi->a2.disp=tmpi2->a1.disp;
tmpi->ic_flags|=tmpi2->ic_flags|ICF_BY_VAL;
tmpi->a2.type=MDF_RIP_DISP32+tmpi->a2.type.raw_type;
tmpi->a2.reg=REG_RIP;
OptFree(tmpi2);
}
}
break;
@@ -517,14 +517,14 @@ p4_sib:
case IC_BR_NOT_CARRY:
case IC_BR_ZERO:
case IC_BR_NOT_ZERO:
lb=tempi->ic_data;
if (tempi->ic_flags&ICF_PUSH_CMP) {
lb=tmpi->ic_data;
if (tmpi->ic_flags&ICF_PUSH_CMP) {
lb->flags|=CMF_POP_CMP;
lb->fwd=NULL;
}
break;
case IC_LABEL:
lb=tempi->ic_data;
lb=tmpi->ic_data;
if (lb->use_cnt)
dead_code=FALSE;
break;
@@ -533,26 +533,26 @@ p4_sib:
dead_code=TRUE;
break;
case IC_NOP2:
ps->ptr+=tempi->ic_data;
ps->ptr+=tmpi->ic_data;
break;
case IC_CALL_END:
case IC_END_EXP:
if (!(tempil1->ic_flags&ICF_PUSH_RES)) {
if (tempi->ic_flags&ICF_RES_NOT_USED) {
tempil1->ic_flags|=ICF_RES_NOT_USED;
tempil1->r.type=MDF_NULL+tempil1->r.type.raw_type;
} else if (tempi->a1.type&MDF_STK &&
tempil1->r.type&MDF_STK) {
tempi->a1.type=MDF_REG+tempi->a1.type.raw_type;
tempi->a1.disp=0;
tempil1->r.type=MDF_REG+tempil1->r.type.raw_type;
tempil1->r.disp=0;
if (intermediate_code_table[tempi->ic_code].arg_cnt==IS_2_ARG) {
tempi->a1.reg=REG_R8;
tempil1->r.reg=REG_R8;
if (!(tmpil1->ic_flags&ICF_PUSH_RES)) {
if (tmpi->ic_flags&ICF_RES_NOT_USED) {
tmpil1->ic_flags|=ICF_RES_NOT_USED;
tmpil1->r.type=MDF_NULL+tmpil1->r.type.raw_type;
} else if (tmpi->a1.type&MDF_STK &&
tmpil1->r.type&MDF_STK) {
tmpi->a1.type=MDF_REG+tmpi->a1.type.raw_type;
tmpi->a1.disp=0;
tmpil1->r.type=MDF_REG+tmpil1->r.type.raw_type;
tmpil1->r.disp=0;
if (intermediate_code_table[tmpi->ic_code].arg_cnt==IS_2_ARG) {
tmpi->a1.reg=REG_R8;
tmpil1->r.reg=REG_R8;
} else {
tempi->a1.reg=REG_RAX;
tempil1->r.reg=REG_RAX;
tmpi->a1.reg=REG_RAX;
tmpil1->r.reg=REG_RAX;
}
}
}
@@ -668,17 +668,17 @@ p4_sib:
break;
default:
"Pass:%d Missing IC handler\n",cc->pass;
ICPut(cc,tempi);
ICPut(cc,tmpi);
LexExcept(cc,"Compiler Optimization Error at ");
}
if (tempi) {
while (OptIC4(tempi));
code=tempi->ic_code;
if (tmpi) {
while (OptIC4(tmpi));
code=tmpi->ic_code;
if (intermediate_code_table[code].res_cnt)
PrsPush(ps,tempi);
PrsPush(ps,tmpi);
}
}
tempi=tempi_next;
tmpi=tmpi_next;
}
if (ps->ptr>2) {
"Pass:%d Stk:%08X\n",cc->pass,ps->ptr;
+51 -51
View File
@@ -1,87 +1,87 @@
U0 OptPass5(CCmpCtrl *cc)
{
CIntermediateCode *tempi,*tempi1;
CIntermediateCode *tmpi,*tmpi1;
I64 code,i;
CPrsStk *ps=cc->ps;
ps->ptr=0;
ps->ptr2=0;
tempi=cc->coc.coc_head.next;
while (code=tempi->ic_code) {
tmpi=cc->coc.coc_head.next;
while (code=tmpi->ic_code) {
if (code>IC_NOP2) {
if (tempi->ic_flags&ICF_PASS_TRACE) {
if (tmpi->ic_flags&ICF_PASS_TRACE) {
if (Bt(&cc->saved_pass_trace,5)) {
"%2d:",ps->ptr;
ICPut(cc,tempi);
ICPut(cc,tmpi);
}
}
if (intermediate_code_table[code].arg_cnt==IS_V_ARG)
ps->ptr-=tempi->ic_data>>3;
ps->ptr-=tmpi->ic_data>>3;
if (code==IC_PUSH_REGS) {
for (i=0;i<NUM_REGS;i++)
if (Bt(&tempi->ic_data,i))
if (Bt(&tmpi->ic_data,i))
ps->ptr++;
} else if (code==IC_POP_REGS) {
for (i=0;i<NUM_REGS;i++)
if (Bt(&tempi->ic_data,i))
if (Bt(&tmpi->ic_data,i))
ps->ptr--;
}
if (tempi->a2.type&MDF_STK) {
tempi1=PrsPop(ps);
if (tempi1->ic_code==IC_MOV || tempi1->ic_code==IC_REG) {
if (tempi1->ic_flags & ICF_R_TO_INT) {
if (tempi1->a1.type&MDF_IMM)
tempi1->a1.disp=tempi1->a1.disp(F64);
if (tmpi->a2.type&MDF_STK) {
tmpi1=PrsPop(ps);
if (tmpi1->ic_code==IC_MOV || tmpi1->ic_code==IC_REG) {
if (tmpi1->ic_flags & ICF_R_TO_INT) {
if (tmpi1->a1.type&MDF_IMM)
tmpi1->a1.disp=tmpi1->a1.disp(F64);
else
tempi->ic_flags|=ICF_A2_TO_INT;
} else if (tempi1->ic_flags&ICF_R_TO_F64) {
if (tempi1->a1.type&MDF_IMM)
tempi1->a1.disp(F64)=tempi1->a1.disp;
tmpi->ic_flags|=ICF_A2_TO_INT;
} else if (tmpi1->ic_flags&ICF_R_TO_F64) {
if (tmpi1->a1.type&MDF_IMM)
tmpi1->a1.disp(F64)=tmpi1->a1.disp;
else
tempi->ic_flags|=ICF_A2_TO_F64;
tmpi->ic_flags|=ICF_A2_TO_F64;
}
tempi->a2.type=tempi1->a1.type&MDG_MASK+
MinI64(tempi->a2.type.raw_type,
MinI64(tempi1->r.type.raw_type,tempi1->a1.type.raw_type));
tempi->a2.reg=tempi1->a1.reg;
tempi->a2.disp=tempi1->a1.disp;
tempi->ic_flags|=tempi1->ic_flags&ICG_NO_CVT_MASK;
OptSetNOP2(tempi1);
tmpi->a2.type=tmpi1->a1.type&MDG_MASK+
MinI64(tmpi->a2.type.raw_type,
MinI64(tmpi1->r.type.raw_type,tmpi1->a1.type.raw_type));
tmpi->a2.reg=tmpi1->a1.reg;
tmpi->a2.disp=tmpi1->a1.disp;
tmpi->ic_flags|=tmpi1->ic_flags&ICG_NO_CVT_MASK;
OptSetNOP2(tmpi1);
}
}
if (tempi->a1.type&MDF_STK) {
tempi1=PrsPop(ps);
if (tempi1->ic_code==IC_MOV || tempi1->ic_code==IC_REG) {
if (tempi1->ic_flags & ICF_R_TO_INT) {
if (tempi1->a1.type&MDF_IMM)
tempi1->a1.disp=tempi1->a1.disp(F64);
if (tmpi->a1.type&MDF_STK) {
tmpi1=PrsPop(ps);
if (tmpi1->ic_code==IC_MOV || tmpi1->ic_code==IC_REG) {
if (tmpi1->ic_flags & ICF_R_TO_INT) {
if (tmpi1->a1.type&MDF_IMM)
tmpi1->a1.disp=tmpi1->a1.disp(F64);
else
tempi->ic_flags|=ICF_A1_TO_INT;
} else if (tempi1->ic_flags&ICF_R_TO_F64) {
if (tempi1->a1.type&MDF_IMM) {
if (tempi1->a1.type&RTF_UNSIGNED)
tempi1->a1.disp(F64)=tempi1->a1.disp(U64);
tmpi->ic_flags|=ICF_A1_TO_INT;
} else if (tmpi1->ic_flags&ICF_R_TO_F64) {
if (tmpi1->a1.type&MDF_IMM) {
if (tmpi1->a1.type&RTF_UNSIGNED)
tmpi1->a1.disp(F64)=tmpi1->a1.disp(U64);
else
tempi1->a1.disp(F64)=tempi1->a1.disp(I64);
tmpi1->a1.disp(F64)=tmpi1->a1.disp(I64);
} else
tempi->ic_flags|=ICF_A1_TO_F64;
tmpi->ic_flags|=ICF_A1_TO_F64;
}
tempi->a1.type=tempi1->a1.type&MDG_MASK+
MinI64(tempi->a1.type.raw_type,
MinI64(tempi1->r.type.raw_type,tempi1->a1.type.raw_type));
CmpMinTypePointed(tempi,tempi1->a1_type_pointed_to);
tempi->a1.reg=tempi1->a1.reg;
tempi->a1.disp=tempi1->a1.disp;
tempi->ic_flags|=tempi1->ic_flags&ICG_NO_CVT_MASK;
OptSetNOP2(tempi1);
tmpi->a1.type=tmpi1->a1.type&MDG_MASK+
MinI64(tmpi->a1.type.raw_type,
MinI64(tmpi1->r.type.raw_type,tmpi1->a1.type.raw_type));
CmpMinTypePointed(tmpi,tmpi1->a1_type_pointed_to);
tmpi->a1.reg=tmpi1->a1.reg;
tmpi->a1.disp=tmpi1->a1.disp;
tmpi->ic_flags|=tmpi1->ic_flags&ICG_NO_CVT_MASK;
OptSetNOP2(tmpi1);
}
}
if (tempi->r.type&MDF_STK &&
!(tempi->ic_flags&ICF_RES_NOT_USED))
PrsPush(ps,tempi);
if (tmpi->r.type&MDF_STK &&
!(tmpi->ic_flags&ICF_RES_NOT_USED))
PrsPush(ps,tmpi);
}
tempi=tempi->next;
tmpi=tmpi->next;
}
if (ps->ptr>2) {
"Pass:%d Stk:%08X\n",cc->pass,ps->ptr;
+106 -106
View File
@@ -1,101 +1,101 @@
Bool OptIC6(CIntermediateCode *tempi)
Bool OptIC6(CIntermediateCode *tmpi)
{
CIntermediateCode *tempil1;
if (tempi->ic_code<IC_IMM_I64 || !(tempil1=OptLag1(tempi)))
CIntermediateCode *tmpil1;
if (tmpi->ic_code<IC_IMM_I64 || !(tmpil1=OptLag1(tmpi)))
return FALSE;
if (tempil1->ic_code==IC_ADD_CONST && tempi->ic_code==IC_DEREF &&
tempi->ic_flags&ICF_A1_WAS_STK && tempi->a1.type&MDF_REG &&
tempil1->r.type&MDF_REG && MIN_I32<=tempil1->ic_data<=MAX_I32 &&
!Bt(&cmp.non_ptr_vars_mask,tempil1->a1.reg)) {
if (tempil1->a1.type&MDF_REG) {
tempi->ic_flags=tempi->ic_flags&~ICF_A1_WAS_STK | tempil1->ic_flags;
tempi->ic_code=IC_MOV;
tempi->a1.type=MDF_DISP+tempi->a1_type_pointed_to;
tempi->a1.reg=tempil1->a1.reg;
tempi->a1.disp=tempil1->ic_data;
OptSetNOP2(tempil1,-1);
if (tmpil1->ic_code==IC_ADD_CONST && tmpi->ic_code==IC_DEREF &&
tmpi->ic_flags&ICF_A1_WAS_STK && tmpi->a1.type&MDF_REG &&
tmpil1->r.type&MDF_REG && MIN_I32<=tmpil1->ic_data<=MAX_I32 &&
!Bt(&cmp.non_ptr_vars_mask,tmpil1->a1.reg)) {
if (tmpil1->a1.type&MDF_REG) {
tmpi->ic_flags=tmpi->ic_flags&~ICF_A1_WAS_STK | tmpil1->ic_flags;
tmpi->ic_code=IC_MOV;
tmpi->a1.type=MDF_DISP+tmpi->a1_type_pointed_to;
tmpi->a1.reg=tmpil1->a1.reg;
tmpi->a1.disp=tmpil1->ic_data;
OptSetNOP2(tmpil1,-1);
} else {
tempil1->ic_code=IC_MOV;
tempi->ic_code=IC_MOV;
tempi->a1.type=MDF_DISP+tempi->a1_type_pointed_to;
tempi->a1.disp=tempil1->ic_data;
tmpil1->ic_code=IC_MOV;
tmpi->ic_code=IC_MOV;
tmpi->a1.type=MDF_DISP+tmpi->a1_type_pointed_to;
tmpi->a1.disp=tmpil1->ic_data;
}
return TRUE;
}
return FALSE;
}
U0 OptPass6Lag(CCmpCtrl *cc,CPrsStk *ps,CIntermediateCode *tempi,
U0 OptPass6Lag(CCmpCtrl *cc,CPrsStk *ps,CIntermediateCode *tmpi,
I64 *_stk_ptr,I64 reg_stk_size,I64 *_clobbered_reg_mask)
{
I64 stk_ptr=*_stk_ptr,code,
clobbered_stk_temp_mask,clobbered_reg_mask=*_clobbered_reg_mask;
CHashFun *tempf;
code=tempi->ic_code;
if (tempi->ic_flags&ICF_PASS_TRACE && Bt(&cc->saved_pass_trace,6)) {
clobbered_stk_tmp_mask,clobbered_reg_mask=*_clobbered_reg_mask;
CHashFun *tmpf;
code=tmpi->ic_code;
if (tmpi->ic_flags&ICF_PASS_TRACE && Bt(&cc->saved_pass_trace,6)) {
"%2d:",stk_ptr;
ICPut(cc,tempi);
ICPut(cc,tmpi);
}
if (code==IC_CALL_START) {
if (reg_stk_size==1 && stk_ptr>0)
clobbered_stk_temp_mask=REGG_STK_TEMP;
clobbered_stk_tmp_mask=REGG_STK_TMP;
else
clobbered_stk_temp_mask=0;
if (tempf=tempi->ic_data) {
if (Bt(&tempf->flags,Ff_INTERNAL))
clobbered_stk_temp_mask=0;
clobbered_stk_tmp_mask=0;
if (tmpf=tmpi->ic_data) {
if (Bt(&tmpf->flags,Ff_INTERNAL))
clobbered_stk_tmp_mask=0;
else {
clobbered_stk_temp_mask&=tempf->clobbered_reg_mask;
clobbered_reg_mask|=tempf->clobbered_reg_mask;
clobbered_stk_tmp_mask&=tmpf->clobbered_reg_mask;
clobbered_reg_mask|=tmpf->clobbered_reg_mask;
}
}
tempi->ic_data=clobbered_stk_temp_mask;
tmpi->ic_data=clobbered_stk_tmp_mask;
PrsPush(ps,stk_ptr);
PrsPush(ps,clobbered_stk_temp_mask);
PrsPush(ps,clobbered_stk_tmp_mask);
} else if (code==IC_CALL_END) {
tempi->ic_data=PrsPop(ps);
tmpi->ic_data=PrsPop(ps);
stk_ptr=PrsPop(ps);
} else if (code==IC_CALL_END2) {
ps->ptr--;
stk_ptr=PrsPop(ps);
}
if (intermediate_code_table[code].arg_cnt==IS_V_ARG)
stk_ptr-=tempi->ic_data>>3;
if (tempi->a2.type&MDF_STK) {
stk_ptr-=tmpi->ic_data>>3;
if (tmpi->a2.type&MDF_STK) {
stk_ptr--;
if (stk_ptr<reg_stk_size) {
tempi->a2.type=MDF_REG+tempi->a2.type.raw_type;
tempi->a2.reg=Bsf(REGG_STK_TEMP);
tempi->a2.disp=0;
tmpi->a2.type=MDF_REG+tmpi->a2.type.raw_type;
tmpi->a2.reg=Bsf(REGG_STK_TMP);
tmpi->a2.disp=0;
}
}
if (tempi->a1.type&MDF_STK) {
if (tmpi->a1.type&MDF_STK) {
stk_ptr--;
if (stk_ptr<reg_stk_size) {
tempi->a1.type=MDF_REG+tempi->a1.type.raw_type;
tempi->a1.reg=Bsf(REGG_STK_TEMP);
tempi->a1.disp=0;
tmpi->a1.type=MDF_REG+tmpi->a1.type.raw_type;
tmpi->a1.reg=Bsf(REGG_STK_TMP);
tmpi->a1.disp=0;
}
}
if (tempi->r.type&MDF_STK && !(tempi->ic_flags & ICF_PUSH_RES)) {
if (tmpi->r.type&MDF_STK && !(tmpi->ic_flags & ICF_PUSH_RES)) {
stk_ptr++;
if (stk_ptr<=reg_stk_size) {
tempi->r.type=MDF_REG+tempi->r.type.raw_type;
tempi->r.reg=Bsf(REGG_STK_TEMP);
clobbered_reg_mask|=REGG_STK_TEMP;
tempi->r.disp=0;
tmpi->r.type=MDF_REG+tmpi->r.type.raw_type;
tmpi->r.reg=Bsf(REGG_STK_TMP);
clobbered_reg_mask|=REGG_STK_TMP;
tmpi->r.disp=0;
}
}
while (OptIC6(tempi));
if (tempi->r.type.raw_type!=RT_F64 && !(tempi->ic_flags&ICF_USE_F64))
tempi->ic_flags|=ICF_USE_INT;
while (OptIC6(tmpi));
if (tmpi->r.type.raw_type!=RT_F64 && !(tmpi->ic_flags&ICF_USE_F64))
tmpi->ic_flags|=ICF_USE_INT;
*_stk_ptr=stk_ptr;
*_clobbered_reg_mask=clobbered_reg_mask;
}
U0 OptPass6(CCmpCtrl *cc)
{
CIntermediateCode *tempi,*tempi_next,*tempil1,*tempil2,*old_tempil2;
CIntermediateCode *tmpi,*tmpi_next,*tmpil1,*tmpil2,*old_tmpil2;
I64 stk_ptr=0,reg_stk_size,clobbered_reg_mask=REGG_CLOBBERED;
CPrsStk *ps=cc->ps;
ps->ptr=0;
@@ -104,75 +104,75 @@ U0 OptPass6(CCmpCtrl *cc)
reg_stk_size=0;
else
reg_stk_size=1;
#assert REGG_STK_TEMP==1<<9
tempi=cc->coc.coc_head.next;
old_tempil2=NULL;
tempil1=tempil2=&cmp.ic_nop;
while (tempi->ic_code) {
if (tempi->ic_code>IC_NOP2) {
if (tempil1->ic_code>IC_NOP2)
tempil2=tempil1;
tempil1=tempi;
if (tempi->a2.type&MDF_STK) {
if (tempil2->r.type&MDF_STK &&
!(tempil2->ic_flags&ICF_PUSH_RES)) {
if (tempi->ic_code==IC_ASSIGN && tempi->ic_flags&ICF_BY_VAL &&
tempi->ic_flags&ICF_RES_NOT_USED &&
tempil2->ic_code!=IC_CALL_END &&
tempil2->ic_code!=IC_CALL_END2 &&
tempil2->ic_code!=IC_SET_RAX &&
!(tempi->ic_flags&(ICF_A2_TO_F64|ICF_A2_TO_INT)) &&
!(tempil2->ic_flags&(ICF_R_TO_F64|ICF_R_TO_INT))) {
tempil2->r.type =tempi->a1.type&MDG_MASK+tempi->a1_type_pointed_to;
tempil2->r.reg =tempi->a1.reg;
tempil2->r.disp =tempi->a1.disp;
tempil2->ic_flags=tempil2->ic_flags
#assert REGG_STK_TMP==1<<9
tmpi=cc->coc.coc_head.next;
old_tmpil2=NULL;
tmpil1=tmpil2=&cmp.ic_nop;
while (tmpi->ic_code) {
if (tmpi->ic_code>IC_NOP2) {
if (tmpil1->ic_code>IC_NOP2)
tmpil2=tmpil1;
tmpil1=tmpi;
if (tmpi->a2.type&MDF_STK) {
if (tmpil2->r.type&MDF_STK &&
!(tmpil2->ic_flags&ICF_PUSH_RES)) {
if (tmpi->ic_code==IC_ASSIGN && tmpi->ic_flags&ICF_BY_VAL &&
tmpi->ic_flags&ICF_RES_NOT_USED &&
tmpil2->ic_code!=IC_CALL_END &&
tmpil2->ic_code!=IC_CALL_END2 &&
tmpil2->ic_code!=IC_SET_RAX &&
!(tmpi->ic_flags&(ICF_A2_TO_F64|ICF_A2_TO_INT)) &&
!(tmpil2->ic_flags&(ICF_R_TO_F64|ICF_R_TO_INT))) {
tmpil2->r.type =tmpi->a1.type&MDG_MASK+tmpi->a1_type_pointed_to;
tmpil2->r.reg =tmpi->a1.reg;
tmpil2->r.disp =tmpi->a1.disp;
tmpil2->ic_flags=tmpil2->ic_flags
&~(ICF_RES_NOT_USED|ICF_R_WAS_STK)
|tempi->ic_flags&~(ICF_BY_VAL|ICF_A1_WAS_STK|ICF_A2_WAS_STK);
old_tempil2=NULL;
OptSetNOP1(tempi);
|tmpi->ic_flags&~(ICF_BY_VAL|ICF_A1_WAS_STK|ICF_A2_WAS_STK);
old_tmpil2=NULL;
OptSetNOP1(tmpi);
} else {
tempi->a2.type=MDF_REG+tempi->a2.type.raw_type;
tempi->a2.reg=REG_RAX;
tempi->a2.disp=0;
tempil2->r.type=MDF_REG+tempil2->r.type.raw_type;
tempil2->r.reg=REG_RAX;
tempil2->r.disp=0;
tmpi->a2.type=MDF_REG+tmpi->a2.type.raw_type;
tmpi->a2.reg=REG_RAX;
tmpi->a2.disp=0;
tmpil2->r.type=MDF_REG+tmpil2->r.type.raw_type;
tmpil2->r.reg=REG_RAX;
tmpil2->r.disp=0;
}
}
} else if (tempi->a1.type&MDF_STK && tempil2->r.type&MDF_STK &&
!(tempil2->ic_flags&ICF_PUSH_RES)) {
tempi->a1.type=MDF_REG+tempi->a1.type.raw_type;
tempi->a1.disp=0;
tempil2->r.type=MDF_REG+tempil2->r.type.raw_type;
tempil2->r.disp=0;
if (intermediate_code_table[tempi->ic_code].arg_cnt==IS_2_ARG) {
tempi->a1.reg=REG_R8;
tempil2->r.reg=REG_R8;
} else if (tmpi->a1.type&MDF_STK && tmpil2->r.type&MDF_STK &&
!(tmpil2->ic_flags&ICF_PUSH_RES)) {
tmpi->a1.type=MDF_REG+tmpi->a1.type.raw_type;
tmpi->a1.disp=0;
tmpil2->r.type=MDF_REG+tmpil2->r.type.raw_type;
tmpil2->r.disp=0;
if (intermediate_code_table[tmpi->ic_code].arg_cnt==IS_2_ARG) {
tmpi->a1.reg=REG_R8;
tmpil2->r.reg=REG_R8;
} else {
tempi->a1.reg=REG_RAX;
tempil2->r.reg=REG_RAX;
tmpi->a1.reg=REG_RAX;
tmpil2->r.reg=REG_RAX;
}
}
if (tempi->ic_flags & ICF_PUSH_RES)
tempi->r.type==MDF_STK+tempi->r.type.raw_type;
if (old_tempil2!=tempil2) {
if (tempil2->ic_code>IC_NOP2)
OptPass6Lag(cc,ps,tempil2,&stk_ptr,reg_stk_size,&clobbered_reg_mask);
old_tempil2=tempil2;
if (tmpi->ic_flags & ICF_PUSH_RES)
tmpi->r.type==MDF_STK+tmpi->r.type.raw_type;
if (old_tmpil2!=tmpil2) {
if (tmpil2->ic_code>IC_NOP2)
OptPass6Lag(cc,ps,tmpil2,&stk_ptr,reg_stk_size,&clobbered_reg_mask);
old_tmpil2=tmpil2;
}
}
tempi_next=tempi->next;
if (tempi->ic_code<=IC_NOP2)
OptFree(tempi);
tempi=tempi_next;
tmpi_next=tmpi->next;
if (tmpi->ic_code<=IC_NOP2)
OptFree(tmpi);
tmpi=tmpi_next;
}
if (ps->ptr>2) {
"Pass:%d Stk:%08X\n",cc->pass,ps->ptr;
LexExcept(cc,"Compiler Optimization Error at ");
}
if (cc->htc.fun) {
cc->htc.fun->used_reg_mask&=~REGG_STK_TEMP;
cc->htc.fun->used_reg_mask&=~REGG_STK_TMP;
cc->htc.fun->used_reg_mask|=clobbered_reg_mask;
cc->htc.fun->clobbered_reg_mask=clobbered_reg_mask;
if (Bt(&cc->flags,CCf_PASS_TRACE_PRESENT) &&
+525 -525
View File
File diff suppressed because it is too large. Load diff
+266 -266
View File
File diff suppressed because it is too large. Load diff
+54 -54
View File
@@ -21,18 +21,18 @@ I64 PrsPop2(CPrsStk *ps)
U0 PrsPopDeref(CPrsStk *ps)
{
I64 i=PrsPop(ps);
CHashClass *tempc=PrsPop(ps);
CHashClass *tmpc=PrsPop(ps);
if (i.u16[0]!=IC_DEREF) {
PrsPush(ps,tempc);
PrsPush(ps,tmpc);
PrsPush(ps,i);
}
}
I64 PrsKeyWord(CCmpCtrl *cc)
{//Cvt cur token to $LK,"KEYWORD",A="FF:::/Compiler/OpCodes.DD,KEYWORD"$ or -1.
CHashGeneric *temph;
if (cc->token==TK_IDENT &&(temph=cc->hash_entry) && temph->type&HTT_KEYWORD)
return temph->user_data0;
CHashGeneric *tmph;
if (cc->token==TK_IDENT &&(tmph=cc->hash_entry) && tmph->type&HTT_KEYWORD)
return tmph->user_data0;
else
return -1;
}
@@ -46,13 +46,13 @@ for one * and two fwd for two **.
*/
I64 i;
CHashClass *res=CAlloc(sizeof(CHashClass)*(MAX_PTR_STARS+1),Fs->code_heap),
*tempc=res;
*tmpc=res;
for (i=0;i<=MAX_PTR_STARS;i++) {
tempc->type=HTT_CLASS;
tempc->raw_type=RT_PTR;
tempc->size=sizeof(U8 *);
tempc->ptr_stars_cnt=i;
tempc++;
tmpc->type=HTT_CLASS;
tmpc->raw_type=RT_PTR;
tmpc->size=sizeof(U8 *);
tmpc->ptr_stars_cnt=i;
tmpc++;
}
res->last_in_member_lst=&res->member_lst_and_root;
res->size=0;
@@ -63,13 +63,13 @@ CHashFun *PrsFunNew()
{
I64 i;
CHashFun *res=CAlloc(sizeof(CHashFun)*(MAX_PTR_STARS+1),Fs->code_heap),
*tempf=res;
*tmpf=res;
for (i=0;i<=MAX_PTR_STARS;i++) {
tempf->type=HTT_FUN;
tempf->raw_type=RT_PTR;
tempf->size=sizeof(U8 *);
tempf->ptr_stars_cnt=i;
tempf++;
tmpf->type=HTT_FUN;
tmpf->raw_type=RT_PTR;
tmpf->size=sizeof(U8 *);
tmpf->ptr_stars_cnt=i;
tmpf++;
}
res->last_in_member_lst=&res->member_lst_and_root;
res->size=0;
@@ -79,43 +79,43 @@ CHashFun *PrsFunNew()
CIntermediateCode *ICAdd(CCmpCtrl *cc,
I64 opcode_and_precedence,I64 arg, CHashClass *c,I64 flags=0)
{
CIntermediateCode *tempi=MAlloc(sizeof(CIntermediateCode));
tempi->ic_code=opcode_and_precedence.u16[0];
tempi->ic_precedence=opcode_and_precedence.u16[1];
tempi->ic_data=arg;
tempi->ic_class=c;
CIntermediateCode *tmpi=MAlloc(sizeof(CIntermediateCode));
tmpi->ic_code=opcode_and_precedence.u16[0];
tmpi->ic_precedence=opcode_and_precedence.u16[1];
tmpi->ic_data=arg;
tmpi->ic_class=c;
if (cc->pass_trace) {
Bts(&cc->flags,CCf_PASS_TRACE_PRESENT);
flags|=ICF_PASS_TRACE;
}
if (cc->lock_cnt)
flags|=ICF_LOCK;
tempi->ic_flags=flags;
tempi->ic_line=cc->last_line_num;
QueIns(tempi,cc->coc.coc_head.last);
return tempi;
tmpi->ic_flags=flags;
tmpi->ic_line=cc->last_line_num;
QueIns(tmpi,cc->coc.coc_head.last);
return tmpi;
}
U0 COCInit(CCmpCtrl *cc)
{
CCodeCtrl *tempcbh=&cc->coc;
QueInit(&tempcbh->coc_head.next);
QueInit(&tempcbh->coc_next_misc);
tempcbh->coc_head.ic_code=IC_END;
CCodeCtrl *tmpcbh=&cc->coc;
QueInit(&tmpcbh->coc_head.next);
QueInit(&tmpcbh->coc_next_misc);
tmpcbh->coc_head.ic_code=IC_END;
}
U0 COCPush(CCmpCtrl *cc)
{
CCodeCtrl *tempcbh=MAlloc(sizeof(CCodeCtrl));
MemCpy(tempcbh,&cc->coc,sizeof(CCodeCtrl));
cc->coc.coc_next=tempcbh;
CCodeCtrl *tmpcbh=MAlloc(sizeof(CCodeCtrl));
MemCpy(tmpcbh,&cc->coc,sizeof(CCodeCtrl));
cc->coc.coc_next=tmpcbh;
}
CCmpCtrl *COCPopNoFree(CCmpCtrl *cc)
{
CCodeCtrl *tempcbh=cc->coc.coc_next;
MemCpy(&cc->coc,tempcbh,sizeof(CCodeCtrl));
return tempcbh;
CCodeCtrl *tmpcbh=cc->coc.coc_next;
MemCpy(&cc->coc,tmpcbh,sizeof(CCodeCtrl));
return tmpcbh;
}
U0 COCPop(CCmpCtrl *cc)
@@ -123,21 +123,21 @@ U0 COCPop(CCmpCtrl *cc)
Free(COCPopNoFree(cc));
}
U0 COCAppend(CCmpCtrl *cc, CCodeCtrl *tempcbh)
U0 COCAppend(CCmpCtrl *cc, CCodeCtrl *tmpcbh)
{
if (tempcbh->coc_head.next!=&cc->coc.coc_head.next) {
cc->coc.coc_head.last->next=tempcbh->coc_head.next;
tempcbh->coc_head.next->last=cc->coc.coc_head.last;
cc->coc.coc_head.last=tempcbh->coc_head.last;
tempcbh->coc_head.last->next=&cc->coc.coc_head.next;
if (tmpcbh->coc_head.next!=&cc->coc.coc_head.next) {
cc->coc.coc_head.last->next=tmpcbh->coc_head.next;
tmpcbh->coc_head.next->last=cc->coc.coc_head.last;
cc->coc.coc_head.last=tmpcbh->coc_head.last;
tmpcbh->coc_head.last->next=&cc->coc.coc_head.next;
}
if (tempcbh->coc_next_misc!=&cc->coc.coc_next_misc) {
cc->coc.coc_last_misc->next=tempcbh->coc_next_misc;
tempcbh->coc_next_misc->last=cc->coc.coc_last_misc;
cc->coc.coc_last_misc=tempcbh->coc_last_misc;
tempcbh->coc_last_misc->next=&cc->coc.coc_next_misc;
if (tmpcbh->coc_next_misc!=&cc->coc.coc_next_misc) {
cc->coc.coc_last_misc->next=tmpcbh->coc_next_misc;
tmpcbh->coc_next_misc->last=cc->coc.coc_last_misc;
cc->coc.coc_last_misc=tmpcbh->coc_last_misc;
tmpcbh->coc_last_misc->next=&cc->coc.coc_next_misc;
}
Free(tempcbh);
Free(tmpcbh);
}
CCodeMisc *COCMiscNew(CCmpCtrl *cc,I64 ty)
@@ -228,16 +228,16 @@ U0 COCDel(CCmpCtrl *cc,CCodeCtrl *coc)
U0 COCHeaderPut(CCmpCtrl *cc,I64 pass,Bool put)
{
CIntermediateCode *tempi;
CIntermediateCode *tmpi;
if (Bt(&cc->flags,CCf_PASS_TRACE_PRESENT)) {
if (put) {
if (Bt(&cc->saved_pass_trace,pass-1)) {
"$$IV,1$$Pass %d:$$IV,0$$\n",pass-1;
tempi=cc->coc.coc_head.next;
while (tempi->ic_code) {
if (tempi->ic_flags&ICF_PASS_TRACE)
ICPut(cc,tempi);
tempi=tempi->next;
tmpi=cc->coc.coc_head.next;
while (tmpi->ic_code) {
if (tmpi->ic_flags&ICF_PASS_TRACE)
ICPut(cc,tmpi);
tmpi=tmpi->next;
}
}
} else if (Bt(&cc->saved_pass_trace,pass))
+333 -333
View File
File diff suppressed because it is too large. Load diff
+227 -227
View File
@@ -1,37 +1,37 @@
U0 PrsVarInit(CCmpCtrl *cc,U8 **_dst,CHashClass *tempc,CArrayDim *tempad,
U0 PrsVarInit(CCmpCtrl *cc,U8 **_dst,CHashClass *tmpc,CArrayDim *tmpad,
U8 *data_addr_ip,U8 **_base,Bool data_heap,I64 pass)
{
U8 *dst=*_dst,*machine_code;
I64 i,j,r,old_flags,type,size;
CMemberLst *tempm;
CIntermediateCode *tempi;
CMemberLst *tmpm;
CIntermediateCode *tmpi;
CAOTCtrl *aotc=cc->aotc;
CAOTAbsAddr *tempa;
CAOTImportExport *tempie;
CAOTAbsAddr *tmpa;
CAOTImportExport *tmpie;
Bool is_str;
tempc=OptClassFwd(tempc);
if (tempm=tempc->member_lst_and_root) {
tmpc=OptClassFwd(tmpc);
if (tmpm=tmpc->member_lst_and_root) {
if (cc->token!='{')
LexExcept(cc,"Expecting '{' at ");
LexPopNoRestore(cc);
LexPush(cc);
Lex(cc);
while (tempm) {
PrsVarInit2(cc,&dst,tempm->member_class,&tempm->dim,
while (tmpm) {
PrsVarInit2(cc,&dst,tmpm->member_class,&tmpm->dim,
data_addr_ip,_base,data_heap,pass);
if (cc->token==',')
Lex(cc);
tempm=tempm->next;
tmpm=tmpm->next;
}
LexPopNoRestore(cc);
if (cc->token!='}')
LexExcept(cc,"Missing '}' at ");
Lex(cc);
} else {
if (tempc->ptr_stars_cnt==1 &&
((tempc-1)->raw_type==RT_I8 || (tempc-1)->raw_type==RT_U8) &&
!tempad && cc->token==TK_STR)
if (tmpc->ptr_stars_cnt==1 &&
((tmpc-1)->raw_type==RT_I8 || (tmpc-1)->raw_type==RT_U8) &&
!tmpad && cc->token==TK_STR)
is_str=TRUE;
else
is_str=FALSE;
@@ -39,11 +39,11 @@ U0 PrsVarInit(CCmpCtrl *cc,U8 **_dst,CHashClass *tempc,CArrayDim *tempad,
LexPopNoRestore(cc);
machine_code=LexExtStr(cc,&i);
if (pass==2) {
tempa=CAlloc(sizeof(CAOTAbsAddr));
tempa->next=aotc->abss;
tempa->type=AAT_ADD_U64;
aotc->abss=tempa;
tempa->ip=data_addr_ip+dst-*_base;
tmpa=CAlloc(sizeof(CAOTAbsAddr));
tmpa->next=aotc->abss;
tmpa->type=AAT_ADD_U64;
aotc->abss=tmpa;
tmpa->ip=data_addr_ip+dst-*_base;
*dst(I64 *)=aotc->ip;
for (j=0;j<i;j++)
AOTStoreCodeU8(cc,machine_code[j]);
@@ -60,29 +60,29 @@ U0 PrsVarInit(CCmpCtrl *cc,U8 **_dst,CHashClass *tempc,CArrayDim *tempad,
cc->flags=cc->flags&~CCF_NO_ABSS|CCF_AOT_COMPILE;
Free(machine_code);
if (pass==2) {
MemSet(dst,0,tempc->size);
MemSet(dst,0,tmpc->size);
LexPopRestore(cc);
Lex(cc);
COCPush(cc);
COCInit(cc);
ICAdd(cc,IC_ABS_ADDR,data_addr_ip,tempc+1);
ICAdd(cc,IC_IMM_I64,dst-*_base,tempc+1);
ICAdd(cc,IC_ADD,0,tempc+1);
ICAdd(cc,IC_ABS_ADDR,data_addr_ip,tmpc+1);
ICAdd(cc,IC_IMM_I64,dst-*_base,tmpc+1);
ICAdd(cc,IC_ADD,0,tmpc+1);
if (!PrsExpression(cc,NULL,TRUE))
throw('Compiler');
tempi=cc->coc.coc_head.last;
if (tempi->ic_code==IC_END_EXP) {
tempi->ic_code=IC_NOP1;
tempi->ic_flags=0;
tmpi=cc->coc.coc_head.last;
if (tmpi->ic_code==IC_END_EXP) {
tmpi->ic_code=IC_NOP1;
tmpi->ic_flags=0;
}
ICAdd(cc,IC_ASSIGN,0,tempc);
ICAdd(cc,IC_END_EXP,0,tempc,ICF_RES_NOT_USED);
ICAdd(cc,IC_ASSIGN,0,tmpc);
ICAdd(cc,IC_END_EXP,0,tmpc,ICF_RES_NOT_USED);
ICAdd(cc,IC_RET,0,0);
if (machine_code=COCCompile(cc,&size,NULL,NULL)) {
tempie=CAlloc(sizeof(CAOTImportExport));
tempie->type=IET_MAIN;
tempie->ip=cc->aotc->ip;
QueIns(tempie,cc->aot->last_ie);
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->type=IET_MAIN;
tmpie->ip=cc->aotc->ip;
QueIns(tmpie,cc->aot->last_ie);
for (i=0;i<size;i++)
AOTStoreCodeU8(cc,machine_code[i]);
Free(machine_code);
@@ -99,15 +99,15 @@ U0 PrsVarInit(CCmpCtrl *cc,U8 **_dst,CHashClass *tempc,CArrayDim *tempad,
Free(machine_code);
if (type==RT_F64 &&
tempc->raw_type!=RT_F64)
tmpc->raw_type!=RT_F64)
r=r(F64);
else if (type!=RT_F64 &&
tempc->raw_type==RT_F64)
tmpc->raw_type==RT_F64)
r(F64)=r;
MemCpy(dst,&r,tempc->size);
MemCpy(dst,&r,tmpc->size);
}
}
dst+=tempc->size;
dst+=tmpc->size;
cc->flags=cc->flags&
~CCF_NO_ABSS|old_flags&(CCF_HAS_MISC_DATA|CCF_AOT_COMPILE);
}
@@ -120,23 +120,23 @@ class CVI2
U0 base;
};
U0 PrsVarInit2(CCmpCtrl *cc,U8 **_dst,CHashClass *tempc,
CArrayDim *tempad,U8 *data_addr_ip,U8 **_base,Bool data_heap,I64 pass)
U0 PrsVarInit2(CCmpCtrl *cc,U8 **_dst,CHashClass *tmpc,
CArrayDim *tmpad,U8 *data_addr_ip,U8 **_base,Bool data_heap,I64 pass)
{
I64 i,j,cnt;
U8 *st,*_b;
CVI2 head,*tempvi,*tempvi1;
CArrayDim *tempad1;
tempc=OptClassFwd(tempc);
if (tempad1=tempad->next) {
if (!tempc->ptr_stars_cnt &&
(tempc->raw_type==RT_I8 || tempc->raw_type==RT_U8) &&
CVI2 head,*tmpvi,*tmpvi1;
CArrayDim *tmpad1;
tmpc=OptClassFwd(tmpc);
if (tmpad1=tmpad->next) {
if (!tmpc->ptr_stars_cnt &&
(tmpc->raw_type==RT_I8 || tmpc->raw_type==RT_U8) &&
cc->token==TK_STR) {
LexPopNoRestore(cc);
st=LexExtStr(cc,&i);
if (tempad1->cnt<0) {//[]
tempad1->cnt=i;
tempad->total_cnt=i*tempad1->total_cnt;
if (tmpad1->cnt<0) {//[]
tmpad1->cnt=i;
tmpad->total_cnt=i*tmpad1->total_cnt;
Free(*_base);
if (data_heap)
*_base=MAlloc(i);
@@ -145,8 +145,8 @@ U0 PrsVarInit2(CCmpCtrl *cc,U8 **_dst,CHashClass *tempc,
MemCpy(*_base,st,i);
*_dst=*_base+i;
} else {
MemCpy(*_dst,st,tempad1->cnt);
*_dst+=tempad1->cnt;
MemCpy(*_dst,st,tmpad1->cnt);
*_dst+=tmpad1->cnt;
}
Free(st);
LexPush(cc);
@@ -156,41 +156,41 @@ U0 PrsVarInit2(CCmpCtrl *cc,U8 **_dst,CHashClass *tempc,
LexPush(cc);
Lex(cc);
}
if (tempad1->cnt<0) {//[]
if (tmpad1->cnt<0) {//[]
QueInit(&head);
cnt=0;
while (cc->token!='}') {
tempvi=MAlloc(offset(CVI2.base)+tempad1->total_cnt*tempc->size);
_b=&tempvi->base;
PrsVarInit2(cc,&_b,tempc,tempad1,data_addr_ip,_base,data_heap,pass);
QueIns(tempvi,head.last);
tmpvi=MAlloc(offset(CVI2.base)+tmpad1->total_cnt*tmpc->size);
_b=&tmpvi->base;
PrsVarInit2(cc,&_b,tmpc,tmpad1,data_addr_ip,_base,data_heap,pass);
QueIns(tmpvi,head.last);
if (cc->token==',')
Lex(cc);
cnt++;
}
Lex(cc); //skip '}'
tempad1->cnt=cnt;
tempad->total_cnt=cnt*tempad1->total_cnt;
j=tempad1->total_cnt*tempc->size;
tmpad1->cnt=cnt;
tmpad->total_cnt=cnt*tmpad1->total_cnt;
j=tmpad1->total_cnt*tmpc->size;
i=cnt*j;
Free(*_base);
if (data_heap)
*_base=_b=MAlloc(i);
else
*_base=_b=MAlloc(i,Fs->code_heap);
tempvi=head.next;
while (tempvi!=&head) {
tempvi1=tempvi->next;
MemCpy(_b,&tempvi->base,j);
tmpvi=head.next;
while (tmpvi!=&head) {
tmpvi1=tmpvi->next;
MemCpy(_b,&tmpvi->base,j);
_b+=j;
Free(tempvi);
tempvi=tempvi1;
Free(tmpvi);
tmpvi=tmpvi1;
}
*_dst=_b;
} else {
for (i=0;i<tempad1->cnt;i++) {
PrsVarInit2(cc,_dst,tempc,tempad1,data_addr_ip,_base,data_heap,pass);
if (tempad1->cnt>1 && cc->token==',')
for (i=0;i<tmpad1->cnt;i++) {
PrsVarInit2(cc,_dst,tmpc,tmpad1,data_addr_ip,_base,data_heap,pass);
if (tmpad1->cnt>1 && cc->token==',')
Lex(cc);
}
if (cc->token=='}')
@@ -198,42 +198,42 @@ U0 PrsVarInit2(CCmpCtrl *cc,U8 **_dst,CHashClass *tempc,
}
}
} else {
PrsVarInit(cc,_dst,tempc,tempad1,data_addr_ip,_base,data_heap,pass);
PrsVarInit(cc,_dst,tmpc,tmpad1,data_addr_ip,_base,data_heap,pass);
LexPush(cc);
}
}
U0 PrsGlblInit(CCmpCtrl *cc,CHashGlblVar *tempg,I64 pass)
U0 PrsGlblInit(CCmpCtrl *cc,CHashGlblVar *tmpg,I64 pass)
{
U8 *dst=tempg->data_addr;
PrsVarInit2(cc,&dst,tempg->var_class,&tempg->dim,
tempg->data_addr_ip,&tempg->data_addr,
U8 *dst=tmpg->data_addr;
PrsVarInit2(cc,&dst,tmpg->var_class,&tmpg->dim,
tmpg->data_addr_ip,&tmpg->data_addr,
Bt(&cc->opts,OPTf_GLBLS_ON_DATA_HEAP)||
Bt(&cc->flags,CCf_AOT_COMPILE),pass);
}
U0 PrsStaticInit(CCmpCtrl *cc,CMemberLst *tempm,I64 pass)
U0 PrsStaticInit(CCmpCtrl *cc,CMemberLst *tmpm,I64 pass)
{
U8 *machine_code,*dst=tempm->static_data;
CHashClass *tempc=tempm->member_class;
U8 *machine_code,*dst=tmpm->static_data;
CHashClass *tmpc=tmpm->member_class;
I64 i,size;
CAOTImportExport *tempie;
CAOTImportExport *tmpie;
if (cc->flags&CCF_AOT_COMPILE && pass==2) {
COCPush(cc);
COCInit(cc);
}
PrsVarInit2(cc,&dst,tempc,&tempm->dim,tempm->static_data_ip,
&tempm->static_data,Bt(&cc->flags,CCf_AOT_COMPILE),pass);
PrsVarInit2(cc,&dst,tmpc,&tmpm->dim,tmpm->static_data_ip,
&tmpm->static_data,Bt(&cc->flags,CCf_AOT_COMPILE),pass);
if (cc->flags&CCF_AOT_COMPILE && pass==2) {
if (cc->coc.coc_head.next!=&cc->coc.coc_head) {
ICAdd(cc,IC_RET,0,0);
if (machine_code=COCCompile(cc,&size,NULL,NULL)) {
if (pass==2) {
tempie=CAlloc(sizeof(CAOTImportExport));
tempie->type=IET_MAIN;
tempie->ip=cc->aotc->ip;
QueIns(tempie,cc->aot->last_ie);
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->type=IET_MAIN;
tmpie->ip=cc->aotc->ip;
QueIns(tmpie,cc->aot->last_ie);
for (i=0;i<size;i++)
AOTStoreCodeU8(cc,machine_code[i]);
}
@@ -247,13 +247,13 @@ U0 PrsStaticInit(CCmpCtrl *cc,CMemberLst *tempm,I64 pass)
Bool PrsArrayDims(CCmpCtrl *cc,I64 mode,CArrayDim *dim)
{//Returns false on empty []
//dim->next!=0 for array
CArrayDim *tempad,*tempad1;
CArrayDim *tmpad,*tmpad1;
I64 j;
Bool res=TRUE;
dim->next=NULL;
dim->cnt=0;
dim->total_cnt=1;
tempad1=&dim->next;
tmpad1=&dim->next;
if (cc->token=='[') {
if (mode.u8[1]==PRS1B_FUN_ARG)
LexExcept(cc,"No arrays in fun args at ");
@@ -265,17 +265,17 @@ Bool PrsArrayDims(CCmpCtrl *cc,I64 mode,CArrayDim *dim)
if ((j=LexExpressionI64(cc))<0)
LexExcept(cc,"Invalid array size at ");
}
tempad1=&dim->next;
while (tempad1->next) {
tempad1->next->total_cnt*=j;
tempad1=tempad1->next;
tmpad1=&dim->next;
while (tmpad1->next) {
tmpad1->next->total_cnt*=j;
tmpad1=tmpad1->next;
}
tempad=MAlloc(sizeof(CArrayDim));
tempad1->next=tempad;
tempad1=tempad;
tempad->next=NULL;
tempad->cnt=j;
tempad->total_cnt=1;
tmpad=MAlloc(sizeof(CArrayDim));
tmpad1->next=tmpad;
tmpad1=tmpad;
tmpad->next=NULL;
tmpad->cnt=j;
tmpad->total_cnt=1;
dim->total_cnt*=j;
if (cc->token!=']')
LexExcept(cc,"Missing ']' at ");
@@ -284,18 +284,18 @@ Bool PrsArrayDims(CCmpCtrl *cc,I64 mode,CArrayDim *dim)
return res;
}
CHashClass *PrsType(CCmpCtrl *cc,CHashClass **_tempc1,
I64 *_mode,CMemberLst *tempm,U8 **_ident,CHashFun **_fun_ptr,
CHashExport **_tempex,CArrayDim *tempad,I64 fsp_flags)
CHashClass *PrsType(CCmpCtrl *cc,CHashClass **_tmpc1,
I64 *_mode,CMemberLst *tmpm,U8 **_ident,CHashFun **_fun_ptr,
CHashExport **_tmpex,CArrayDim *tmpad,I64 fsp_flags)
{
I64 k,ptr_stars_cnt,mode=*_mode;
CHashClass *tempc1=*_tempc1,*tempc2;
CHashClass *tmpc1=*_tmpc1,*tmpc2;
CHashFun *fun_ptr=NULL;
CHashExport *tempex=NULL;
CArrayDim *tempad2;
CHashExport *tmpex=NULL;
CArrayDim *tmpad2;
pt_start:
if (!tempc1 || !(tempc1->type & (HTT_CLASS|HTT_INTERNAL_TYPE)))
if (!tmpc1 || !(tmpc1->type & (HTT_CLASS|HTT_INTERNAL_TYPE)))
LexExcept(cc,"Invalid class at ");
ptr_stars_cnt=0;
@@ -305,7 +305,7 @@ CHashClass *PrsType(CCmpCtrl *cc,CHashClass **_tempc1,
LexPush(cc);
}
Lex(cc);
tempc1++;
tmpc1++;
if (++ptr_stars_cnt>MAX_PTR_STARS)
LexExcept(cc,"Too many *'s at ");
}
@@ -313,10 +313,10 @@ CHashClass *PrsType(CCmpCtrl *cc,CHashClass **_tempc1,
k=PrsKeyWord(cc);
if (k==KW_UNION || k==KW_CLASS) {
Lex(cc);
tempc2=PrsClass(cc,k,fsp_flags,mode&255==PRS0_EXTERN);
tempc2->fwd_class=tempc1;
tempc1=tempc2;
if (_tempc1) *_tempc1=tempc1;
tmpc2=PrsClass(cc,k,fsp_flags,mode&255==PRS0_EXTERN);
tmpc2->fwd_class=tmpc1;
tmpc1=tmpc2;
if (_tmpc1) *_tmpc1=tmpc1;
mode=PRS0_NULL|PRS1_NULL;
goto pt_start;
}
@@ -334,7 +334,7 @@ CHashClass *PrsType(CCmpCtrl *cc,CHashClass **_tempc1,
if (_ident) {
if (cc->token==TK_IDENT) {
tempex=cc->hash_entry;
tmpex=cc->hash_entry;
*_ident=cc->cur_str;
cc->cur_str=NULL;
Lex(cc);
@@ -342,9 +342,9 @@ CHashClass *PrsType(CCmpCtrl *cc,CHashClass **_tempc1,
if (!mode.u8[1])
*_ident=NULL;
else if (cc->token==',' || cc->token==';' || cc->token==')') {
tempex=NULL;
tmpex=NULL;
*_ident=StrNew("_anon_");
tempm->flags|=MLF_NO_UNUSED_WARN;
tmpm->flags|=MLF_NO_UNUSED_WARN;
} else
LexExcept(cc,"Expecting identifier at ");
}
@@ -355,71 +355,71 @@ CHashClass *PrsType(CCmpCtrl *cc,CHashClass **_tempc1,
LexExcept(cc,"Missing ')' at ");
if (Lex(cc)!='(')
LexExcept(cc,"Expecting '(' at ");
fun_ptr=PrsFunJoin(cc,tempc1,NULL,fsp_flags)+ptr_stars_cnt;
tempc1=cmp.internal_types[RT_PTR]+ptr_stars_cnt;
fun_ptr=PrsFunJoin(cc,tmpc1,NULL,fsp_flags)+ptr_stars_cnt;
tmpc1=cmp.internal_types[RT_PTR]+ptr_stars_cnt;
}
if (!PrsArrayDims(cc,mode,tempad) && cc->token!='=') {
tempc1++;
tempad2=tempad->next->next;
Free(tempad->next);
tempad->next=tempad2;
if (!PrsArrayDims(cc,mode,tmpad) && cc->token!='=') {
tmpc1++;
tmpad2=tmpad->next->next;
Free(tmpad->next);
tmpad->next=tmpad2;
}
tempc2=OptClassFwd(tempc1);
if (tempc2->ptr_stars_cnt) {
tempc2-=tempc2->ptr_stars_cnt;
if (tempc2->type&HTT_INTERNAL_TYPE && !tempc2->size)
tmpc2=OptClassFwd(tmpc1);
if (tmpc2->ptr_stars_cnt) {
tmpc2-=tmpc2->ptr_stars_cnt;
if (tmpc2->type&HTT_INTERNAL_TYPE && !tmpc2->size)
LexWarn(cc,"use \"U8 *\" instead of \"U0 *\" at ");
}
if (_mode) *_mode=mode;
if (_fun_ptr) *_fun_ptr=fun_ptr;
if (_tempex) *_tempex=tempex;
return tempc1;
if (_tmpex) *_tmpex=tmpex;
return tmpc1;
}
U0 PrsDotDotDot(CCmpCtrl *cc,CHashFun *tempf,I64 _reg)
U0 PrsDotDotDot(CCmpCtrl *cc,CHashFun *tmpf,I64 _reg)
{
CMemberLst *tempm;
CArrayDim *tempad;
CMemberLst *tmpm;
CArrayDim *tmpad;
Bts(&tempf->flags,Ff_DOT_DOT_DOT);
Bts(&tmpf->flags,Ff_DOT_DOT_DOT);
Lex(cc);
tempm=MemberLstNew(_reg);
tempm->flags=MLF_DOT_DOT_DOT;
tempm->member_class=cmp.internal_types[RT_I64];
tempm->str=StrNew("argc");
tempm->offset=tempf->size;
tempm->size=8;
tempf->size+=8;
MemberAdd(cc,tempm,tempf,PRS1B_FUN_ARG);
tmpm=MemberLstNew(_reg);
tmpm->flags=MLF_DOT_DOT_DOT;
tmpm->member_class=cmp.internal_types[RT_I64];
tmpm->str=StrNew("argc");
tmpm->offset=tmpf->size;
tmpm->size=8;
tmpf->size+=8;
MemberAdd(cc,tmpm,tmpf,PRS1B_FUN_ARG);
tempm=MemberLstNew(_reg);
tempm->flags=MLF_DOT_DOT_DOT;
tempm->member_class=cmp.internal_types[RT_I64];
tempm->str=StrNew("argv");
tempm->dim.total_cnt=127; //arbitrary
tempm->dim.next=tempad=MAlloc(sizeof(CArrayDim));
tempad->next=NULL;
tempad->cnt=127; //arbitrary
tempad->total_cnt=1;
tempm->offset=tempf->size;
tempm->size=8; //Close enough
tempf->size+=8;//Close enough
MemberAdd(cc,tempm,tempf,PRS1B_FUN_ARG);
tmpm=MemberLstNew(_reg);
tmpm->flags=MLF_DOT_DOT_DOT;
tmpm->member_class=cmp.internal_types[RT_I64];
tmpm->str=StrNew("argv");
tmpm->dim.total_cnt=127; //arbitrary
tmpm->dim.next=tmpad=MAlloc(sizeof(CArrayDim));
tmpad->next=NULL;
tmpad->cnt=127; //arbitrary
tmpad->total_cnt=1;
tmpm->offset=tmpf->size;
tmpm->size=8; //Close enough
tmpf->size+=8;//Close enough
MemberAdd(cc,tmpm,tmpf,PRS1B_FUN_ARG);
if (cc->token==')')
Lex(cc);
}
U0 PrsVarLst(CCmpCtrl *cc,CHashClass *tempc,I64 mode,I64 union_base=0)
U0 PrsVarLst(CCmpCtrl *cc,CHashClass *tmpc,I64 mode,I64 union_base=0)
{
I64 i,k,old_flags=cc->flags,old_flags2,type,_reg;
CHashClass *tempc1,*tempc2;
CHash *temph;
CMemberLst *tempm;
CMemberLstMeta *temp_meta;
CHashClass *tmpc1,*tmpc2;
CHash *tmph;
CMemberLst *tmpm;
CMemberLstMeta *tmp_meta;
U8 *machine_code;
Bool undef_array_size,first;
cc->flags|=CCF_DONT_MAKE_RES;
@@ -434,18 +434,18 @@ U0 PrsVarLst(CCmpCtrl *cc,CHashClass *tempc,I64 mode,I64 union_base=0)
if (mode&PRSF_UNION)
cc->class_ip=union_base;
else
cc->class_ip=tempc->size;
cc->class_ip=tmpc->size;
while (cc->token=='$$') {
if (Lex(cc)!='=') //skip $$
LexExcept(cc,"Expecting '=' at ");
Lex(cc); //skip =
cc->class_ip=LexExpression(cc);
if (-cc->class_ip>tempc->neg_offset)
tempc->neg_offset=-cc->class_ip;
if (-cc->class_ip>tmpc->neg_offset)
tmpc->neg_offset=-cc->class_ip;
if (mode&PRSF_UNION)
union_base=cc->class_ip;
else
tempc->size=cc->class_ip;
tmpc->size=cc->class_ip;
if (cc->token!=';')
LexExcept(cc,"Missing ';' at");
Lex(cc); //skip ;
@@ -474,44 +474,44 @@ pvl_restart1:
}
if (cc->token==TK_ELLIPSIS && mode.u8[1]==PRS1B_FUN_ARG) {
PrsDotDotDot(cc,tempc,_reg);
PrsDotDotDot(cc,tmpc,_reg);
goto pvl_done;
}
if (cc->token==TK_IDENT)
temph=cc->hash_entry;
tmph=cc->hash_entry;
else
temph=NULL;
if (!temph)
tmph=NULL;
if (!tmph)
LexExcept(cc,"Expecting type at ");
k=PrsKeyWord(cc);
if (k==KW_UNION) {
Lex(cc);
PrsVarLst(cc,tempc,mode|PRSF_UNION,tempc->size);
PrsVarLst(cc,tmpc,mode|PRSF_UNION,tmpc->size);
} else {
if (!(temph->type & (HTT_CLASS|HTT_INTERNAL_TYPE)))
if (!(tmph->type & (HTT_CLASS|HTT_INTERNAL_TYPE)))
LexExcept(cc,"Expecting type at ");
first=TRUE;
pvl_restart2:
tempc1=temph;
tmpc1=tmph;
LexPush(cc);
Lex(cc); //skip type or ','
tempm=MemberLstNew(_reg);
tmpm=MemberLstNew(_reg);
_reg=REG_UNDEF;
if (mode.u8[1]==PRS1B_STATIC_LOCAL_VAR) {
tempm->flags|=MLF_STATIC;
tempm->reg=REG_NONE;
tmpm->flags|=MLF_STATIC;
tmpm->reg=REG_NONE;
}
if (mode.u8[1]==PRS1B_FUN_ARG || mode.u8[1]==PRS1B_LOCAL_VAR) {
pvl_restart3:
switch (PrsKeyWord(cc)) {
case KW_REG:
tempm->reg=REG_ALLOC;
tmpm->reg=REG_ALLOC;
LexPopNoRestore(cc);
LexPush(cc);
if (Lex(cc)==TK_IDENT) {
k=DefineMatch(cc->cur_str,"ST_U64_REGS");
if (k>=0) {
tempm->reg=k;
tmpm->reg=k;
LexPopNoRestore(cc);
LexPush(cc);
Lex(cc);
@@ -519,25 +519,25 @@ pvl_restart3:
}
goto pvl_restart3;
case KW_NOREG:
tempm->reg=REG_NONE;
tmpm->reg=REG_NONE;
LexPopNoRestore(cc);
LexPush(cc);
Lex(cc);
goto pvl_restart3;
}
}
tempm->member_class=PrsType(cc,&tempc1,&mode,tempm,&tempm->str,
&tempm->fun_ptr,NULL,&tempm->dim,0);
if (tempm->fun_ptr)
tempm->flags|=MLF_FUN;
tmpm->member_class=PrsType(cc,&tmpc1,&mode,tmpm,&tmpm->str,
&tmpm->fun_ptr,NULL,&tmpm->dim,0);
if (tmpm->fun_ptr)
tmpm->flags|=MLF_FUN;
if (first)
MemberAdd(cc,tempm,tempc,mode.u8[1]);
MemberAdd(cc,tmpm,tmpc,mode.u8[1]);
else
MemberAdd(cc,tempm,tempc,PRS1B_NULL);
tempc->member_cnt++;
MemberAdd(cc,tmpm,tmpc,PRS1B_NULL);
tmpc->member_cnt++;
tempc2=tempm->member_class;
i=tempc2->size*tempm->dim.total_cnt;
tmpc2=tmpm->member_class;
i=tmpc2->size*tmpm->dim.total_cnt;
switch (mode.u8[1]) {
case PRS1B_STATIC_LOCAL_VAR:
if (i<0) {
@@ -549,11 +549,11 @@ pvl_restart3:
LexExcept(cc,"Static unions are not implemented ");
k=(i+7)&~7;
if (cc->flags&CCF_AOT_COMPILE)
tempm->static_data=MAlloc(k);
tmpm->static_data=MAlloc(k);
else
tempm->static_data=MAlloc(k,Fs->code_heap);
tmpm->static_data=MAlloc(k,Fs->code_heap);
if (cc->flags&CCF_AOT_COMPILE) {
tempm->static_data_ip=cc->aotc->ip;
tmpm->static_data_ip=cc->aotc->ip;
k>>=3;
if (sys_var_init_flag) {
k<<=3;
@@ -564,7 +564,7 @@ pvl_restart3:
AOTStoreCodeU64(cc,0);
} else
if (sys_var_init_flag)
MemSet(tempm->static_data,sys_var_init_val,k);
MemSet(tmpm->static_data,sys_var_init_val,k);
LexPopNoRestore(cc);
if (cc->token=='=') {
cc->flags=cc->flags&
@@ -573,9 +573,9 @@ pvl_restart3:
LexPush(cc);
LexPush(cc);
Lex(cc); //skip =
PrsStaticInit(cc,tempm,1);
PrsStaticInit(cc,tmpm,1);
LexPopNoRestore(cc);
i=tempc2->size*tempm->dim.total_cnt;
i=tmpc2->size*tmpm->dim.total_cnt;
k=(i+7)&~7;
if (cc->flags&CCF_AOT_COMPILE) {
k>>=3;
@@ -588,40 +588,40 @@ pvl_restart3:
AOTStoreCodeU64(cc,0);
} else
if (sys_var_init_flag)
MemSet(tempm->static_data,sys_var_init_val,k);
MemSet(tmpm->static_data,sys_var_init_val,k);
LexPopRestore(cc);
}
LexPush(cc);
Lex(cc); //skip =
PrsStaticInit(cc,tempm,2);
PrsStaticInit(cc,tmpm,2);
LexPopNoRestore(cc);
if (cc->flags&CCF_AOT_COMPILE)
for (k=0;k<i;k++)
AOTStoreCodeU8At(cc,tempm->static_data_ip+k,
tempm->static_data[k]);
tempm->use_cnt=0;
AOTStoreCodeU8At(cc,tmpm->static_data_ip+k,
tmpm->static_data[k]);
tmpm->use_cnt=0;
cc->flags|=CCF_DONT_MAKE_RES;
}
if (cc->flags&CCF_AOT_COMPILE)
Free(tempm->static_data);
Free(tmpm->static_data);
break;
case PRS1B_LOCAL_VAR:
if (mode&PRSF_UNION) {
if (union_base-tempc->size<i)
i=union_base-i-tempc->size;
if (union_base-tmpc->size<i)
i=union_base-i-tmpc->size;
else
i=0;
}
if (i>=8)
tempc->size=(tempc->size-i)&~7;
tmpc->size=(tmpc->size-i)&~7;
else if (i>=4)
tempc->size=(tempc->size-i)&~3;
tmpc->size=(tmpc->size-i)&~3;
else if (i>=2)
tempc->size=(tempc->size-i)&~1;
tmpc->size=(tmpc->size-i)&~1;
else
tempc->size-=i;
tempm->offset=tempc->size;
tempm->size=i;
tmpc->size-=i;
tmpm->offset=tmpc->size;
tmpm->size=i;
if (cc->token=='=') {
cc->flags=cc->flags&~CCF_DONT_MAKE_RES|
old_flags&CCF_DONT_MAKE_RES;
@@ -629,25 +629,25 @@ pvl_restart3:
Lex(cc);
if (!PrsExpression(cc,NULL,TRUE))
throw('Compiler');
tempm->use_cnt=0;
tmpm->use_cnt=0;
cc->flags|=CCF_DONT_MAKE_RES;
} else
LexPopNoRestore(cc);
break;
case PRS1B_FUN_ARG:
if (mode&PRSF_UNION) {
tempm->offset=union_base;
if (tempc->size-union_base<8)
tempc->size=8+union_base;
tmpm->offset=union_base;
if (tmpc->size-union_base<8)
tmpc->size=8+union_base;
} else {
tempm->offset=tempc->size;
tempc->size+=8;
tmpm->offset=tmpc->size;
tmpc->size+=8;
}
tempm->size=8;
tmpm->size=8;
if (cc->token=='=') {
Lex(cc);
if (PrsKeyWord(cc)==KW_LASTCLASS) {
tempm->flags|=MLF_LASTCLASS;
tmpm->flags|=MLF_LASTCLASS;
Lex(cc);
} else {
old_flags2=cc->flags;
@@ -655,48 +655,48 @@ pvl_restart3:
machine_code=LexExpression2Bin(cc,&type);
if (!machine_code)
throw('Compiler');
tempm->dft_val=Call(machine_code);
tempc2=OptClassFwd(tempc2);
if (tempc2->raw_type==RT_F64) {
tmpm->dft_val=Call(machine_code);
tmpc2=OptClassFwd(tmpc2);
if (tmpc2->raw_type==RT_F64) {
if (type!=RT_F64)
tempm->dft_val(F64)=tempm->dft_val;
tmpm->dft_val(F64)=tmpm->dft_val;
} else {
if (type==RT_F64)
tempm->dft_val=tempm->dft_val(F64);
tmpm->dft_val=tmpm->dft_val(F64);
}
if (cc->flags & CCF_HAS_MISC_DATA) {
tempm->dft_val=StrNew(tempm->dft_val);
tempm->flags|=MLF_STR_DFT_AVAILABLE;
tmpm->dft_val=StrNew(tmpm->dft_val);
tmpm->flags|=MLF_STR_DFT_AVAILABLE;
}
Free(machine_code);
cc->flags|=old_flags2&CCF_HAS_MISC_DATA;
}
tempm->flags|=MLF_DFT_AVAILABLE;
tmpm->flags|=MLF_DFT_AVAILABLE;
}
LexPopNoRestore(cc);
break;
case PRS1B_CLASS:
if (mode&PRSF_UNION) {
tempm->offset=union_base;
if (tempc->size-union_base<i)
tempc->size=i+union_base;
tmpm->offset=union_base;
if (tmpc->size-union_base<i)
tmpc->size=i+union_base;
} else {
tempm->offset=tempc->size;
tempc->size+=i;
tmpm->offset=tmpc->size;
tmpc->size+=i;
}
tempm->size=i;
tmpm->size=i;
while (cc->token==TK_IDENT) {
temp_meta=MAlloc(sizeof(CMemberLstMeta));
temp_meta->next=tempm->meta;
tempm->meta=temp_meta;
temp_meta->str=cc->cur_str;
temp_meta->flags=0;
tmp_meta=MAlloc(sizeof(CMemberLstMeta));
tmp_meta->next=tmpm->meta;
tmpm->meta=tmp_meta;
tmp_meta->str=cc->cur_str;
tmp_meta->flags=0;
cc->cur_str=NULL;
if (Lex(cc)==TK_STR) {
temp_meta->user_data=LexExtStr(cc);
temp_meta->flags|=MLMF_IS_STR;
tmp_meta->user_data=LexExtStr(cc);
tmp_meta->flags|=MLMF_IS_STR;
} else
temp_meta->user_data=LexExpression(cc);
tmp_meta->user_data=LexExpression(cc);
}
LexPopNoRestore(cc);
break;
+86 -86
View File
@@ -1,55 +1,55 @@
I64 InstEntriesCompare(CInst *tempi1,CInst *tempi2)
I64 InstEntriesCompare(CInst *tmpins1,CInst *tmpins2)
{
I64 i1,i2,j=0,res=0,oc_cnt1=tempi1->opcode_cnt,oc_cnt2=tempi2->opcode_cnt;
if (tempi1->flags&IEF_STI_LIKE)
I64 i1,i2,j=0,res=0,oc_cnt1=tmpins1->opcode_cnt,oc_cnt2=tmpins2->opcode_cnt;
if (tmpins1->flags&IEF_STI_LIKE)
oc_cnt1--;
if (tempi2->flags&IEF_STI_LIKE)
if (tmpins2->flags&IEF_STI_LIKE)
oc_cnt2--;
while (TRUE) {
if (j<oc_cnt1 && j<oc_cnt2) {
if (res=tempi1->opcode[j]-tempi2->opcode[j])
if (res=tmpins1->opcode[j]-tmpins2->opcode[j])
return res;
j++;
} else {
if (res=oc_cnt1-oc_cnt2)
return res;
if (tempi1->flags&IEF_STI_LIKE && tempi2->flags&IEF_STI_LIKE)
return tempi1->opcode[j]-tempi2->opcode[j];
if (tmpins1->flags&IEF_STI_LIKE && tmpins2->flags&IEF_STI_LIKE)
return tmpins1->opcode[j]-tmpins2->opcode[j];
if (res=tempi1->flags&IEF_STI_LIKE - tempi2->flags&IEF_STI_LIKE)
if (res=tmpins1->flags&IEF_STI_LIKE - tmpins2->flags&IEF_STI_LIKE)
return res;
if (res=tempi1->slash_val-tempi2->slash_val)
if (res=tmpins1->slash_val-tmpins2->slash_val)
return res;
if (res=tempi1->flags&IEF_OP_SIZE32 - tempi2->flags&IEF_OP_SIZE32)
if (res=tmpins1->flags&IEF_OP_SIZE32 - tmpins2->flags&IEF_OP_SIZE32)
return res;
i1=Bt(&uasm.ins64_arg_mask,tempi1->arg1) ||
Bt(&uasm.ins64_arg_mask,tempi1->arg2);
i2=Bt(&uasm.ins64_arg_mask,tempi2->arg1) ||
Bt(&uasm.ins64_arg_mask,tempi2->arg2);
i1=Bt(&uasm.ins64_arg_mask,tmpins1->arg1) ||
Bt(&uasm.ins64_arg_mask,tmpins1->arg2);
i2=Bt(&uasm.ins64_arg_mask,tmpins2->arg1) ||
Bt(&uasm.ins64_arg_mask,tmpins2->arg2);
if (res=i1-i2)
return res;
if (res=tempi1->flags&IEF_48_REX - tempi2->flags&IEF_48_REX)
if (res=tmpins1->flags&IEF_48_REX - tmpins2->flags&IEF_48_REX)
return res;
i1=tempi1->arg2==ARGT_IMM64 || tempi1->arg2==ARGT_UIMM64;
i2=tempi2->arg2==ARGT_IMM64 || tempi2->arg2==ARGT_UIMM64;
i1=tmpins1->arg2==ARGT_IMM64 || tmpins1->arg2==ARGT_UIMM64;
i2=tmpins2->arg2==ARGT_IMM64 || tmpins2->arg2==ARGT_UIMM64;
return i1-i2;
}
}
}
/*
U0 DumpUAsmIns(CInst *tempi)
U0 DumpUAsmIns(CInst *tmpins)
{
CHashOpcode *tempo=tempi(U8 *)-tempi->ins_entry_num*sizeof(CInst)
CHashOpcode *tmpo=tmpins(U8 *)-tmpins->ins_entry_num*sizeof(CInst)
-offset(CHashOpcode.ins);
"%10s:%02d,%02d SV:%02d\n",tempo->str,
tempi->arg1,tempi->arg2,tempi->slash_val;
"%10s:%02d,%02d SV:%02d\n",tmpo->str,
tmpins->arg1,tmpins->arg2,tmpins->slash_val;
}
U0 DumpUAsmTables()
{
@@ -66,7 +66,7 @@ U0 DumpUAsmTables()
CInst *InstEntryFind(U8 *ip,I64 opsize,I64 seg_size)
{//Binary Search
I64 i,j,n,m,k,a1,a2,o1,o2,oc_cnt;
CInst *tempi,**table;
CInst *tmpins,**table;
i=0;
if (seg_size==64) {
table=uasm.table_64;
@@ -77,50 +77,50 @@ CInst *InstEntryFind(U8 *ip,I64 opsize,I64 seg_size)
}
while (TRUE) {
k=(i+j)>>1; //binary search
tempi=table[k];
//DumpUAsmIns(tempi);
tmpins=table[k];
//DumpUAsmIns(tmpins);
m=0;
n=0;
while (TRUE) { //ief_compare_start
a1=tempi->arg1;
a2=tempi->arg2;
oc_cnt=tempi->opcode_cnt;
if (tempi->flags&IEF_STI_LIKE)
a1=tmpins->arg1;
a2=tmpins->arg2;
oc_cnt=tmpins->opcode_cnt;
if (tmpins->flags&IEF_STI_LIKE)
oc_cnt--;
if (n<oc_cnt) {
o1=ip[n];
if (n==tempi->opcode_cnt-1 && tempi->flags & IEF_PLUS_OPCODE)
if (n==tmpins->opcode_cnt-1 && tmpins->flags & IEF_PLUS_OPCODE)
o1&=-8;
o2=tempi->opcode[n++];
o2=tmpins->opcode[n++];
if (m=o1-o2)
goto ief_compare_done;
} else
switch [tempi->uasm_slash_val] {
switch [tmpins->uasm_slash_val] {
case 0...7:
if (!(m=ip[n]>>3&7-tempi->slash_val)) {
if (!(m=ip[n]>>3&7-tmpins->slash_val)) {
if ((Bt(&uasm.mem_arg_mask,a1) || Bt(&uasm.mem_arg_mask,a2)) &&
ip[n]&0xC0==0xC0) {
m=1;
goto ief_compare_done;
}
if (opsize==16) {
if (tempi->flags & IEF_OP_SIZE32) {
if (tmpins->flags & IEF_OP_SIZE32) {
m=-1;
goto ief_compare_done;
}
} else {
if (tempi->flags & IEF_OP_SIZE16) {
if (tmpins->flags & IEF_OP_SIZE16) {
m=1;
goto ief_compare_done;
}
}
if (opsize==64||a1==ARGT_M64||a2==ARGT_M64) {
if (!Bt(&uasm.ins64_arg_mask,a1)&&
!Bt(&uasm.ins64_arg_mask,a2)&&!(tempi->flags&IEF_48_REX))
!Bt(&uasm.ins64_arg_mask,a2)&&!(tmpins->flags&IEF_48_REX))
m=1;
} else {
if (Bt(&uasm.ins64_arg_mask,a1)||Bt(&uasm.ins64_arg_mask,a2) ||
tempi->flags&IEF_48_REX)
tmpins->flags&IEF_48_REX)
m=-1;
}
} else if ((Bt(&uasm.mem_arg_mask,a1)||Bt(&uasm.mem_arg_mask,a2)) &&
@@ -128,39 +128,39 @@ CInst *InstEntryFind(U8 *ip,I64 opsize,I64 seg_size)
m=1;
goto ief_compare_done;
case SV_I_REG:
m=ip[n]>>3-tempi->opcode[tempi->opcode_cnt-1]>>3;
m=ip[n]>>3-tmpins->opcode[tmpins->opcode_cnt-1]>>3;
goto ief_compare_done;
case SV_STI_LIKE:
if (!(m=ip[n]>>3-tempi->opcode[tempi->opcode_cnt-1]>>3))
m=ip[n]-tempi->opcode[tempi->opcode_cnt-1];
if (!(m=ip[n]>>3-tmpins->opcode[tmpins->opcode_cnt-1]>>3))
m=ip[n]-tmpins->opcode[tmpins->opcode_cnt-1];
goto ief_compare_done;
case SV_R_REG:
case SV_NONE:
m=0;
if (opsize==16) {
if (tempi->flags & IEF_OP_SIZE32) {
if (tmpins->flags & IEF_OP_SIZE32) {
m=-1;
goto ief_compare_done;
}
} else {
if (tempi->flags & IEF_OP_SIZE16) {
if (tmpins->flags & IEF_OP_SIZE16) {
m=1;
goto ief_compare_done;
}
}
if (opsize==64 || a1==ARGT_M64 || a2==ARGT_M64) {
if (!Bt(&uasm.ins64_arg_mask,a1) &&!Bt(&uasm.ins64_arg_mask,a2) &&
!(tempi->flags&IEF_48_REX)&& !(a2==ARGT_NONE &&
!(tmpins->flags&IEF_48_REX)&& !(a2==ARGT_NONE &&
(ARGT_UIMM8<=a1<=ARGT_UIMM64 || ARGT_IMM8<=a1<=ARGT_IMM64)))
m=1;
else if (tempi->arg2==ARGT_IMM64 || tempi->arg2==ARGT_UIMM64) {
else if (tmpins->arg2==ARGT_IMM64 || tmpins->arg2==ARGT_UIMM64) {
if (a2!=ARGT_IMM64&&a2!=ARGT_UIMM64)
m=1;
} else if (a2==ARGT_IMM64||a2==ARGT_UIMM64)
m=-1;
} else {
if (Bt(&uasm.ins64_arg_mask,a1) || Bt(&uasm.ins64_arg_mask,a2) ||
tempi->flags&IEF_48_REX)
tmpins->flags&IEF_48_REX)
m=-1;
}
goto ief_compare_done;
@@ -187,8 +187,8 @@ ief_compare_done:
U0 UAsmHashLoad()
{
CHashOpcode *temph;
CInst *tempi;
CHashOpcode *tmph;
CInst *tmpins;
I64 i,j1,j2,k;
uasm.ins64_arg_mask=0x0880888880+1<<ARGT_ST0+1<<ARGT_STI;
@@ -198,18 +198,18 @@ U0 UAsmHashLoad()
uasm.table_16_32_entries=uasm.table_64_entries=0;
for (i=0;i<=cmp.asm_hash->mask;i++) {
temph=cmp.asm_hash->body[i];
while (temph) {
if (temph->type==HTT_OPCODE && !(temph->oc_flags&OCF_ALIAS)) {
tempi=&temph->ins;
for (k=0;k<temph->inst_entry_cnt;k++) {
tmph=cmp.asm_hash->body[i];
while (tmph) {
if (tmph->type==HTT_OPCODE && !(tmph->oc_flags&OCF_ALIAS)) {
tmpins=&tmph->ins;
for (k=0;k<tmph->inst_entry_cnt;k++) {
uasm.table_16_32_entries++;
if (!(tempi->flags&IEF_NOT_IN_64_BIT))
if (!(tmpins->flags&IEF_NOT_IN_64_BIT))
uasm.table_64_entries++;
tempi++;
tmpins++;
}
}
temph=temph->next;
tmph=tmph->next;
}
}
@@ -217,18 +217,18 @@ U0 UAsmHashLoad()
uasm.table_16_32=MAlloc(uasm.table_16_32_entries*sizeof(U8 *));
uasm.table_64 =MAlloc(uasm.table_64_entries *sizeof(U8 *));
for (i=0;i<=cmp.asm_hash->mask;i++) {
temph=cmp.asm_hash->body[i];
while (temph) {
if (temph->type==HTT_OPCODE && !(temph->oc_flags&OCF_ALIAS)) {
tempi=&temph->ins;
for (k=0;k<temph->inst_entry_cnt;k++) {
uasm.table_16_32[j1++]=tempi;
if (!(tempi->flags&IEF_NOT_IN_64_BIT))
uasm.table_64[j2++]=tempi;
tempi++;
tmph=cmp.asm_hash->body[i];
while (tmph) {
if (tmph->type==HTT_OPCODE && !(tmph->oc_flags&OCF_ALIAS)) {
tmpins=&tmph->ins;
for (k=0;k<tmph->inst_entry_cnt;k++) {
uasm.table_16_32[j1++]=tmpins;
if (!(tmpins->flags&IEF_NOT_IN_64_BIT))
uasm.table_64[j2++]=tmpins;
tmpins++;
}
}
temph=temph->next;
tmph=tmph->next;
}
}
QSortI64(uasm.table_16_32,uasm.table_16_32_entries,&InstEntriesCompare);
@@ -243,8 +243,8 @@ U0 Ui(U8 *buf,U8 **_ip,I64 seg_size=64,I64 *_jmp_dst=NULL,Bool just_ins=FALSE)
ModrM=-1,SIB=-1,scale,r1,r2,
Mod=-1,RM1=-1,RM2=-1,REX=-1,REX_r=0,REX_x=0,REX_b=0;
Bool cont;
CInst *tempi,*tempi2;
CHashOpcode *tempo;
CInst *tmpins,*tmpins2;
CHashOpcode *tmpo;
U8 *ip=*_ip,*ptr,*reloced_a1_st,*reloced_a2_st,
*bin_data_area1,*bin_data_area2,
line1[512],line2[512],buf2[512],a1_st[512],a2_st[512],seg_overrides[32];
@@ -325,41 +325,41 @@ U0 Ui(U8 *buf,U8 **_ip,I64 seg_size=64,I64 *_jmp_dst=NULL,Bool just_ins=FALSE)
break;
}
tempi=InstEntryFind(ip,opsize,seg_size);
tmpins=InstEntryFind(ip,opsize,seg_size);
if (opsize==32 && seg_size==64) {
tempi2=InstEntryFind(ip,64,seg_size);
if (tempi2!=tempi && tempi2->flags&IEF_REX_ONLY_R8_R15 ||
tempi2->flags&IEF_REX_XOR_LIKE&& ip[1]>>3&7==ip[1]&7)
tempi=tempi2;
tmpins2=InstEntryFind(ip,64,seg_size);
if (tmpins2!=tmpins && tmpins2->flags&IEF_REX_ONLY_R8_R15 ||
tmpins2->flags&IEF_REX_XOR_LIKE&& ip[1]>>3&7==ip[1]&7)
tmpins=tmpins2;
}
ip+=tempi->opcode_cnt;
tempo=tempi(U8 *)-tempi->ins_entry_num*sizeof(CInst)
ip+=tmpins->opcode_cnt;
tmpo=tmpins(U8 *)-tmpins->ins_entry_num*sizeof(CInst)
-offset(CHashOpcode.ins);
if (just_ins)
*line1=0;
CatPrint(line1,tempo->str);
CatPrint(line1,tmpo->str);
a1=tempi->arg1;
a2=tempi->arg2;
a1=tmpins->arg1;
a2=tmpins->arg2;
if (a1_size=tempi->size1) {
if (a1_size=tmpins->size1) {
if (Bt(&uasm.signed_arg_mask,a1))
CatPrint(a1_st,"I%d ",a1_size);
else
CatPrint(a1_st,"U%d ",a1_size);
}
if (a2_size=tempi->size2) {
if (a2_size=tmpins->size2) {
if (Bt(&uasm.signed_arg_mask,a2))
CatPrint(a2_st,"I%d ",a2_size);
else
CatPrint(a2_st,"U%d ",a2_size);
}
if (tempi->flags & IEF_PLUS_OPCODE) {
if (tmpins->flags & IEF_PLUS_OPCODE) {
ip--;
RM1=*ip++ - tempi->opcode[tempi->opcode_cnt-1]+REX_b;
RM1=*ip++ - tmpins->opcode[tmpins->opcode_cnt-1]+REX_b;
ptr=NULL;
if (ARGT_R8<=a1<=ARGT_R64) {
if (a1_size==8) {
@@ -424,7 +424,7 @@ U0 Ui(U8 *buf,U8 **_ip,I64 seg_size=64,I64 *_jmp_dst=NULL,Bool just_ins=FALSE)
disp=*ip(U32 *)++;
CatPrint(reloced_a1_st,"%08X",disp);
}
if (tempi->slash_val<8)
if (tmpins->slash_val<8)
RM2=-1;
else {
ptr=NULL;
@@ -522,7 +522,7 @@ U0 Ui(U8 *buf,U8 **_ip,I64 seg_size=64,I64 *_jmp_dst=NULL,Bool just_ins=FALSE)
case ARGT_UIMM8:
imm=*ip(U8 *)++;
CatPrint(a1_st,"%02X",imm);
if (tempi->opcode[0]==0xCD && (ptr=DefineSub(imm,"ST_INT_NAMES")))
if (tmpins->opcode[0]==0xCD && (ptr=DefineSub(imm,"ST_INT_NAMES")))
CatPrint(a1_st," %s",ptr);
break;
case ARGT_IMM16:
@@ -549,7 +549,7 @@ U0 Ui(U8 *buf,U8 **_ip,I64 seg_size=64,I64 *_jmp_dst=NULL,Bool just_ins=FALSE)
break;
end:
disp+=ip;
if (IsDbg)
if (IsDbgMode)
CatPrint(a1_st,"%p ",disp);
else if (PutSrcLink(disp,512,buf2))
CatPrint(a1_st,"%s ",buf2);
@@ -574,7 +574,7 @@ U0 Ui(U8 *buf,U8 **_ip,I64 seg_size=64,I64 *_jmp_dst=NULL,Bool just_ins=FALSE)
break;
case ARGT_STI:
ip--;
CatPrint(a1_st,"%Z",*ip++ - tempi->opcode[tempi->opcode_cnt-1],
CatPrint(a1_st,"%Z",*ip++ - tmpins->opcode[tmpins->opcode_cnt-1],
"ST_FSTK_REGS");
break;
}
@@ -613,11 +613,11 @@ U0 Ui(U8 *buf,U8 **_ip,I64 seg_size=64,I64 *_jmp_dst=NULL,Bool just_ins=FALSE)
break;
case ARGT_STI:
ip--;
CatPrint(a2_st,"%Z",*ip++ -tempi->opcode[tempi->opcode_cnt-1],
CatPrint(a2_st,"%Z",*ip++ -tmpins->opcode[tmpins->opcode_cnt-1],
"ST_FSTK_REGS");
break;
}
if (tempi->flags&IEF_ENDING_ZERO)
if (tmpins->flags&IEF_ENDING_ZERO)
ip++;
if (*a1_st)