示例#1
0
文件: OpCode.cs 项目: xuhd/llvmmmix
        /*
         *
         *
         */
        public static MmixOpcodeCategory getOpcodeCategory(MmixOpcode arg)
        {
            switch (arg)
            {
            case MmixOpcode.FLOT:
            case MmixOpcode.FLOTU:
            case MmixOpcode.SFLOT:
            case MmixOpcode.SFLOTU:
            case MmixOpcode.MUL:
            case MmixOpcode.MULU:
            case MmixOpcode.DIV:
            case MmixOpcode.DIVU:
            case MmixOpcode.ADD:
            case MmixOpcode.ADDU:
            case MmixOpcode.SUB:
            case MmixOpcode.SUBU:
            case MmixOpcode._2ADDU:
            case MmixOpcode._4ADDU:
            case MmixOpcode._8ADDU:
            case MmixOpcode._16ADDU:
            case MmixOpcode.CMP:
            case MmixOpcode.CMPU:
            case MmixOpcode.NEG:
            case MmixOpcode.NEGU:
            case MmixOpcode.SL:
            case MmixOpcode.SLU:
            case MmixOpcode.SR:
            case MmixOpcode.SRU:
            case MmixOpcode.CSN:
            case MmixOpcode.CSZ:
            case MmixOpcode.CSP:
            case MmixOpcode.CSOD:
            case MmixOpcode.CSNN:
            case MmixOpcode.CSNZ:
            case MmixOpcode.CSNP:
            case MmixOpcode.CSEV:
            case MmixOpcode.ZSN:
            case MmixOpcode.ZSZ:
            case MmixOpcode.ZSP:
            case MmixOpcode.ZSOD:
            case MmixOpcode.ZSNN:
            case MmixOpcode.ZSNZ:
            case MmixOpcode.ZSNP:
            case MmixOpcode.ZSEV:
            case MmixOpcode.LDB:
            case MmixOpcode.LDBU:
            case MmixOpcode.LDW:
            case MmixOpcode.LDWU:
            case MmixOpcode.LDT:
            case MmixOpcode.LDTU:
            case MmixOpcode.LDO:
            case MmixOpcode.LDOU:
            case MmixOpcode.LDSF:
            case MmixOpcode.LDHT:
            case MmixOpcode.CSWAP:
            case MmixOpcode.LDUNC:
            case MmixOpcode.LDVTS:
            case MmixOpcode.PRELD:
            case MmixOpcode.PREGO:
            case MmixOpcode.GO:
            case MmixOpcode.STB:
            case MmixOpcode.STBU:
            case MmixOpcode.STW:
            case MmixOpcode.STWU:
            case MmixOpcode.STT:
            case MmixOpcode.STTU:
            case MmixOpcode.STO:
            case MmixOpcode.STOU:
            case MmixOpcode.STSF:
            case MmixOpcode.STHT:
            case MmixOpcode.STCO:
            case MmixOpcode.STUNC:
            case MmixOpcode.SYNCD:
            case MmixOpcode.PREST:
            case MmixOpcode.SYNCID:
            case MmixOpcode.PUSHGO:
            case MmixOpcode.OR:
            case MmixOpcode.ORN:
            case MmixOpcode.NOR:
            case MmixOpcode.XOR:
            case MmixOpcode.AND:
            case MmixOpcode.ANDN:
            case MmixOpcode.NAND:
            case MmixOpcode.NXOR:
            case MmixOpcode.BDIF:
            case MmixOpcode.WDIF:
            case MmixOpcode.TDIF:
            case MmixOpcode.ODIF:
            case MmixOpcode.MUX:
            case MmixOpcode.SADD:
            case MmixOpcode.MOR:
            case MmixOpcode.MXOR:
                return(MmixOpcodeCategory.ThreeRegs);

            case MmixOpcode.FLOTI:
            case MmixOpcode.FLOTUI:
            case MmixOpcode.SFLOTI:
            case MmixOpcode.SFLOTUI:
            case MmixOpcode.MULI:
            case MmixOpcode.MULUI:
            case MmixOpcode.DIVI:
            case MmixOpcode.DIVUI:
            case MmixOpcode.ADDI:
            case MmixOpcode.ADDUI:
            case MmixOpcode.SUBI:
            case MmixOpcode.SUBUI:
            case MmixOpcode._2ADDUI:
            case MmixOpcode._4ADDUI:
            case MmixOpcode._8ADDUI:
            case MmixOpcode._16ADDUI:
            case MmixOpcode.CMPI:
            case MmixOpcode.CMPUI:
            case MmixOpcode.NEGI:
            case MmixOpcode.NEGUI:
            case MmixOpcode.SLI:
            case MmixOpcode.SLUI:
            case MmixOpcode.SRI:
            case MmixOpcode.SRUI:
            case MmixOpcode.CSNI:
            case MmixOpcode.CSZI:
            case MmixOpcode.CSPI:
            case MmixOpcode.CSODI:
            case MmixOpcode.CSNZI:
            case MmixOpcode.CSNPI:
            case MmixOpcode.CSEVI:
            case MmixOpcode.ZSNI:
            case MmixOpcode.ZSZI:
            case MmixOpcode.ZSPI:
            case MmixOpcode.ZSODI:
            case MmixOpcode.ZSNNI:
            case MmixOpcode.ZSNZI:
            case MmixOpcode.ZSNPI:
            case MmixOpcode.ZSEVI:
            case MmixOpcode.LDBI:
            case MmixOpcode.LDBUI:
            case MmixOpcode.LDWI:
            case MmixOpcode.LDWUI:
            case MmixOpcode.LDTI:
            case MmixOpcode.LDTUI:
            case MmixOpcode.LDOI:
            case MmixOpcode.LDOUI:
            case MmixOpcode.LDSFI:
            case MmixOpcode.LDHTI:
            case MmixOpcode.CSWAPI:
            case MmixOpcode.LDUNCI:
            case MmixOpcode.LDVTSI:
            case MmixOpcode.PRELDI:
            case MmixOpcode.PREGOI:
            case MmixOpcode.GOI:
            case MmixOpcode.STBI:
            case MmixOpcode.STBUI:
            case MmixOpcode.STWI:
            case MmixOpcode.STWUI:
            case MmixOpcode.STTI:
            case MmixOpcode.STTUI:
            case MmixOpcode.STOI:
            case MmixOpcode.STOUI:
            case MmixOpcode.STSFI:
            case MmixOpcode.STHTI:
            case MmixOpcode.STCOI:
            case MmixOpcode.STUNCI:
            case MmixOpcode.SYNCDI:
            case MmixOpcode.PRESTI:
            case MmixOpcode.SYNCIDI:
            case MmixOpcode.PUSHGOI:
            case MmixOpcode.ORI:
            case MmixOpcode.ORNI:
            case MmixOpcode.NORI:
            case MmixOpcode.XORI:
            case MmixOpcode.ANDI:
            case MmixOpcode.ANDNI:
            case MmixOpcode.NANDI:
            case MmixOpcode.NXORI:
            case MmixOpcode.BDIFI:
            case MmixOpcode.WDIFI:
            case MmixOpcode.TDIFI:
            case MmixOpcode.ODIFI:
            case MmixOpcode.MUXI:
            case MmixOpcode.SADDI:
            case MmixOpcode.MORI:
            case MmixOpcode.MXORI:
            case MmixOpcode.PUTI:
                return(MmixOpcodeCategory.TwoRegsAndImmediate);

            case MmixOpcode.BN:
            case MmixOpcode.BNB:
            case MmixOpcode.BZ:
            case MmixOpcode.BZB:
            case MmixOpcode.BP:
            case MmixOpcode.BPB:
            case MmixOpcode.BOD:
            case MmixOpcode.BODB:
            case MmixOpcode.BNN:
            case MmixOpcode.BNNB:
            case MmixOpcode.BNZ:
            case MmixOpcode.BNZB:
            case MmixOpcode.BNP:
            case MmixOpcode.BNPB:
            case MmixOpcode.BEV:
            case MmixOpcode.BEVB:
            case MmixOpcode.PBN:
            case MmixOpcode.PBNB:
            case MmixOpcode.PBZ:
            case MmixOpcode.PBZB:
            case MmixOpcode.PBP:
            case MmixOpcode.PBPB:
            case MmixOpcode.PBOD:
            case MmixOpcode.PBODB:
            case MmixOpcode.PBNN:
            case MmixOpcode.PBNNB:
            case MmixOpcode.PBNZ:
            case MmixOpcode.PBNZB:
            case MmixOpcode.PBNP:
            case MmixOpcode.PBNPB:
            case MmixOpcode.PBEV:
            case MmixOpcode.PBEVB:
            case MmixOpcode.PUSHJ:
            case MmixOpcode.PUSHJB:
            case MmixOpcode.GETA:
            case MmixOpcode.GETAB:
                return(MmixOpcodeCategory.Branch);

            case MmixOpcode.JMP:
            case MmixOpcode.JMPB:
                return(MmixOpcodeCategory.Jump);

            case MmixOpcode.SETH:
            case MmixOpcode.SETMH:
            case MmixOpcode.SETML:
            case MmixOpcode.SETL:
            case MmixOpcode.INCH:
            case MmixOpcode.INCMH:
            case MmixOpcode.INCML:
            case MmixOpcode.INCL:
            case MmixOpcode.ORH:
            case MmixOpcode.ORMH:
            case MmixOpcode.ORML:
            case MmixOpcode.ORL:
            case MmixOpcode.ANDNH:
            case MmixOpcode.ANDNMH:
            case MmixOpcode.ANDNML:
            case MmixOpcode.ANDNL:
                return(MmixOpcodeCategory.RegAndWydeImmediate);

            case MmixOpcode.GET:
                return(MmixOpcodeCategory.GetSpecialRegister);

            case MmixOpcode.PUT:
                return(MmixOpcodeCategory.PutSpecialRegister);

            default:
                return(MmixOpcodeCategory.NonStrict);
            }
        }
