sparc.c
来自「基于4个mips核的noc设计」· C语言 代码 · 共 2,357 行 · 第 1/5 页
C
2,357 行
c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 15; } /* stmt: ASGNI2(spill,reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_spill_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 25; } break; case 2102: /* ASGNU2 */ _label(LEFT_CHILD(a)); _label(RIGHT_CHILD(a)); if ( /* stmt: ASGNU2(VREGP,reg) */ LEFT_CHILD(a)->op == 711 /* VREGP */ ) { c = ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 4; } } /* stmt: ASGNU2(addr,reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 18; } /* stmt: ASGNU2(spill,reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_spill_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 28; } break; case 2117: /* INDIRI2 */ _label(LEFT_CHILD(a)); if ( /* reg: INDIRI2(VREGP) */ LEFT_CHILD(a)->op == 711 /* VREGP */ ) { if (mayrecalc(a)) { struct _state *q = a->syms[RX]->u.t.cse->x.state; if (q->cost[_stmt_NT] == 0) { p->cost[_stmt_NT] = 0; p->rule._stmt = q->rule._stmt; } if (q->cost[_reg_NT] == 0) { p->cost[_reg_NT] = 0; p->rule._reg = q->rule._reg; } if (q->cost[_con_NT] == 0) { p->cost[_con_NT] = 0; p->rule._con = q->rule._con; } if (q->cost[_stk13_NT] == 0) { p->cost[_stk13_NT] = 0; p->rule._stk13 = q->rule._stk13; } if (q->cost[_stk_NT] == 0) { p->cost[_stk_NT] = 0; p->rule._stk = q->rule._stk; } if (q->cost[_con13_NT] == 0) { p->cost[_con13_NT] = 0; p->rule._con13 = q->rule._con13; } if (q->cost[_base_NT] == 0) { p->cost[_base_NT] = 0; p->rule._base = q->rule._base; } if (q->cost[_addr_NT] == 0) { p->cost[_addr_NT] = 0; p->rule._addr = q->rule._addr; } if (q->cost[_addrl_NT] == 0) { p->cost[_addrl_NT] = 0; p->rule._addrl = q->rule._addrl; } if (q->cost[_spill_NT] == 0) { p->cost[_spill_NT] = 0; p->rule._spill = q->rule._spill; } if (q->cost[_rc_NT] == 0) { p->cost[_rc_NT] = 0; p->rule._rc = q->rule._rc; } if (q->cost[_rc5_NT] == 0) { p->cost[_rc5_NT] = 0; p->rule._rc5 = q->rule._rc5; } if (q->cost[_addrg_NT] == 0) { p->cost[_addrg_NT] = 0; p->rule._addrg = q->rule._addrg; } if (q->cost[_call_NT] == 0) { p->cost[_call_NT] = 0; p->rule._call = q->rule._call; } if (q->cost[_rel_NT] == 0) { p->cost[_rel_NT] = 0; p->rule._rel = q->rule._rel; } } c = 0; if (c + 0 < p->cost[_reg_NT]) { p->cost[_reg_NT] = c + 0; p->rule._reg = 3; _closure_reg(a, c + 0); } } /* reg: INDIRI2(addr) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + 1; if (c + 0 < p->cost[_reg_NT]) { p->cost[_reg_NT] = c + 0; p->rule._reg = 18; _closure_reg(a, c + 0); } break; case 2118: /* INDIRU2 */ _label(LEFT_CHILD(a)); if ( /* reg: INDIRU2(VREGP) */ LEFT_CHILD(a)->op == 711 /* VREGP */ ) { if (mayrecalc(a)) { struct _state *q = a->syms[RX]->u.t.cse->x.state; if (q->cost[_stmt_NT] == 0) { p->cost[_stmt_NT] = 0; p->rule._stmt = q->rule._stmt; } if (q->cost[_reg_NT] == 0) { p->cost[_reg_NT] = 0; p->rule._reg = q->rule._reg; } if (q->cost[_con_NT] == 0) { p->cost[_con_NT] = 0; p->rule._con = q->rule._con; } if (q->cost[_stk13_NT] == 0) { p->cost[_stk13_NT] = 0; p->rule._stk13 = q->rule._stk13; } if (q->cost[_stk_NT] == 0) { p->cost[_stk_NT] = 0; p->rule._stk = q->rule._stk; } if (q->cost[_con13_NT] == 0) { p->cost[_con13_NT] = 0; p->rule._con13 = q->rule._con13; } if (q->cost[_base_NT] == 0) { p->cost[_base_NT] = 0; p->rule._base = q->rule._base; } if (q->cost[_addr_NT] == 0) { p->cost[_addr_NT] = 0; p->rule._addr = q->rule._addr; } if (q->cost[_addrl_NT] == 0) { p->cost[_addrl_NT] = 0; p->rule._addrl = q->rule._addrl; } if (q->cost[_spill_NT] == 0) { p->cost[_spill_NT] = 0; p->rule._spill = q->rule._spill; } if (q->cost[_rc_NT] == 0) { p->cost[_rc_NT] = 0; p->rule._rc = q->rule._rc; } if (q->cost[_rc5_NT] == 0) { p->cost[_rc5_NT] = 0; p->rule._rc5 = q->rule._rc5; } if (q->cost[_addrg_NT] == 0) { p->cost[_addrg_NT] = 0; p->rule._addrg = q->rule._addrg; } if (q->cost[_call_NT] == 0) { p->cost[_call_NT] = 0; p->rule._call = q->rule._call; } if (q->cost[_rel_NT] == 0) { p->cost[_rel_NT] = 0; p->rule._rel = q->rule._rel; } } c = 0; if (c + 0 < p->cost[_reg_NT]) { p->cost[_reg_NT] = c + 0; p->rule._reg = 4; _closure_reg(a, c + 0); } } /* reg: INDIRU2(addr) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + 1; if (c + 0 < p->cost[_reg_NT]) { p->cost[_reg_NT] = c + 0; p->rule._reg = 21; _closure_reg(a, c + 0); } break; case 2181: /* CVII2 */ break; case 2182: /* CVIU2 */ break; case 2229: /* CVUI2 */ break; case 2230: /* CVUU2 */ break; case 2277: /* LOADI2 */ _label(LEFT_CHILD(a)); /* reg: LOADI2(reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + (move(a)); if (c + 0 < p->cost[_reg_NT]) { p->cost[_reg_NT] = c + 0; p->rule._reg = 34; _closure_reg(a, c + 0); } break; case 2278: /* LOADU2 */ _label(LEFT_CHILD(a)); /* reg: LOADU2(reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + (move(a)); if (c + 0 < p->cost[_reg_NT]) { p->cost[_reg_NT] = c + 0; p->rule._reg = 38; _closure_reg(a, c + 0); } break; case 4113: /* CNSTF4 */ break; case 4117: /* CNSTI4 */ /* con: CNSTI4 */ if (0 + 0 < p->cost[_con_NT]) { p->cost[_con_NT] = 0 + 0; p->rule._con = 5; _closure_con(a, 0 + 0); } /* con13: CNSTI4 */ c = (imm(a)); if (c + 0 < p->cost[_con13_NT]) { p->cost[_con13_NT] = c + 0; p->rule._con13 = 3; _closure_con13(a, c + 0); } /* reg: CNSTI4 */ c = (range(a, 0, 0)); if (c + 0 < p->cost[_reg_NT]) { p->cost[_reg_NT] = c + 0; p->rule._reg = 42; _closure_reg(a, c + 0); } /* rc5: CNSTI4 */ c = (range(a, 0, 31)); if (c + 0 < p->cost[_rc5_NT]) { p->cost[_rc5_NT] = c + 0; p->rule._rc5 = 1; } break; case 4118: /* CNSTU4 */ /* con: CNSTU4 */ if (0 + 0 < p->cost[_con_NT]) { p->cost[_con_NT] = 0 + 0; p->rule._con = 6; _closure_con(a, 0 + 0); } /* con13: CNSTU4 */ c = (imm(a)); if (c + 0 < p->cost[_con13_NT]) { p->cost[_con13_NT] = c + 0; p->rule._con13 = 6; _closure_con13(a, c + 0); } /* reg: CNSTU4 */ c = (range(a, 0, 0)); if (c + 0 < p->cost[_reg_NT]) { p->cost[_reg_NT] = c + 0; p->rule._reg = 46; _closure_reg(a, c + 0); } break; case 4119: /* CNSTP4 */ /* con: CNSTP4 */ if (0 + 0 < p->cost[_con_NT]) { p->cost[_con_NT] = 0 + 0; p->rule._con = 7; _closure_con(a, 0 + 0); } /* con13: CNSTP4 */ c = (imm(a)); if (c + 0 < p->cost[_con13_NT]) { p->cost[_con13_NT] = c + 0; p->rule._con13 = 7; _closure_con13(a, c + 0); } /* reg: CNSTP4 */ c = (range(a, 0, 0)); if (c + 0 < p->cost[_reg_NT]) { p->cost[_reg_NT] = c + 0; p->rule._reg = 43; _closure_reg(a, c + 0); } break; case 4129: /* ARGF4 */ _label(LEFT_CHILD(a)); /* stmt: ARGF4(reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 58; } break; case 4133: /* ARGI4 */ _label(LEFT_CHILD(a)); /* stmt: ARGI4(reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 55; } break; case 4134: /* ARGU4 */ _label(LEFT_CHILD(a)); /* stmt: ARGU4(reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 56; } break; case 4135: /* ARGP4 */ _label(LEFT_CHILD(a)); /* stmt: ARGP4(reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 57; } break; case 4145: /* ASGNF4 */ _label(LEFT_CHILD(a)); _label(RIGHT_CHILD(a)); if ( /* stmt: ASGNF4(VREGP,reg) */ LEFT_CHILD(a)->op == 711 /* VREGP */ ) { c = ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 5; } } /* stmt: ASGNF4(addr,reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 21; } /* stmt: ASGNF4(spill,reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_spill_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 31; } break; case 4149: /* ASGNI4 */ _label(LEFT_CHILD(a)); _label(RIGHT_CHILD(a)); if ( /* stmt: ASGNI4(VREGP,reg) */ LEFT_CHILD(a)->op == 711 /* VREGP */ ) { c = ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 6; } } /* stmt: ASGNI4(addr,reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 16; } /* stmt: ASGNI4(spill,reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_spill_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 26; } break; case 4150: /* ASGNU4 */ _label(LEFT_CHILD(a)); _label(RIGHT_CHILD(a)); if ( /* stmt: ASGNU4(VREGP,reg) */ LEFT_CHILD(a)->op == 711 /* VREGP */ ) { c = ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 8; } } /* stmt: ASGNU4(addr,reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 19; } /* stmt: ASGNU4(spill,reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_spill_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 29; } break; case 4151: /* ASGNP4 */ _label(LEFT_CHILD(a)); _label(RIGHT_CHILD(a)); if ( /* stmt: ASGNP4(VREGP,reg) */ LEFT_CHILD(a)->op == 711 /* VREGP */ ) { c = ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 7; } } /* stmt: ASGNP4(addr,reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 20; } /* stmt: ASGNP4(spill,reg) */ c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_spill_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0; if (c + 0 < p->cost[_stmt_NT]) { p->cost[_stmt_NT] = c + 0; p->rule._stmt = 30; } break; case 4161: /* INDIRF4 */ _label(LEFT_CHILD(a)); if ( /* reg: INDIRF4(VREGP) */ LEFT_CHILD(a)->op == 711 /* VREGP */ ) { if (mayrecalc(a)) { struct _state *q = a->syms[RX]->u.t.cse->x.state; if (q->cost[_stmt_NT] == 0) { p->cost[_stmt_NT] = 0; p->rule._stmt = q->rule._stmt; } if (q->cost[_reg_NT] == 0) { p->cost[_reg_NT] = 0; p->rule._reg = q->rule._reg; } if (q->cost[_con_NT] == 0) { p->cost[_con_NT] = 0; p->rule._con = q->rule._con; } if (q->cost[_stk13_NT] == 0) { p->cost[_stk13_NT] = 0; p->rule._stk13 = q->rule._stk13; } if (q->cost[_stk_NT] == 0) { p->cost[_stk_NT] = 0; p->rule._stk = q->rule._stk; } if (q->cost[_
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?