Created
June 19, 2012 18:04
-
-
Save mlangenberg/2955612 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void code(PrintStream s) { | |
e1.code(s); | |
CgenSupport.emitFetchInt(CgenSupport.ACC, CgenSupport.ACC, s); | |
CgenSupport.emitPush(CgenSupport.ACC, s); | |
e2.code(s); | |
CgenSupport.emitFetchInt(CgenSupport.ACC, CgenSupport.ACC, s); | |
CgenSupport.emitLoad(CgenSupport.T1, 1, CgenSupport.SP, s); | |
CgenSupport.emitAdd(CgenSupport.ACC, CgenSupport.T1, CgenSupport.ACC, s); | |
CgenSupport.emitAddiu(CgenSupport.SP, CgenSupport.SP, 4, s); | |
// Now that result of e1 + e2 is in the accumulator we | |
// continue to create a new int_const object | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment