Added error codes to emitError Function

master
Apoorva Ranade 4 years ago
parent 59a7fceb9c
commit e6230c71a4

@ -1192,6 +1192,10 @@ public class CodeGenImpl extends CodeGenBase
backend.emitGlobalLabel(errLabel);
if(errLabel==errorOob)
backend.emitLI(A0, ERROR_OOB, "Exit code for: " + msg);
else if(errLabel==errorDiv)
backend.emitLI(A0, ERROR_DIV_ZERO, "Exit code for: " + msg);
else if(errLabel==errorNI)
backend.emitLI(A0, ERROR_NYI, "Exit code for: " + msg);
else
backend.emitLI(A0, ERROR_NONE, "Exit code for: " + msg);
backend.emitLA(A1, constants.getStrConstant(msg), "Load error message as str");

Loading…
Cancel
Save