Line 197... |
Line 197... |
dep_list *t1dep = f->INSN(t1).dep;
|
dep_list *t1dep = f->INSN(t1).dep;
|
int x, p;
|
int x, p;
|
cuc_insn *ii;
|
cuc_insn *ii;
|
|
|
cucdebug (2, "Joining %x and %x.\n", t1, t2);
|
cucdebug (2, "Joining %x and %x.\n", t1, t2);
|
print_cuc_bb (f, "PREJT");
|
if (cuc_debug >= 8) print_cuc_bb (f, "PREJT");
|
change_insn_type (&f->INSN(t1), II_NOP);
|
change_insn_type (&f->INSN(t1), II_NOP);
|
change_insn_type (&f->INSN(t2), II_NOP);
|
change_insn_type (&f->INSN(t2), II_NOP);
|
/* We will reuse the memadd before the first load, and add some
|
/* We will reuse the memadd before the first load, and add some
|
custom code at the end */
|
custom code at the end */
|
insert_insns (f, t1, 10);
|
insert_insns (f, t1, 10);
|
print_cuc_bb (f, "PREJT2");
|
if (cuc_debug > 8) print_cuc_bb (f, "PREJT2");
|
|
|
/* Remove all dependencies to second access */
|
/* Remove all dependencies to second access */
|
for (x = 0; x < f->num_bb; x++) {
|
for (x = 0; x < f->num_bb; x++) {
|
int i;
|
int i;
|
for (i = 0; i < f->bb[x].ninsn; i++) {
|
for (i = 0; i < f->bb[x].ninsn; i++) {
|
Line 235... |
Line 235... |
and p-1, 0xff
|
and p-1, 0xff
|
sfle p-1 0x7f
|
sfle p-1 0x7f
|
or p-2 0xffffff00
|
or p-2 0xffffff00
|
cmov p-3, p-1, p-2*/
|
cmov p-3, p-1, p-2*/
|
p = REF_I(t1);
|
p = REF_I(t1);
|
printf ("%x %x\n", f->mtype[i - 1], f->mtype[i]);
|
cucdebug (8, "%x %x\n", f->mtype[i - 1], f->mtype[i]);
|
for (x = 0; x < 2; x++) {
|
for (x = 0; x < 2; x++) {
|
int t = f->mtype[i - 1 + x];
|
int t = f->mtype[i - 1 + x];
|
ii = &f->bb[REF_BB(t1)].insn[p];
|
ii = &f->bb[REF_BB(t1)].insn[p];
|
if (!x) {
|
if (!x) {
|
change_insn_type (ii, aw == 1 ? II_LH : II_LW);
|
change_insn_type (ii, aw == 1 ? II_LH : II_LW);
|
Line 257... |
Line 257... |
ii->op[1] = t1; ii->opt[1] = OPT_REF;
|
ii->op[1] = t1; ii->opt[1] = OPT_REF;
|
ii->op[2] = 8; ii->opt[2] = OPT_CONST;
|
ii->op[2] = 8; ii->opt[2] = OPT_CONST;
|
ii->opt[3] = OPT_NONE;
|
ii->opt[3] = OPT_NONE;
|
}
|
}
|
|
|
printf ("1. %x %x\n", p, t);
|
|
ii = &f->bb[REF_BB(t1)].insn[++p];
|
ii = &f->bb[REF_BB(t1)].insn[++p];
|
change_insn_type (ii, II_AND);
|
change_insn_type (ii, II_AND);
|
ii->type = 0;
|
ii->type = 0;
|
ii->op[0] = -1; ii->opt[0] = OPT_REGISTER | OPT_DEST;
|
ii->op[0] = -1; ii->opt[0] = OPT_REGISTER | OPT_DEST;
|
ii->op[1] = REF (REF_BB(t1), p - 1); ii->opt[1] = OPT_REF;
|
ii->op[1] = REF (REF_BB(t1), p - 1); ii->opt[1] = OPT_REF;
|
ii->op[2] = 0xff; ii->opt[2] = OPT_CONST;
|
ii->op[2] = 0xff; ii->opt[2] = OPT_CONST;
|
ii->opt[3] = OPT_NONE;
|
ii->opt[3] = OPT_NONE;
|
|
|
printf ("2. %x\n", p);
|
|
ii = &f->bb[REF_BB(t1)].insn[++p];
|
ii = &f->bb[REF_BB(t1)].insn[++p];
|
change_insn_type (ii, II_SFLE);
|
change_insn_type (ii, II_SFLE);
|
ii->type = IT_COND;
|
ii->type = IT_COND;
|
ii->op[0] = -1; ii->opt[0] = OPT_REGISTER | OPT_DEST;
|
ii->op[0] = -1; ii->opt[0] = OPT_REGISTER | OPT_DEST;
|
ii->op[1] = REF (REF_BB(t1), p - 1); ii->opt[1] = OPT_REF;
|
ii->op[1] = REF (REF_BB(t1), p - 1); ii->opt[1] = OPT_REF;
|
ii->op[2] = 0x7f; ii->opt[2] = OPT_CONST;
|
ii->op[2] = 0x7f; ii->opt[2] = OPT_CONST;
|
ii->opt[3] = OPT_NONE;
|
ii->opt[3] = OPT_NONE;
|
|
|
printf ("3. %x\n", p);
|
|
ii = &f->bb[REF_BB(t1)].insn[++p];
|
ii = &f->bb[REF_BB(t1)].insn[++p];
|
change_insn_type (ii, II_OR);
|
change_insn_type (ii, II_OR);
|
ii->type = 0;
|
ii->type = 0;
|
ii->op[0] = -1; ii->opt[0] = OPT_REGISTER | OPT_DEST;
|
ii->op[0] = -1; ii->opt[0] = OPT_REGISTER | OPT_DEST;
|
ii->op[1] = REF (REF_BB(t1), p - 2); ii->opt[1] = OPT_REF;
|
ii->op[1] = REF (REF_BB(t1), p - 2); ii->opt[1] = OPT_REF;
|
if (t & MT_SIGNED) ii->op[2] = 0xffffff00;
|
if (t & MT_SIGNED) ii->op[2] = 0xffffff00;
|
else ii->op[2] = 0;
|
else ii->op[2] = 0;
|
ii->opt[2] = OPT_CONST;
|
ii->opt[2] = OPT_CONST;
|
ii->opt[3] = OPT_NONE;
|
ii->opt[3] = OPT_NONE;
|
|
|
printf ("4. %x\n", p);
|
|
ii = &f->bb[REF_BB(t1)].insn[++p];
|
ii = &f->bb[REF_BB(t1)].insn[++p];
|
change_insn_type (ii, II_CMOV);
|
change_insn_type (ii, II_CMOV);
|
ii->type = 0;
|
ii->type = 0;
|
ii->op[0] = -1; ii->opt[0] = OPT_REGISTER | OPT_DEST;
|
ii->op[0] = -1; ii->opt[0] = OPT_REGISTER | OPT_DEST;
|
ii->op[1] = REF (REF_BB(t1), p - 1); ii->opt[1] = OPT_REF;
|
ii->op[1] = REF (REF_BB(t1), p - 1); ii->opt[1] = OPT_REF;
|
Line 313... |
Line 309... |
f->bb[b].insn[i].op[j] = t1 + 4;
|
f->bb[b].insn[i].op[j] = t1 + 4;
|
else if (f->bb[b].insn[i].opt[j] & OPT_REF && f->bb[b].insn[i].op[j] == t2)
|
else if (f->bb[b].insn[i].opt[j] & OPT_REF && f->bb[b].insn[i].op[j] == t2)
|
f->bb[b].insn[i].op[j] = t1 + 9;
|
f->bb[b].insn[i].op[j] = t1 + 9;
|
}
|
}
|
}
|
}
|
print_cuc_bb (f, "POSTJT");
|
if (cuc_debug >= 8) print_cuc_bb (f, "POSTJT");
|
} else goto keep;
|
} else goto keep;
|
} else goto keep;
|
} else goto keep;
|
} else {
|
} else {
|
keep:
|
keep:
|
f->msched[j] = f->msched[i];
|
f->msched[j] = f->msched[i];
|