OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 1044 to Rev 1045
    Reverse comparison

Rev 1044 → Rev 1045

/trunk/or1ksim/cuc/bb.c
483,7 → 483,7
if (type == 0 && f->bb[succ].prev[0] == f->bb[succ].next[0]) add_cond = 1;
if (type == 2) add_cond = 1;
 
assert (f->bb[pred].next[0] == f->bb[succ].next[0] || type != 2); /* not supported */
//assert (f->bb[pred].next[0] == f->bb[succ].next[0] || type != 2); /* not supported */
ninsn = n1 + n2 + (type == 1 ? 0 : 1) + (add_cond ? MAX_REGS : 0);
 
561,7 → 561,7
if (add_cond) {
recalc_last_used_reg (f, pred);
recalc_last_used_reg (f, succ);
 
/* r0 -- add nop for it */
change_insn_type (&insn[n1 + n2], II_NOP);
for (i = 1; i < MAX_REGS; i++) {
569,7 → 569,22
int a = f->bb[pred].last_used_reg[i];
int b = f->bb[succ].last_used_reg[i];
 
if (b < 0) change_insn_type (ii, II_NOP);
/* We have deleted first branch instruction, now we must setup FLAG_REG,
to point to conditional */
if (i == FLAG_REG) {
change_insn_type (ii, II_CMOV);
ii->type = i == FLAG_REG || i == LRBB_REG ? IT_COND : 0;
ii->dep = NULL;
ii->op[0] = i; ii->opt[0] = OPT_REGISTER | OPT_DEST;
ii->op[1] = cond_op; ii->opt[1] = cond_opt;
if (b >= 0) {
ii->op[2] = b; ii->opt[2] = OPT_REF;
} else {
ii->op[2] = cond_op; ii->opt[2] = cond_opt;
}
ii->op[3] = cond_op; ii->opt[3] = cond_opt;
reloc[REF_I(a)] = REF (pred, n1 + n2 + i);
} else if (b < 0) change_insn_type (ii, II_NOP);
else if (a < 0) {
change_insn_type (ii, II_ADD);
ii->type = i == FLAG_REG || i == LRBB_REG ? IT_COND : 0;
796,8 → 811,8
}
#endif
if (f->bb[p].next[1] == i
&& (f->bb[i].next[0] == f->bb[p].next[1]
|| f->bb[i].next[0] == f->bb[p].next[0])) {
&& (f->bb[p].next[0] == f->bb[i].next[1]
|| f->bb[p].next[0] == f->bb[i].next[0])) {
join_bb (f, p, i, 2);
modified = 1;
goto remove_lrbb;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.