📄 sparc.c
字号:
/* con: CNSTI2 */
if (0 + 0 < p->cost[_con_NT]) {
p->cost[_con_NT] = 0 + 0;
p->rule._con = 3;
_closure_con(a, 0 + 0);
}
/* con13: CNSTI2 */
c = (imm(a));
if (c + 0 < p->cost[_con13_NT]) {
p->cost[_con13_NT] = c + 0;
p->rule._con13 = 2;
_closure_con13(a, c + 0);
}
/* reg: CNSTI2 */
c = (range(a, 0, 0));
if (c + 0 < p->cost[_reg_NT]) {
p->cost[_reg_NT] = c + 0;
p->rule._reg = 41;
_closure_reg(a, c + 0);
}
break;
case 2070: /* CNSTU2 */
/* con: CNSTU2 */
if (0 + 0 < p->cost[_con_NT]) {
p->cost[_con_NT] = 0 + 0;
p->rule._con = 4;
_closure_con(a, 0 + 0);
}
/* con13: CNSTU2 */
c = (imm(a));
if (c + 0 < p->cost[_con13_NT]) {
p->cost[_con13_NT] = c + 0;
p->rule._con13 = 5;
_closure_con13(a, c + 0);
}
/* reg: CNSTU2 */
c = (range(a, 0, 0));
if (c + 0 < p->cost[_reg_NT]) {
p->cost[_reg_NT] = c + 0;
p->rule._reg = 45;
_closure_reg(a, c + 0);
}
break;
case 2101: /* ASGNI2 */
_label(LEFT_CHILD(a));
_label(RIGHT_CHILD(a));
if ( /* stmt: ASGNI2(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 = 3;
}
}
/* stmt: ASGNI2(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 = 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 _
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -