hschumann2/TempleOS-Source-Code
0838
1 2U0 OptPass3(CCmpCtrl *cc,COptReg *reg_offsets)3{4 CHashClass *tmpc,*tmpc1,*tmpc2;5 CCodeMisc *lb;6 CIntermediateCode *tmpi,*tmpi1,*tmpi2,*tmpi_next,7 *tmpil1,*tmpil2;8 I64 code,i,j,l,member_cnt,used_reg_mask=0;9 CMemberLst *tmpm;10 COptMemberVar *mv=NULL;11 CAOT *tmpaot;12 CAOTImportExport *tmpie;13 CPrsStk *ps=cc->ps;14 ps->ptr=0;15 ps->ptr2=0;16 17 for (i=0;i<REG_REGS_NUM;i++) {18 reg_offsets[i].offset=I64_MAX;19 reg_offsets[i].m=NULL;20 }21 if (cc->htc.fun) {22 member_cnt=cc->htc.fun->member_cnt;23 if (Bt(&cc->htc.fun->flags,Ff_DOT_DOT_DOT))24 member_cnt+=2;25 mv=CAlloc(member_cnt*sizeof(COptMemberVar));26 member_cnt=0;27 tmpm=cc->htc.fun->member_lst_and_root;28 while (tmpm) {29 tmpc=OptClassFwd(tmpm->member_class);30 if (0<=tmpm->reg<REG_REGS_NUM) {31 if (Bts(&used_reg_mask,tmpm->reg))32 PrintWarn("Reg in use\n $LK,\"FL:%s,%d\"$ '%s' in '%s'\n",33 cc->lex_include_stk->full_name,34 cc->lex_include_stk->line_num,tmpm->str,cc->htc.fun->str);35 reg_offsets[tmpm->reg].offset=tmpm->offset;36 reg_offsets[tmpm->reg].m=tmpm;37 } else if (tmpc->raw_type!=RT_F64 && tmpm->reg!=REG_NONE ||38 tmpm->reg==REG_ALLOC) {39 if (tmpm->reg==REG_ALLOC)40 mv[member_cnt].score=I64_MAX/2; //big but not too big41 mv[member_cnt].offset_start=tmpm->offset;42 mv[member_cnt].offset_end=tmpm->offset+MaxI64(1,tmpm->size);43 mv[member_cnt++].m=tmpm;44 } else if (tmpm->reg==REG_ALLOC)45 PrintWarn("Can't reg var\n $LK,\"FL:%s,%d\"$ '%s' in '%s'\n",46 cc->lex_include_stk->full_name,47 cc->lex_include_stk->line_num,tmpm->str,cc->htc.fun->str);48 tmpm=tmpm->next;49 }50 } else51 member_cnt=0;52 53 tmpi=cc->coc.coc_head.next;54 while (code=tmpi->ic_code) {55 tmpi_next=tmpi->next;56 if (code==IC_NOP1)57 OptFree(tmpi);58 else {59 if (tmpil1=OptLag(tmpi)) {60 if (!(tmpil2=OptLag(tmpil1)))61 tmpil2=&cmp.ic_nop;62 } else63 tmpil1=tmpil2=&cmp.ic_nop;64 tmpc=tmpi->ic_class;65 switch [intermediate_code_table[code].arg_cnt] {66 case IS_V_ARG:67 ps->ptr-=tmpi->ic_data>>3;68 break;69 case IS_2_ARG:70 tmpi2=PrsPop(ps);71 if (tmpi2->ic_flags&ICF_RES_TO_F64)72 tmpc2=cmp.internal_types[RT_F64];73 else if (tmpi2->ic_flags & ICF_RES_TO_INT)74 tmpc2=cmp.internal_types[RT_I64];75 else76 tmpc2=tmpi->t.arg2_class;77 tmpi->arg2.type=MDF_STK+CmpRawType(tmpc2);78 tmpi->ic_flags|=ICF_ARG2_WAS_STK;79 case IS_1_ARG:80 tmpi1=PrsPop(ps);81 if (tmpi1->ic_flags&ICF_RES_TO_F64)82 tmpc1=cmp.internal_types[RT_F64];83 else if (tmpi1->ic_flags & ICF_RES_TO_INT)84 tmpc1=cmp.internal_types[RT_I64];85 else86 tmpc1=tmpi->t.arg1_class;87 tmpi->arg1.type=MDF_STK+CmpRawType(tmpc1);88 tmpi->arg1_type_pointed_to=CmpRawTypePointed(tmpc1);89 tmpi->ic_flags|=ICF_ARG1_WAS_STK;90 break;91 case IS_0_ARG: //nobound switch92 break;93 }94 if (intermediate_code_table[code].res_cnt) {95 tmpi->res.type=MDF_STK+CmpRawType(tmpc);96 tmpi->ic_flags|=ICF_RES_WAS_STK;97 PrsPush(ps,tmpi);98 }99 switch [code] {100 case IC_IMM_F64:101 tmpi->ic_flags&=~ICF_RES_TO_F64;102 if (tmpi->ic_flags&ICF_RES_TO_INT) {103 tmpi->ic_data=ToI64(tmpi->ic_data(F64));104 tmpi->ic_flags&=~ICF_RES_TO_INT;105 tmpi->ic_code=IC_IMM_I64;106 }107 break;108 case IC_IMM_I64:109 tmpi->ic_flags&=~ICF_RES_TO_INT;110 if (tmpi->ic_flags&ICF_RES_TO_F64) {111 tmpi->ic_data(F64)=ToF64(tmpi->ic_data);112 tmpi->ic_flags&=~ICF_RES_TO_F64;113 tmpi->ic_code=IC_IMM_F64;114 }115 break;116 case IC_RBP:117 tmpi->ic_code=IC_REG;118 tmpi->arg1.reg=REG_RBP;119 break;120 case IC_DEREF:121 tmpi->arg1_type_pointed_to=tmpi->res.type.raw_type;122 if (tmpi1->ic_code==IC_LEA) {123 tmpi->ic_flags|=tmpi1->ic_flags;124 tmpi->arg1.reg=tmpi1->arg1.reg;125 tmpi->arg1.disp=tmpi1->arg1.disp;126 tmpi->arg1.type=MDF_DISP+tmpi->res.type.raw_type;127 tmpi->arg1_type_pointed_to=CmpRawTypePointed(tmpc);128 tmpi->ic_code=IC_MOV;129 OptFree(tmpi1);130 if (tmpi->arg1.reg==REG_RBP)131 for (i=0;i<member_cnt;i++)132 if (mv[i].offset_start==tmpi->arg1.disp) {133 mv[i].lea_balance--;134 mv[i].score++;135 break;136 }137 } else if (tmpil1->ic_code==IC_ADD_CONST) {138 if (tmpil2->ic_code==IC_REG) {139 tmpi->ic_flags|=tmpil2->ic_flags|tmpil1->ic_flags;140 tmpi->arg1.reg=tmpil2->arg1.reg;141 tmpi->arg1.disp=tmpi->ic_data;142 tmpi->arg1.type=MDF_DISP+tmpi->res.type.raw_type;143 tmpi->arg1_type_pointed_to=CmpRawTypePointed(tmpc);144 tmpi->ic_code=IC_MOV;145 OptFree(tmpil2);146 OptFree(tmpil1);147 }148 }149 break;150 case IC__PP:151 case IC__MM:152 case IC_PP_:153 case IC_MM_:154 CmpMinTypePointed(tmpi,CmpRawTypePointed(tmpi->t.arg1_class));155 case IC_DEREF_PP:156 case IC_DEREF_MM:157 if (tmpi1->ic_code==IC_LEA && tmpi1->arg1.type&MDF_DISP &&158 tmpi1->arg1.reg==REG_RBP)159 for (i=0;i<member_cnt;i++)160 if (mv[i].offset_start==tmpi1->arg1.disp) {161 mv[i].lea_balance--;162 mv[i].score++;163 break;164 }165 tmpi->arg1_type_pointed_to=tmpi->res.type.raw_type;166 break;167 case IC_MUL:168 case IC_DIV:169 if (tmpc->raw_type==RT_F64) {170 CmpF2PushPop(tmpi,tmpi1,tmpi2);171 break;172 }173 break;174 case IC_ADD:175 if (tmpc->raw_type==RT_F64) {176 CmpF2PushPop(tmpi,tmpi1,tmpi2);177 break;178 }179 if (OptFixupBinaryOp2(&tmpi1,&tmpi2)) {180 tmpi->ic_flags|=tmpi1->ic_flags;181 if (tmpi->t.arg1_tree!=tmpi2)182 tmpi->t.arg1_class=tmpi->t.arg2_class;183 tmpi->ic_data=tmpi1->ic_data;184 tmpi->ic_code=IC_ADD_CONST;185 tmpi->arg1_type_pointed_to=tmpi->res.type.raw_type;186 tmpi->arg2.type=MDF_NULL;187 OptFree(tmpi1);188 if (tmpil2->ic_code==IC_REG && tmpil2->arg1.reg==REG_RBP) {189 tmpi->ic_flags|=tmpil2->ic_flags;190 tmpi->ic_code=IC_LEA;191 tmpi->arg1.reg=REG_RBP;192 tmpi->arg1.type=MDF_DISP+tmpi->arg1.type.raw_type;193 tmpi->arg1.disp=tmpi->ic_data;194 for (i=0;i<member_cnt;i++)195 if (mv[i].offset_start<=tmpi->ic_data<mv[i].offset_end) {196 mv[i].lea_balance++;197 mv[i].score++;198 break;199 }200 OptFree(tmpil2);201 }202 }203 break;204 case IC_SUB:205 if (tmpc->raw_type==RT_F64) {206 CmpF2PushPop(tmpi,tmpi1,tmpi2);207 break;208 }209 if (tmpi2->ic_code==IC_IMM_I64) {210 tmpi->ic_flags|=tmpi2->ic_flags;211 tmpi->ic_data=tmpi2->ic_data;212 tmpi->ic_code=IC_SUB_CONST;213 tmpi->arg2.type=MDF_NULL;214 OptFree(tmpi2);215 }216 break;217 case IC_LESS:218 case IC_GREATER_EQU:219 case IC_GREATER:220 case IC_LESS_EQU:221 if (tmpi->ic_flags&ICF_USE_F64)222 CmpF2PushPop(tmpi,tmpi1,tmpi2);223 break;224 case IC_MUL_EQU:225 case IC_DIV_EQU:226 case IC_ADD_EQU:227 case IC_SUB_EQU:228 if (tmpc->raw_type==RT_F64)229 CmpF1PushPop(tmpi,tmpi2);230 case IC_ASSIGN_PP:231 case IC_ASSIGN_MM:232 case IC_ASSIGN:233 case IC_SHL_EQU:234 case IC_SHR_EQU:235 case IC_MOD_EQU:236 case IC_AND_EQU:237 case IC_OR_EQU:238 case IC_XOR_EQU:239 if (tmpi1->ic_code==IC_LEA && tmpi1->arg1.type&MDF_DISP &&240 tmpi1->arg1.reg==REG_RBP)241 for (i=0;i<member_cnt;i++)242 if (mv[i].offset_start==tmpi1->arg1.disp) {243 mv[i].lea_balance--;244 mv[i].score++;245 break;246 }247 tmpi->arg1_type_pointed_to=tmpi->res.type.raw_type;248 CmpMinTypePointed(tmpi,CmpRawTypePointed(tmpi->t.arg1_class));249 break;250 case IC_RETURN_VAL:251 case IC_RETURN_VAL2:252 if (tmpc) {253 if (tmpc->raw_type==RT_F64 && tmpil1->ic_class->raw_type!=RT_F64)254 tmpil1->ic_flags|=ICF_RES_TO_F64;255 else if (tmpc->raw_type!=RT_F64 &&256 tmpil1->ic_class->raw_type==RT_F64)257 tmpil1->ic_flags|=ICF_RES_TO_INT;258 }259 break;260 case IC_SQR:261 case IC_ABS:262 case IC_SQRT:263 case IC_SIN:264 case IC_COS:265 case IC_TAN:266 case IC_ATAN:267 if (tmpc->raw_type==RT_F64)268 CmpF1PushPop(tmpi,tmpi1);269 break;270 case IC_NOBOUND_SWITCH:271 case IC_SWITCH:272 lb=OptLabelFwd(tmpi->ic_data(CCodeMisc *)->dft);273 lb->use_cnt++;274 break;275 case IC_ASM:276 tmpaot=tmpi->ic_data;277 tmpie=tmpaot->next_ie;278 while (tmpie!=&tmpaot->next_ie) {279 if (IET_REL_I0<=tmpie->type<=IET_IMM_I64 &&280 tmpie->str && tmpie->flags&IEF_GOTO_LABEL &&281 (lb=COCGoToLabelFind(cc,tmpie->str)))282 lb->use_cnt++; //Prevent deadcode elimination.283 tmpie=tmpie->next;284 }285 break;286 case IC_BR_NOT_EQU:287 case IC_BR_EQU_EQU:288 if ((tmpi1->ic_code==IC_IMM_I64 ||289 tmpi1->ic_code==IC_IMM_F64) && !tmpi1->ic_data) {290 OptFree(tmpi1);291 MemCpy(&tmpi->arg1,&tmpi->arg2,sizeof(CICArg));292 tmpi->arg2.type=MDF_NULL;293 if (code==IC_BR_EQU_EQU)294 code=tmpi->ic_code=IC_BR_ZERO;295 else296 code=tmpi->ic_code=IC_BR_NOT_ZERO;297 tmpi1=tmpi2;298 tmpc1=tmpc2;299 } else if ((tmpi2->ic_code==IC_IMM_I64 ||300 tmpi2->ic_code==IC_IMM_F64) && !tmpi2->ic_data) {301 OptFree(tmpi2);302 tmpi->arg2.type=MDF_NULL;303 if (code==IC_BR_EQU_EQU)304 code=tmpi->ic_code=IC_BR_ZERO;305 else306 code=tmpi->ic_code=IC_BR_NOT_ZERO;307 } else308 goto here1;309 case IC_BR_ZERO:310 case IC_BR_NOT_ZERO:311 if (tmpi1->ic_code==IC_IMM_I64 || tmpi1->ic_code==IC_IMM_F64) {312 if (code==IC_BR_ZERO ^^ tmpi1->ic_data) {313 OptFree(tmpi1);314 tmpi->arg1.type=MDF_NULL;315 tmpi->ic_code=IC_JMP;316 } else {317 OptFree(tmpi1);318 tmpi=OptFree(tmpi);319 break;320 }321 }322 goto here1;323 case IC_BR_AND_ZERO:324 if (tmpi1->ic_code==IC_IMM_I64) {325 i=Bsr(tmpi1->ic_data);326 if (0<=i==Bsf(tmpi1->ic_data)) {327 tmpi1->ic_data=i;328 tmpi->ic_flags|=ICF_BY_VAL;329 tmpi->ic_code=IC_BR_NOT_BT;330 goto here1;331 }332 }333 if (tmpi2->ic_code==IC_IMM_I64) {334 i=Bsr(tmpi2->ic_data);335 if (0<=i==Bsf(tmpi2->ic_data)) {336 tmpi2->ic_data=i;337 tmpi->ic_flags|=ICF_SWAP|ICF_BY_VAL;338 tmpi->ic_code=IC_BR_NOT_BT;339 }340 }341 goto here1;342 case IC_BR_AND_NOT_ZERO:343 if (tmpi1->ic_code==IC_IMM_I64) {344 i=Bsr(tmpi1->ic_data);345 if (0<=i==Bsf(tmpi1->ic_data)) {346 tmpi1->ic_data=i;347 tmpi->ic_flags|=ICF_BY_VAL;348 tmpi->ic_code=IC_BR_BT;349 goto here1;350 }351 }352 if (tmpi2->ic_code==IC_IMM_I64) {353 i=Bsr(tmpi2->ic_data);354 if (0<=i==Bsf(tmpi2->ic_data)) {355 tmpi2->ic_data=i;356 tmpi->ic_flags|=ICF_SWAP|ICF_BY_VAL;357 tmpi->ic_code=IC_BR_BT;358 }359 }360 goto here1;361 case IC_BR_MM_ZERO:362 case IC_BR_MM_NOT_ZERO:363 if (tmpi1->ic_code==IC_LEA && tmpi1->arg1.type&MDF_DISP &&364 tmpi1->arg1.reg==REG_RBP)365 for (i=0;i<member_cnt;i++)366 if (mv[i].offset_start==tmpi1->arg1.disp) {367 mv[i].lea_balance--;368 mv[i].score++;369 break;370 }371 tmpi->arg1_type_pointed_to=CmpRawType(tmpc);372 goto here1;373 case IC_BR_LESS:374 case IC_BR_GREATER_EQU:375 case IC_BR_GREATER:376 case IC_BR_LESS_EQU:377 if (tmpi->ic_flags&ICF_USE_F64)378 CmpF2PushPop(tmpi,tmpi1,tmpi2);379 case IC_BR_EQU_EQU2...IC_BR_LESS_EQU2:380 case IC_BR_CARRY:381 case IC_BR_NOT_CARRY:382 case IC_GET_LABEL:383 case IC_BR_BT:384 case IC_BR_BTS:385 case IC_BR_BTR:386 case IC_BR_BTC:387 case IC_BR_NOT_BT:388 case IC_BR_NOT_BTS:389 case IC_BR_NOT_BTR:390 case IC_BR_NOT_BTC:391 case IC_JMP:392 case IC_SUB_CALL:393here1:394 if (tmpi->ic_flags&ICF_PUSH_CMP)395 lb=tmpi->ic_data;396 else397 lb=OptLabelFwd(tmpi->ic_data);398 lb->use_cnt++;399 break;400 case IC_NOP1:401 tmpi=OptFree(tmpi);402 break;403 case IC_NOP2:404 ps->ptr+=tmpi->ic_data;405 break;406 case IC_SHL_CONST:407 case IC_SHR_CONST:408 case IC_ENTER:409 case IC_ADD_RSP:410 case IC_ADD_RSP1:411 case IC_CALL:412 case IC_CALL_INDIRECT:413 case IC_CALL_INDIRECT2:414 case IC_CALL_EXTERN:415 case IC_CALL_IMPORT:416 case IC_PUSH:417 case IC_POP:418 case IC_INVLPG:419 case IC_CLFLUSH:420 case IC_GET_RFLAGS:421 case IC_CARRY:422 case IC_RDTSC:423 case IC_SET_RFLAGS:424 case IC_GET_RBP:425 case IC_SET_RBP:426 case IC_GET_RSP:427 case IC_GET_RAX:428 case IC_SET_RSP:429 case IC_SET_RAX:430 case IC_ABS_ADDR:431 case IC_HEAP_GLBL:432 case IC_ADDR_IMPORT:433 case IC_TYPE:434 case IC_BT:435 case IC_BTS:436 case IC_BTR:437 case IC_BTC:438 case IC_LBTS:439 case IC_LBTR:440 case IC_LBTC:441 case IC_BSF:442 case IC_BSR:443 case IC_SIGN_I64:444 case IC_TOUPPER:445 case IC_TO_I64:446 case IC_TO_F64:447 case IC_TO_BOOL:448 case IC_ABS_I64:449 case IC_MIN_I64:450 case IC_MAX_I64:451 case IC_MIN_U64:452 case IC_MAX_U64:453 case IC_MOD_U64:454 case IC_SQR_I64:455 case IC_SQR_U64:456 case IC_SWAP_U8:457 case IC_SWAP_U16:458 case IC_SWAP_U32:459 case IC_SWAP_I64:460 case IC_QUE_INIT:461 case IC_QUE_INS:462 case IC_QUE_INS_REV:463 case IC_QUE_REM:464 case IC_IN_U32:465 case IC_IN_U16:466 case IC_IN_U8:467 case IC_STRLEN:468 case IC_OUT_U32:469 case IC_OUT_U16:470 case IC_OUT_U8:471 case IC_STR_CONST:472 case IC_FS:473 case IC_GS:474 case IC_MOV_FS:475 case IC_MOV_GS:476 case IC_RIP:477 case IC_PUSH_CMP:478 case IC_REG:479 case IC_COM:480 case IC_HOLYC_TYPECAST:481 case IC_NOT:482 case IC_UNARY_MINUS:483 case IC_POWER:484 case IC_SHL:485 case IC_SHR:486 case IC_MOD:487 case IC_AND:488 case IC_OR:489 case IC_XOR:490 case IC_EQU_EQU:491 case IC_NOT_EQU:492 case IC_AND_AND:493 case IC_OR_OR:494 case IC_XOR_XOR:495 case IC_LEAVE:496 case IC_RET:497 case IC_ADDR:498 case IC_END:499 case IC_END_EXP:500 case IC_CALL_END:501 case IC_CALL_END2:502 case IC_CALL_START:503 case IC_PUSH_REGS:504 case IC_POP_REGS:505 case IC_LABEL:506 break;507 default:508 "Pass:%d Missing IC hndlr\n",cc->pass;509 ICPut(cc,tmpi);510 LexExcept(cc,"Compiler Optimization Error at ");511 }512 }513 tmpi=tmpi_next;514 }515/* REGISTER VARIABLE ASSIGNMENT516 517We just scored num occurrences of each [RBP] offset in the code to help decide518which variables should be assigned to register variables.519 520We counted the times each offset was added to RBP as a plus LEA and we subtract521the times the offset is dereferenced. If the address was calculated more times522than the offset was dereferenced, the variable's address was passed or assigned523and we cannot use a register because you can't take address of a reg var.524 525RAX,RBX,RCX,RDX, R8 are free to be clobbered by each intermediate code.526RAX and R8 links intermediate codes together. R9 is used for stack machine527temporaries. RBP is used as stack frame.528 529RSI,RDI,R10,R11,R12,R13,R14,R15 are used for reg vars. R12 and R13, however,530have a unusual ModR addressing mode in the x86_64 architecture, so I only use531R12 and R13 as non-pointer register variables, such as index variables i,j,k.532 533*/534 if (cc->htc.fun) {535 cc->htc.fun->used_reg_mask=cc->htc.fun->used_reg_mask&536 ~(REGG_LOCAL_VARS|REGG_LOCAL_NON_PTR_VARS)|used_reg_mask;537 if (!Bt(&cc->opts,OPTf_NO_REG_VAR) &&538 !(cc->flags & CCF_NO_REG_OPT)) {539 QSort(mv,member_cnt,sizeof(COptMemberVar),&OptMVCompare);540 while (member_cnt && !mv[member_cnt-1].score)541 member_cnt--;542 j=0;543 for (i=0;i<member_cnt;i++) {544 if (!mv[i].lea_balance && mv[i].offset_start) {//addr operator cancels545 mv[j].m=mv[i].m;546 mv[j].offset_start=mv[i].offset_start;547 mv[j++].offset_end=mv[i].offset_end;548 } else {549 if (mv[i].m->reg==REG_ALLOC)550 PrintWarn("Can't reg var\n $LK,\"FL:%s,%d\"$ '%s' in '%s'\n",551 cc->lex_include_stk->full_name,552 cc->lex_include_stk->line_num,mv[i].m->str,cc->htc.fun->str);553 }554 }555 if (j>0) {556 if (Bt(&cc->flags,CCf_PASS_TRACE_PRESENT))557 "Fun:%s\n",cc->htc.fun->str;558 if (j>cmp.num_reg_vars) {559 l=0;560 for (i=0;i<j && l<cmp.num_non_ptr_vars;i++) {561 tmpm=mv[i].m;562 tmpc=OptClassFwd(tmpm->member_class);563 if (!tmpc->ptr_stars_cnt && !tmpm->dim.next) {564 while (l<cmp.num_non_ptr_vars &&565 Bts(&cc->htc.fun->used_reg_mask,cmp.non_ptr_vars_map[l]))566 l++;567 if (l<cmp.num_non_ptr_vars) {568 tmpm->reg=cmp.non_ptr_vars_map[l++];569 reg_offsets[tmpm->reg].offset=mv[i].offset_start;570 reg_offsets[tmpm->reg].m=tmpm;571 if (Bt(&cc->flags,CCf_PASS_TRACE_PRESENT))572 "Reg %Z Var \"%-15ts\" %016X[RBP]\n",tmpm->reg,"ST_U64_REGS",573 tmpm->str,reg_offsets[tmpm->reg].offset;574 mv[i].offset_start=0; //flag as reg var575 if (tmpm->size<8 &&576 !StrIMatch("Bool",tmpm->member_class->str) &&577 tmpm->member_class->type&HTT_INTERNAL_TYPE)578 PrintWarn("Using 64-bit reg var.\n "579 "$LK,\"FL:%s,%d\"$ '%s' in '%s'\n",580 cc->lex_include_stk->full_name,581 cc->lex_include_stk->line_num,582 tmpm->str,cc->htc.fun->str);583 }584 }585 }586 }587 l=0;588 for (i=0;i<j && l<cmp.num_reg_vars;i++) {589 tmpm=mv[i].m;590//if not just flagged as reg var591 if (mv[i].offset_start && (!mv[i].m->dim.next||592 tmpm->offset>0 && StrCmp(tmpm->str,"argv"))) {593 while (l<cmp.num_reg_vars &&594 Bts(&cc->htc.fun->used_reg_mask,cmp.to_reg_vars_map[l]))595 l++;596 if (l<cmp.num_reg_vars) {597 tmpm->reg=cmp.to_reg_vars_map[l++];598 reg_offsets[tmpm->reg].offset=mv[i].offset_start;599 reg_offsets[tmpm->reg].m=tmpm;600 if (Bt(&cc->flags,CCf_PASS_TRACE_PRESENT))601 "Reg %Z Var \"%-15ts\" %016X[RBP]\n",tmpm->reg,"ST_U64_REGS",602 tmpm->str,reg_offsets[tmpm->reg].offset;603 if (tmpm->size<8 &&604 !StrIMatch("Bool",tmpm->member_class->str) &&605 tmpm->member_class->type&HTT_INTERNAL_TYPE)606 PrintWarn("Using 64-bit reg var.\n "607 "$LK,\"FL:%s,%d\"$ '%s' in '%s'\n",608 cc->lex_include_stk->full_name,609 cc->lex_include_stk->line_num,610 tmpm->str,cc->htc.fun->str);611 }612 }613 }614 }615 }616 Free(mv);617 }618 if (ps->ptr>2) {619 "Pass:%d Stk:%08X\n",cc->pass,ps->ptr;620 LexExcept(cc,"Compiler Optimization Error at ");621 }622}623 624 