aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeddy <[email protected]>2014-05-05 06:30:25 +0800
committerTeddy <[email protected]>2014-05-05 06:30:25 +0800
commitb10940f3570f7faad91b165df6b520a308a3b070 (patch)
tree6e8d1b362f739dc3c07c174c410025bed18b79a4
parent234bad3c4713b9795b9ec21b278fca78fcf65a1c (diff)
...
-rw-r--r--TODO.rst2
-rw-r--r--mips.c2
-rw-r--r--ssa.c11
3 files changed, 1 insertions, 14 deletions
diff --git a/TODO.rst b/TODO.rst
index f2a9a2b..2d00ec7 100644
--- a/TODO.rst
+++ b/TODO.rst
@@ -22,7 +22,7 @@ TODO
- const function name (done)
- remove the redundant edge from blocks that break a loop
- ``<<`` operation in pre-calculation (done)
- - support ``addui``, ``sll``, etc. (almost done)
+ - support ``addui``, ``sll``, etc. (done)
- Not Implemented:
diff --git a/mips.c b/mips.c
index 3c5179d..2ca88e6 100644
--- a/mips.c
+++ b/mips.c
@@ -91,7 +91,6 @@ void mips_store(int reg, COpr_t opr) {
CVar_t var = opr->spill->info.var;
CType_t type = opr->type;
const char *l = type->type == CCHAR ? "sb" : "sw";
- /* TODO: struct */
if (var->loc > 0)
printf("\t%s $%d, _%s\n", l, reg, var->name);
else if (opr->reg == -1)
@@ -304,7 +303,6 @@ void mips_generate(void) {
break;
case MOVE:
{
- /* TODO: struct */
int rs;
int rd = i->dest->reg;
CType_t type = i->dest->type;
diff --git a/ssa.c b/ssa.c
index 02805d3..f8a8376 100644
--- a/ssa.c
+++ b/ssa.c
@@ -1156,17 +1156,6 @@ CBlock_t ssa_if(CNode *p, CBlock_t cur, CBlock_t loop_exit) {/*{{{*/
}
then_blk = cblock_create(1);
if_inst = compress_branch(rt, cur, 1);
-/* calculated cond */
- /*
- if_inst->op = BEQ;
- if_inst->src1 = rt;
- if_inst->src2 = copr_create();
- if_inst->src2->kind = IMM;
- if_inst->src2->info.imm = 0;
- if_inst->dest = copr_create();
- if_inst->dest->kind = IMM;
- cblock_append(cur, if_inst);
- */
cfg_add_edge(cur, then_blk);
DBLINK(cur, then_blk);