Line 57... |
Line 57... |
|
|
{"lrbb", 0,"always @(posedge clk or posedge rst)"},
|
{"lrbb", 0,"always @(posedge clk or posedge rst)"},
|
{"cmov", 0,"assign \1 = \4 ? \2 : \3;"},
|
{"cmov", 0,"assign \1 = \4 ? \2 : \3;"},
|
{"reg", 0, "always @(posedge clk or posedge rst)"},
|
{"reg", 0, "always @(posedge clk or posedge rst)"},
|
|
|
{"call", 0, "/* function call */"},
|
{"nop", 0, NULL},
|
{"nop", 0, NULL}};
|
{"call", 0, "/* function call */"}};
|
|
|
/* Find known instruction and attach them to insn */
|
/* Find known instruction and attach them to insn */
|
void change_insn_type (cuc_insn *i, int index)
|
void change_insn_type (cuc_insn *i, int index)
|
{
|
{
|
int j;
|
int j;
|
Line 277... |
Line 277... |
/* mark visited, if already marked, we have a loop, ignore */
|
/* mark visited, if already marked, we have a loop, ignore */
|
if (ii->tmp) return 0;
|
if (ii->tmp) return 0;
|
ii->tmp = 1;
|
ii->tmp = 1;
|
|
|
/* handle normal movs separately */
|
/* handle normal movs separately */
|
if ((ii->index == II_ADD || !(ii->type & IT_VOLATILE))
|
if (ii->index == II_ADD && !(ii->type & IT_VOLATILE)
|
&& ii->opt[2] == OPT_CONST && ii->op[2] == 0) {
|
&& ii->opt[2] == OPT_CONST && ii->op[2] == 0) {
|
if (ii->opt[1] == OPT_REF) {
|
if (ii->opt[1] == OPT_REF) {
|
if (cmov_needed (f, ii->op[1])) {
|
if (cmov_needed (f, ii->op[1])) {
|
ii->tmp = 0;
|
ii->tmp = 0;
|
return 1;
|
return 1;
|
Line 307... |
Line 307... |
ii->tmp = 0;
|
ii->tmp = 0;
|
return 0;
|
return 0;
|
} else if (tmp_opt != OPT_REF || tmp_op != ref) {
|
} else if (tmp_opt != OPT_REF || tmp_op != ref) {
|
ii->tmp = 0;
|
ii->tmp = 0;
|
return 1;
|
return 1;
|
|
} else {
|
|
ii->tmp = 0;
|
|
return 0;
|
}
|
}
|
|
|
for (j = 1; j < 3; j++) {
|
for (j = 1; j < 3; j++) {
|
cucdebug (4, "(%x:%i)", ref, j);
|
cucdebug (4, "(%x:%i)", ref, j);
|
if (ii->opt[j] == OPT_REF) {
|
if (ii->opt[j] == OPT_REF) {
|