示例#2
0
文件: OpCode.cs 项目: xuhd/llvmmmix
        public static MmixOpcode getBackwardCounterpart(MmixOpcode arg)
        {
            switch (arg)
            {
            case MmixOpcode.BN:
                return(MmixOpcode.BNB);

            case MmixOpcode.BZ:
                return(MmixOpcode.BZB);

            case MmixOpcode.BP:
                return(MmixOpcode.BPB);

            case MmixOpcode.BOD:
                return(MmixOpcode.BODB);

            case MmixOpcode.BNN:
                return(MmixOpcode.BNNB);

            case MmixOpcode.BNZ:
                return(MmixOpcode.BNZB);

            case MmixOpcode.BNP:
                return(MmixOpcode.BNPB);

            case MmixOpcode.BEV:
                return(MmixOpcode.BEVB);

            case MmixOpcode.PBN:
                return(MmixOpcode.PBNB);

            case MmixOpcode.PBZ:
                return(MmixOpcode.PBZB);

            case MmixOpcode.PBP:
                return(MmixOpcode.PBPB);

            case MmixOpcode.PBOD:
                return(MmixOpcode.PBODB);

            case MmixOpcode.PBNN:
                return(MmixOpcode.PBNNB);

            case MmixOpcode.PBNZ:
                return(MmixOpcode.PBNZB);

            case MmixOpcode.PBNP:
                return(MmixOpcode.PBNPB);

            case MmixOpcode.PBEV:
                return(MmixOpcode.PBEVB);

            case MmixOpcode.JMP:
                return(MmixOpcode.JMPB);

            case MmixOpcode.PUSHJ:
                return(MmixOpcode.PUSHJB);

            case MmixOpcode.GETA:
                return(MmixOpcode.GETAB);

            default:
                return(MmixOpcode.ILLEGAL);
            }
        }
示例#3
0
文件: OpCode.cs 项目: xuhd/llvmmmix
        public static MmixOpcode getImmediateCounterpart(MmixOpcode arg)
        {
            switch (arg)
            {
            case MmixOpcode.FLOT:
                return(MmixOpcode.FLOTI);

            case MmixOpcode.FLOTU:
                return(MmixOpcode.FLOTUI);

            case MmixOpcode.SFLOT:
                return(MmixOpcode.SFLOTI);

            case MmixOpcode.SFLOTU:
                return(MmixOpcode.SFLOTUI);

            case MmixOpcode.MUL:
                return(MmixOpcode.MULI);

            case MmixOpcode.MULU:
                return(MmixOpcode.MULUI);

            case MmixOpcode.DIV:
                return(MmixOpcode.DIVI);

            case MmixOpcode.DIVU:
                return(MmixOpcode.DIVUI);

            case MmixOpcode.ADD:
                return(MmixOpcode.ADDI);

            case MmixOpcode.ADDU:
                return(MmixOpcode.ADDUI);

            case MmixOpcode.SUB:
                return(MmixOpcode.SUBI);

            case MmixOpcode.SUBU:
                return(MmixOpcode.SUBUI);

            case MmixOpcode._2ADDU:
                return(MmixOpcode._2ADDUI);

            case MmixOpcode._4ADDU:
                return(MmixOpcode._4ADDUI);

            case MmixOpcode._8ADDU:
                return(MmixOpcode._8ADDUI);

            case MmixOpcode._16ADDU:
                return(MmixOpcode._16ADDUI);

            case MmixOpcode.CMP:
                return(MmixOpcode.CMPI);

            case MmixOpcode.CMPU:
                return(MmixOpcode.CMPUI);

            case MmixOpcode.NEG:
                return(MmixOpcode.NEGI);

            case MmixOpcode.NEGU:
                return(MmixOpcode.NEGUI);

            case MmixOpcode.SL:
                return(MmixOpcode.SLI);

            case MmixOpcode.SLU:
                return(MmixOpcode.SLUI);

            case MmixOpcode.SR:
                return(MmixOpcode.SRI);

            case MmixOpcode.SRU:
                return(MmixOpcode.SRUI);

            case MmixOpcode.CSN:
                return(MmixOpcode.CSNI);

            case MmixOpcode.CSZ:
                return(MmixOpcode.CSZI);

            case MmixOpcode.CSP:
                return(MmixOpcode.CSPI);

            case MmixOpcode.CSOD:
                return(MmixOpcode.CSODI);

            case MmixOpcode.CSNN:
                return(MmixOpcode.CSNI);

            case MmixOpcode.CSNZ:
                return(MmixOpcode.CSNZI);

            case MmixOpcode.CSNP:
                return(MmixOpcode.CSNPI);

            case MmixOpcode.CSEV:
                return(MmixOpcode.CSEVI);

            case MmixOpcode.ZSN:
                return(MmixOpcode.ZSNI);

            case MmixOpcode.ZSZ:
                return(MmixOpcode.ZSZI);

            case MmixOpcode.ZSP:
                return(MmixOpcode.ZSPI);

            case MmixOpcode.ZSOD:
                return(MmixOpcode.ZSODI);

            case MmixOpcode.ZSNN:
                return(MmixOpcode.ZSNNI);

            case MmixOpcode.ZSNZ:
                return(MmixOpcode.ZSNZI);

            case MmixOpcode.ZSNP:
                return(MmixOpcode.ZSNPI);

            case MmixOpcode.ZSEV:
                return(MmixOpcode.ZSEVI);

            case MmixOpcode.LDB:
                return(MmixOpcode.LDBI);

            case MmixOpcode.LDBU:
                return(MmixOpcode.LDBUI);

            case MmixOpcode.LDW:
                return(MmixOpcode.LDWI);

            case MmixOpcode.LDWU:
                return(MmixOpcode.LDWUI);

            case MmixOpcode.LDT:
                return(MmixOpcode.LDTI);

            case MmixOpcode.LDTU:
                return(MmixOpcode.LDTUI);

            case MmixOpcode.LDO:
                return(MmixOpcode.LDOI);

            case MmixOpcode.LDOU:
                return(MmixOpcode.LDOUI);

            case MmixOpcode.LDSF:
                return(MmixOpcode.LDSFI);

            case MmixOpcode.LDHT:
                return(MmixOpcode.LDHTI);

            case MmixOpcode.CSWAP:
                return(MmixOpcode.CSWAPI);

            case MmixOpcode.LDUNC:
                return(MmixOpcode.LDUNCI);

            case MmixOpcode.LDVTS:
                return(MmixOpcode.LDVTSI);

            case MmixOpcode.PRELD:
                return(MmixOpcode.PRELDI);

            case MmixOpcode.PREGO:
                return(MmixOpcode.PREGOI);

            case MmixOpcode.GO:
                return(MmixOpcode.GOI);

            case MmixOpcode.STB:
                return(MmixOpcode.STBI);

            case MmixOpcode.STBU:
                return(MmixOpcode.STBUI);

            case MmixOpcode.STW:
                return(MmixOpcode.STWI);

            case MmixOpcode.STWU:
                return(MmixOpcode.STWUI);

            case MmixOpcode.STT:
                return(MmixOpcode.STTI);

            case MmixOpcode.STTU:
                return(MmixOpcode.STTUI);

            case MmixOpcode.STO:
                return(MmixOpcode.STOI);

            case MmixOpcode.STOU:
                return(MmixOpcode.STOUI);

            case MmixOpcode.STSF:
                return(MmixOpcode.STSFI);

            case MmixOpcode.STHT:
                return(MmixOpcode.STHTI);

            case MmixOpcode.STCO:
                return(MmixOpcode.STCOI);

            case MmixOpcode.STUNC:
                return(MmixOpcode.STUNCI);

            case MmixOpcode.SYNCD:
                return(MmixOpcode.SYNCDI);

            case MmixOpcode.PREST:
                return(MmixOpcode.PRESTI);

            case MmixOpcode.SYNCID:
                return(MmixOpcode.SYNCIDI);

            case MmixOpcode.PUSHGO:
                return(MmixOpcode.PUSHGOI);

            case MmixOpcode.OR:
                return(MmixOpcode.ORI);

            case MmixOpcode.ORN:
                return(MmixOpcode.ORNI);

            case MmixOpcode.NOR:
                return(MmixOpcode.NORI);

            case MmixOpcode.XOR:
                return(MmixOpcode.XORI);

            case MmixOpcode.AND:
                return(MmixOpcode.ANDI);

            case MmixOpcode.ANDN:
                return(MmixOpcode.ANDNI);

            case MmixOpcode.NAND:
                return(MmixOpcode.NANDI);

            case MmixOpcode.NXOR:
                return(MmixOpcode.NXORI);

            case MmixOpcode.BDIF:
                return(MmixOpcode.BDIFI);

            case MmixOpcode.WDIF:
                return(MmixOpcode.WDIFI);

            case MmixOpcode.TDIF:
                return(MmixOpcode.TDIFI);

            case MmixOpcode.ODIF:
                return(MmixOpcode.ODIFI);

            case MmixOpcode.MUX:
                return(MmixOpcode.MUXI);

            case MmixOpcode.SADD:
                return(MmixOpcode.SADDI);

            case MmixOpcode.MOR:
                return(MmixOpcode.MORI);

            case MmixOpcode.MXOR:
                return(MmixOpcode.MXORI);

            case MmixOpcode.PUT:
                return(MmixOpcode.PUTI);

            default:
                return(MmixOpcode.ILLEGAL);
            }
        }
示例#4
0
文件: OpCode.cs 项目: xuhd/llvmmmix
        /*

        */
        public static MmixOpcodeCategory getOpcodeCategory(MmixOpcode arg)
        {
            switch (arg) {
                case MmixOpcode.FLOT:
                case MmixOpcode.FLOTU:
                case MmixOpcode.SFLOT:
                case MmixOpcode.SFLOTU:
                case MmixOpcode.MUL:
                case MmixOpcode.MULU:
                case MmixOpcode.DIV:
                case MmixOpcode.DIVU:
                case MmixOpcode.ADD:
                case MmixOpcode.ADDU:
                case MmixOpcode.SUB:
                case MmixOpcode.SUBU:
                case MmixOpcode._2ADDU:
                case MmixOpcode._4ADDU:
                case MmixOpcode._8ADDU:
                case MmixOpcode._16ADDU:
                case MmixOpcode.CMP:
                case MmixOpcode.CMPU:
                case MmixOpcode.NEG:
                case MmixOpcode.NEGU:
                case MmixOpcode.SL:
                case MmixOpcode.SLU:
                case MmixOpcode.SR:
                case MmixOpcode.SRU:
                case MmixOpcode.CSN:
                case MmixOpcode.CSZ:
                case MmixOpcode.CSP:
                case MmixOpcode.CSOD:
                case MmixOpcode.CSNN:
                case MmixOpcode.CSNZ:
                case MmixOpcode.CSNP:
                case MmixOpcode.CSEV:
                case MmixOpcode.ZSN:
                case MmixOpcode.ZSZ:
                case MmixOpcode.ZSP:
                case MmixOpcode.ZSOD:
                case MmixOpcode.ZSNN:
                case MmixOpcode.ZSNZ:
                case MmixOpcode.ZSNP:
                case MmixOpcode.ZSEV:
                case MmixOpcode.LDB:
                case MmixOpcode.LDBU:
                case MmixOpcode.LDW:
                case MmixOpcode.LDWU:
                case MmixOpcode.LDT:
                case MmixOpcode.LDTU:
                case MmixOpcode.LDO:
                case MmixOpcode.LDOU:
                case MmixOpcode.LDSF:
                case MmixOpcode.LDHT:
                case MmixOpcode.CSWAP:
                case MmixOpcode.LDUNC:
                case MmixOpcode.LDVTS:
                case MmixOpcode.PRELD:
                case MmixOpcode.PREGO:
                case MmixOpcode.GO:
                case MmixOpcode.STB:
                case MmixOpcode.STBU:
                case MmixOpcode.STW:
                case MmixOpcode.STWU:
                case MmixOpcode.STT:
                case MmixOpcode.STTU:
                case MmixOpcode.STO:
                case MmixOpcode.STOU:
                case MmixOpcode.STSF:
                case MmixOpcode.STHT:
                case MmixOpcode.STCO:
                case MmixOpcode.STUNC:
                case MmixOpcode.SYNCD:
                case MmixOpcode.PREST:
                case MmixOpcode.SYNCID:
                case MmixOpcode.PUSHGO:
                case MmixOpcode.OR:
                case MmixOpcode.ORN:
                case MmixOpcode.NOR:
                case MmixOpcode.XOR:
                case MmixOpcode.AND:
                case MmixOpcode.ANDN:
                case MmixOpcode.NAND:
                case MmixOpcode.NXOR:
                case MmixOpcode.BDIF:
                case MmixOpcode.WDIF:
                case MmixOpcode.TDIF:
                case MmixOpcode.ODIF:
                case MmixOpcode.MUX:
                case MmixOpcode.SADD:
                case MmixOpcode.MOR:
                case MmixOpcode.MXOR:
                    return MmixOpcodeCategory.ThreeRegs;
                case MmixOpcode.FLOTI:
                case MmixOpcode.FLOTUI:
                case MmixOpcode.SFLOTI:
                case MmixOpcode.SFLOTUI:
                case MmixOpcode.MULI:
                case MmixOpcode.MULUI:
                case MmixOpcode.DIVI:
                case MmixOpcode.DIVUI:
                case MmixOpcode.ADDI:
                case MmixOpcode.ADDUI:
                case MmixOpcode.SUBI:
                case MmixOpcode.SUBUI:
                case MmixOpcode._2ADDUI:
                case MmixOpcode._4ADDUI:
                case MmixOpcode._8ADDUI:
                case MmixOpcode._16ADDUI:
                case MmixOpcode.CMPI:
                case MmixOpcode.CMPUI:
                case MmixOpcode.NEGI:
                case MmixOpcode.NEGUI:
                case MmixOpcode.SLI:
                case MmixOpcode.SLUI:
                case MmixOpcode.SRI:
                case MmixOpcode.SRUI:
                case MmixOpcode.CSNI:
                case MmixOpcode.CSZI:
                case MmixOpcode.CSPI:
                case MmixOpcode.CSODI:
                case MmixOpcode.CSNZI:
                case MmixOpcode.CSNPI:
                case MmixOpcode.CSEVI:
                case MmixOpcode.ZSNI:
                case MmixOpcode.ZSZI:
                case MmixOpcode.ZSPI:
                case MmixOpcode.ZSODI:
                case MmixOpcode.ZSNNI:
                case MmixOpcode.ZSNZI:
                case MmixOpcode.ZSNPI:
                case MmixOpcode.ZSEVI:
                case MmixOpcode.LDBI:
                case MmixOpcode.LDBUI:
                case MmixOpcode.LDWI:
                case MmixOpcode.LDWUI:
                case MmixOpcode.LDTI:
                case MmixOpcode.LDTUI:
                case MmixOpcode.LDOI:
                case MmixOpcode.LDOUI:
                case MmixOpcode.LDSFI:
                case MmixOpcode.LDHTI:
                case MmixOpcode.CSWAPI:
                case MmixOpcode.LDUNCI:
                case MmixOpcode.LDVTSI:
                case MmixOpcode.PRELDI:
                case MmixOpcode.PREGOI:
                case MmixOpcode.GOI:
                case MmixOpcode.STBI:
                case MmixOpcode.STBUI:
                case MmixOpcode.STWI:
                case MmixOpcode.STWUI:
                case MmixOpcode.STTI:
                case MmixOpcode.STTUI:
                case MmixOpcode.STOI:
                case MmixOpcode.STOUI:
                case MmixOpcode.STSFI:
                case MmixOpcode.STHTI:
                case MmixOpcode.STCOI:
                case MmixOpcode.STUNCI:
                case MmixOpcode.SYNCDI:
                case MmixOpcode.PRESTI:
                case MmixOpcode.SYNCIDI:
                case MmixOpcode.PUSHGOI:
                case MmixOpcode.ORI:
                case MmixOpcode.ORNI:
                case MmixOpcode.NORI:
                case MmixOpcode.XORI:
                case MmixOpcode.ANDI:
                case MmixOpcode.ANDNI:
                case MmixOpcode.NANDI:
                case MmixOpcode.NXORI:
                case MmixOpcode.BDIFI:
                case MmixOpcode.WDIFI:
                case MmixOpcode.TDIFI:
                case MmixOpcode.ODIFI:
                case MmixOpcode.MUXI:
                case MmixOpcode.SADDI:
                case MmixOpcode.MORI:
                case MmixOpcode.MXORI:
                case MmixOpcode.PUTI:
                    return MmixOpcodeCategory.TwoRegsAndImmediate;
                case MmixOpcode.BN:
                case MmixOpcode.BNB:
                case MmixOpcode.BZ:
                case MmixOpcode.BZB:
                case MmixOpcode.BP:
                case MmixOpcode.BPB:
                case MmixOpcode.BOD:
                case MmixOpcode.BODB:
                case MmixOpcode.BNN:
                case MmixOpcode.BNNB:
                case MmixOpcode.BNZ:
                case MmixOpcode.BNZB:
                case MmixOpcode.BNP:
                case MmixOpcode.BNPB:
                case MmixOpcode.BEV:
                case MmixOpcode.BEVB:
                case MmixOpcode.PBN:
                case MmixOpcode.PBNB:
                case MmixOpcode.PBZ:
                case MmixOpcode.PBZB:
                case MmixOpcode.PBP:
                case MmixOpcode.PBPB:
                case MmixOpcode.PBOD:
                case MmixOpcode.PBODB:
                case MmixOpcode.PBNN:
                case MmixOpcode.PBNNB:
                case MmixOpcode.PBNZ:
                case MmixOpcode.PBNZB:
                case MmixOpcode.PBNP:
                case MmixOpcode.PBNPB:
                case MmixOpcode.PBEV:
                case MmixOpcode.PBEVB:
                case MmixOpcode.PUSHJ:
                case MmixOpcode.PUSHJB:
                case MmixOpcode.GETA:
                case MmixOpcode.GETAB:
                    return MmixOpcodeCategory.Branch;
                case MmixOpcode.JMP:
                case MmixOpcode.JMPB:
                    return MmixOpcodeCategory.Jump;
                case MmixOpcode.SETH:
                case MmixOpcode.SETMH:
                case MmixOpcode.SETML:
                case MmixOpcode.SETL:
                case MmixOpcode.INCH:
                case MmixOpcode.INCMH:
                case MmixOpcode.INCML:
                case MmixOpcode.INCL:
                case MmixOpcode.ORH:
                case MmixOpcode.ORMH:
                case MmixOpcode.ORML:
                case MmixOpcode.ORL:
                case MmixOpcode.ANDNH:
                case MmixOpcode.ANDNMH:
                case MmixOpcode.ANDNML:
                case MmixOpcode.ANDNL:
                    return MmixOpcodeCategory.RegAndWydeImmediate;
                case MmixOpcode.GET:
                    return MmixOpcodeCategory.GetSpecialRegister;
                case MmixOpcode.PUT:
                    return MmixOpcodeCategory.PutSpecialRegister;
                default:
                    return MmixOpcodeCategory.NonStrict;
            }
        }
