Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if (t.matches("test expr EQ expr")) //a10p1
- {
- return genCode(t.children.get(0))+
- "sw $3, -4($30)\n" +
- "lis $3\n" + ".word -4\n" + "add $30, $3, $30\n" +
- genCode(t.children.get(2)) +
- "lis $6\n" + ".word 4\n" + "add $30, $6, $30\n" +
- "lw $6, -4($30)\n" +
- "lis $7\n" +
- ".word 0\n" +
- "bne $6, $3, 2\n" +
- "lis $7\n" +
- ".word 1\n";
- }
Add Comment
Please, Sign In to add comment