static void initOpMap() { opmap = new Dictionary <string, OpCodeParser>(); //deprecated opmap["add"] = new GenAdd(); //deprecated opmap["sub"] = new GenSub(); opmap["add.u"] = new GenAdd(false); opmap["sub.u"] = new GenSub(false); opmap["add.s"] = new GenAdd(true); opmap["sub.s"] = new GenSub(true); opmap["addi"] = new GenAddI(); opmap["subi"] = new GenSubI(); //deprecated opmap["addi.u"] = new GenAddI(); //deprecated opmap["subi.u"] = new GenSubI(); opmap["or"] = new GenOr(); opmap["and"] = new GenAnd(); opmap["xor"] = new GenXor(); opmap["not"] = new GenNot(); opmap["sl"] = new GenShift(true); opmap["sr"] = new GenShift(false); opmap["shl"] = new GenShift(true); opmap["shr"] = new GenShift(false); opmap["load.l"] = new GenLoad(true); opmap["load.h"] = new GenLoad(false); opmap["cmp.u"] = new GenCmp(false); opmap["cmp.s"] = new GenCmp(true); opmap["biro"] = new GenJmpImm(); opmap["br"] = new GenJmpReg(); opmap["br.eq"] = new GenCndJmp(BranchCondition.EQ); opmap["br.az"] = new GenCndJmp(BranchCondition.AZ); opmap["br.bz"] = new GenCndJmp(BranchCondition.BZ); opmap["br.anz"] = new GenCndJmp(BranchCondition.ANZ); opmap["br.bnz"] = new GenCndJmp(BranchCondition.BNZ); opmap["br.lt"] = new GenCndJmp(BranchCondition.ALB); opmap["br.gt"] = new GenCndJmp(BranchCondition.AGB); opmap["bro.eq"] = new GenCndJmpRO(BranchCondition.EQ); opmap["bro.az"] = new GenCndJmpRO(BranchCondition.AZ); opmap["bro.bz"] = new GenCndJmpRO(BranchCondition.BZ); opmap["bro.anz"] = new GenCndJmpRO(BranchCondition.ANZ); opmap["bro.bnz"] = new GenCndJmpRO(BranchCondition.BNZ); opmap["bro.lt"] = new GenCndJmpRO(BranchCondition.ALB); opmap["bro.gt"] = new GenCndJmpRO(BranchCondition.AGB); //deprecated opmap["read"] = new GenRead(); //deprecated opmap["write"] = new GenWrite(); opmap["read.w"] = new GenRead(); opmap["write.w"] = new GenWrite(); opmap["read.b"] = new GenRead(true); opmap["write.b"] = new GenWrite(true); opmap["dw"] = new GenData(); opmap["spc"] = new GenSpecialAssign(SpecialAssign.SAVE_PC); opmap["sstatus"] = new GenSpecialAssign(SpecialAssign.SAVE_STATUS); opmap["gief"] = new GenSpecialAssign(SpecialAssign.GIEF); opmap["bbi"] = new GenSpecialAssign(SpecialAssign.BBI); opmap["ei"] = new GenSpecialAssign(SpecialAssign.EI); opmap["di"] = new GenSpecialAssign(SpecialAssign.DI); opmap["int"] = new GenSpecialAssign(SpecialAssign.INT); //deprecated opmap["data"] = new GenData(); }
static void initOpMap() { opmap = new Dictionary<string, OpCodeParser>(); //deprecated opmap["add"] = new GenAdd(); //deprecated opmap["sub"] = new GenSub(); opmap["add.u"] = new GenAdd(false); opmap["sub.u"] = new GenSub(false); opmap["add.s"] = new GenAdd(true); opmap["sub.s"] = new GenSub(true); opmap["addi"] = new GenAddI(); opmap["subi"] = new GenSubI(); //deprecated opmap["addi.u"] = new GenAddI(); //deprecated opmap["subi.u"] = new GenSubI(); opmap["or"] = new GenOr(); opmap["and"] = new GenAnd(); opmap["xor"] = new GenXor(); opmap["not"] = new GenNot(); opmap["sl"] = new GenShift(true); opmap["sr"] = new GenShift(false); opmap["shl"] = new GenShift(true); opmap["shr"] = new GenShift(false); opmap["load.l"] = new GenLoad(true); opmap["load.h"] = new GenLoad(false); opmap["cmp.u"] = new GenCmp(false); opmap["cmp.s"] = new GenCmp(true); opmap["biro"] = new GenJmpImm(); opmap["br"] = new GenJmpReg(); opmap["br.eq"] = new GenCndJmp(BranchCondition.EQ); opmap["br.az"] = new GenCndJmp(BranchCondition.AZ); opmap["br.bz"] = new GenCndJmp(BranchCondition.BZ); opmap["br.anz"] = new GenCndJmp(BranchCondition.ANZ); opmap["br.bnz"] = new GenCndJmp(BranchCondition.BNZ); opmap["br.lt"] = new GenCndJmp(BranchCondition.ALB); opmap["br.gt"] = new GenCndJmp(BranchCondition.AGB); opmap["bro.eq"] = new GenCndJmpRO(BranchCondition.EQ); opmap["bro.az"] = new GenCndJmpRO(BranchCondition.AZ); opmap["bro.bz"] = new GenCndJmpRO(BranchCondition.BZ); opmap["bro.anz"] = new GenCndJmpRO(BranchCondition.ANZ); opmap["bro.bnz"] = new GenCndJmpRO(BranchCondition.BNZ); opmap["bro.lt"] = new GenCndJmpRO(BranchCondition.ALB); opmap["bro.gt"] = new GenCndJmpRO(BranchCondition.AGB); //deprecated opmap["read"] = new GenRead(); //deprecated opmap["write"] = new GenWrite(); opmap["read.w"] = new GenRead(); opmap["write.w"] = new GenWrite(); opmap["read.b"] = new GenRead(true); opmap["write.b"] = new GenWrite(true); opmap["dw"] = new GenData(); opmap["spc"] = new GenSpecialAssign(SpecialAssign.SAVE_PC); opmap["sstatus"] = new GenSpecialAssign(SpecialAssign.SAVE_STATUS); opmap["gief"] = new GenSpecialAssign(SpecialAssign.GIEF); opmap["bbi"] = new GenSpecialAssign(SpecialAssign.BBI); opmap["ei"] = new GenSpecialAssign(SpecialAssign.EI); opmap["di"] = new GenSpecialAssign(SpecialAssign.DI); opmap["int"] = new GenSpecialAssign(SpecialAssign.INT); //deprecated opmap["data"] = new GenData(); }