示例#5
0
文件: OpCode.cs 项目: xuhd/llvmmmix
 public static MmixOpcode getImmediateCounterpart(MmixOpcode arg)
 {
     switch (arg) {
         case MmixOpcode.FLOT:
             return MmixOpcode.FLOTI;
         case MmixOpcode.FLOTU:
             return MmixOpcode.FLOTUI;
         case MmixOpcode.SFLOT:
             return MmixOpcode.SFLOTI;
         case MmixOpcode.SFLOTU:
             return MmixOpcode.SFLOTUI;
         case MmixOpcode.MUL:
             return MmixOpcode.MULI;
         case MmixOpcode.MULU:
             return MmixOpcode.MULUI;
         case MmixOpcode.DIV:
             return MmixOpcode.DIVI;
         case MmixOpcode.DIVU:
             return MmixOpcode.DIVUI;
         case MmixOpcode.ADD:
             return MmixOpcode.ADDI;
         case MmixOpcode.ADDU:
             return MmixOpcode.ADDUI;
         case MmixOpcode.SUB:
             return MmixOpcode.SUBI;
         case MmixOpcode.SUBU:
             return MmixOpcode.SUBUI;
         case MmixOpcode._2ADDU:
             return MmixOpcode._2ADDUI;
         case MmixOpcode._4ADDU:
             return MmixOpcode._4ADDUI;
         case MmixOpcode._8ADDU:
             return MmixOpcode._8ADDUI;
         case MmixOpcode._16ADDU:
             return MmixOpcode._16ADDUI;
         case MmixOpcode.CMP:
             return MmixOpcode.CMPI;
         case MmixOpcode.CMPU:
             return MmixOpcode.CMPUI;
         case MmixOpcode.NEG:
             return MmixOpcode.NEGI;
         case MmixOpcode.NEGU:
             return MmixOpcode.NEGUI;
         case MmixOpcode.SL:
             return MmixOpcode.SLI;
         case MmixOpcode.SLU:
             return MmixOpcode.SLUI;
         case MmixOpcode.SR:
             return MmixOpcode.SRI;
         case MmixOpcode.SRU:
             return MmixOpcode.SRUI;
         case MmixOpcode.CSN:
             return MmixOpcode.CSNI;
         case MmixOpcode.CSZ:
             return MmixOpcode.CSZI;
         case MmixOpcode.CSP:
             return MmixOpcode.CSPI;
         case MmixOpcode.CSOD:
             return MmixOpcode.CSODI;
         case MmixOpcode.CSNN:
             return MmixOpcode.CSNI;
         case MmixOpcode.CSNZ:
             return MmixOpcode.CSNZI;
         case MmixOpcode.CSNP:
             return MmixOpcode.CSNPI;
         case MmixOpcode.CSEV:
             return MmixOpcode.CSEVI;
         case MmixOpcode.ZSN:
             return MmixOpcode.ZSNI;
         case MmixOpcode.ZSZ:
             return MmixOpcode.ZSZI;
         case MmixOpcode.ZSP:
             return MmixOpcode.ZSPI;
         case MmixOpcode.ZSOD:
             return MmixOpcode.ZSODI;
         case MmixOpcode.ZSNN:
             return MmixOpcode.ZSNNI;
         case MmixOpcode.ZSNZ:
             return MmixOpcode.ZSNZI;
         case MmixOpcode.ZSNP:
             return MmixOpcode.ZSNPI;
         case MmixOpcode.ZSEV:
             return MmixOpcode.ZSEVI;
         case MmixOpcode.LDB:
             return MmixOpcode.LDBI;
         case MmixOpcode.LDBU:
             return MmixOpcode.LDBUI;
         case MmixOpcode.LDW:
             return MmixOpcode.LDWI;
         case MmixOpcode.LDWU:
             return MmixOpcode.LDWUI;
         case MmixOpcode.LDT:
             return MmixOpcode.LDTI;
         case MmixOpcode.LDTU:
             return MmixOpcode.LDTUI;
         case MmixOpcode.LDO:
             return MmixOpcode.LDOI;
         case MmixOpcode.LDOU:
             return MmixOpcode.LDOUI;
         case MmixOpcode.LDSF:
             return MmixOpcode.LDSFI;
         case MmixOpcode.LDHT:
             return MmixOpcode.LDHTI;
         case MmixOpcode.CSWAP:
             return MmixOpcode.CSWAPI;
         case MmixOpcode.LDUNC:
             return MmixOpcode.LDUNCI;
         case MmixOpcode.LDVTS:
             return MmixOpcode.LDVTSI;
         case MmixOpcode.PRELD:
             return MmixOpcode.PRELDI;
         case MmixOpcode.PREGO:
             return MmixOpcode.PREGOI;
         case MmixOpcode.GO:
             return MmixOpcode.GOI;
         case MmixOpcode.STB:
             return MmixOpcode.STBI;
         case MmixOpcode.STBU:
             return MmixOpcode.STBUI;
         case MmixOpcode.STW:
             return MmixOpcode.STWI;
         case MmixOpcode.STWU:
             return MmixOpcode.STWUI;
         case MmixOpcode.STT:
             return MmixOpcode.STTI;
         case MmixOpcode.STTU:
             return MmixOpcode.STTUI;
         case MmixOpcode.STO:
             return MmixOpcode.STOI;
         case MmixOpcode.STOU:
             return MmixOpcode.STOUI;
         case MmixOpcode.STSF:
             return MmixOpcode.STSFI;
         case MmixOpcode.STHT:
             return MmixOpcode.STHTI;
         case MmixOpcode.STCO:
             return MmixOpcode.STCOI;
         case MmixOpcode.STUNC:
             return MmixOpcode.STUNCI;
         case MmixOpcode.SYNCD:
             return MmixOpcode.SYNCDI;
         case MmixOpcode.PREST:
             return MmixOpcode.PRESTI;
         case MmixOpcode.SYNCID:
             return MmixOpcode.SYNCIDI;
         case MmixOpcode.PUSHGO:
             return MmixOpcode.PUSHGOI;
         case MmixOpcode.OR:
             return MmixOpcode.ORI;
         case MmixOpcode.ORN:
             return MmixOpcode.ORNI;
         case MmixOpcode.NOR:
             return MmixOpcode.NORI;
         case MmixOpcode.XOR:
             return MmixOpcode.XORI;
         case MmixOpcode.AND:
             return MmixOpcode.ANDI;
         case MmixOpcode.ANDN:
             return MmixOpcode.ANDNI;
         case MmixOpcode.NAND:
             return MmixOpcode.NANDI;
         case MmixOpcode.NXOR:
             return MmixOpcode.NXORI;
         case MmixOpcode.BDIF:
             return MmixOpcode.BDIFI;
         case MmixOpcode.WDIF:
             return MmixOpcode.WDIFI;
         case MmixOpcode.TDIF:
             return MmixOpcode.TDIFI;
         case MmixOpcode.ODIF:
             return MmixOpcode.ODIFI;
         case MmixOpcode.MUX:
             return MmixOpcode.MUXI;
         case MmixOpcode.SADD:
             return MmixOpcode.SADDI;
         case MmixOpcode.MOR:
             return MmixOpcode.MORI;
         case MmixOpcode.MXOR:
             return MmixOpcode.MXORI;
         case MmixOpcode.PUT:
             return MmixOpcode.PUTI;
         default:
             return MmixOpcode.ILLEGAL;
     }
 }
示例#6
0
文件: OpCode.cs 项目: xuhd/llvmmmix
 public static MmixOpcode getBackwardCounterpart(MmixOpcode arg)
 {
     switch (arg) {
         case MmixOpcode.BN:
             return MmixOpcode.BNB;
         case MmixOpcode.BZ:
             return MmixOpcode.BZB;
         case MmixOpcode.BP:
             return MmixOpcode.BPB;
         case MmixOpcode.BOD:
             return MmixOpcode.BODB;
         case MmixOpcode.BNN:
             return MmixOpcode.BNNB;
         case MmixOpcode.BNZ:
             return MmixOpcode.BNZB;
         case MmixOpcode.BNP:
             return MmixOpcode.BNPB;
         case MmixOpcode.BEV:
             return MmixOpcode.BEVB;
         case MmixOpcode.PBN:
             return MmixOpcode.PBNB;
         case MmixOpcode.PBZ:
             return MmixOpcode.PBZB;
         case MmixOpcode.PBP:
             return MmixOpcode.PBPB;
         case MmixOpcode.PBOD:
             return MmixOpcode.PBODB;
         case MmixOpcode.PBNN:
             return MmixOpcode.PBNNB;
         case MmixOpcode.PBNZ:
             return MmixOpcode.PBNZB;
         case MmixOpcode.PBNP:
             return MmixOpcode.PBNPB;
         case MmixOpcode.PBEV:
             return MmixOpcode.PBEVB;
         case MmixOpcode.JMP:
             return MmixOpcode.JMPB;
         case MmixOpcode.PUSHJ:
             return MmixOpcode.PUSHJB;
         case MmixOpcode.GETA:
             return MmixOpcode.GETAB;
         default:
             return MmixOpcode.ILLEGAL;
     }
 }