@@ -597,6 +597,273 @@ let Predicates = [HasStdExtP, IsRV64] in {
597597 def PACKT_RV64 : RVPBinary_rr<0b0110, 0b11, 0b100, "packt">;
598598} // Predicates = [HasStdExtP, IsRV64]
599599
600+ let Predicates = [HasStdExtP] in {
601+ def PM2ADD_H : RVPBinary_rr<0b0000, 0b00, 0b101, "pm2add.h">;
602+ def PM4ADD_B : RVPBinary_rr<0b0000, 0b10, 0b101, "pm4add.b">;
603+
604+ def PM2ADDA_H : RVPTernary_rrr<0b0001, 0b00, 0b101, "pm2adda.h">;
605+ def PM4ADDA_B : RVPTernary_rrr<0b0001, 0b10, 0b101, "pm4adda.b">;
606+
607+ def PM2ADD_HX : RVPBinary_rr<0b0010, 0b00, 0b101, "pm2add.hx">;
608+
609+ def PM2ADDA_HX : RVPTernary_rrr<0b0011, 0b00, 0b101, "pm2adda.hx">;
610+
611+ def PM2ADDU_H : RVPBinary_rr<0b0100, 0b00, 0b101, "pm2addu.h">;
612+ def PM4ADDU_B : RVPBinary_rr<0b0100, 0b10, 0b101, "pm4addu.b">;
613+
614+ def PM2ADDAU_H : RVPTernary_rrr<0b0101, 0b00, 0b101, "pm2addau.h">;
615+ def PM4ADDAU_B : RVPTernary_rrr<0b0101, 0b10, 0b101, "pm4addau.b">;
616+
617+ def PMQ2ADD_H : RVPBinary_rr<0b0110, 0b00, 0b101, "pmq2add.h">;
618+ def PMQR2ADD_H : RVPBinary_rr<0b0110, 0b10, 0b101, "pmqr2add.h">;
619+
620+ def PMQ2ADDA_H : RVPTernary_rrr<0b0111, 0b00, 0b101, "pmq2adda.h">;
621+ def PMQR2ADDA_H : RVPTernary_rrr<0b0111, 0b10, 0b101, "pmqr2adda.h">;
622+
623+ def PM2SUB_H : RVPBinary_rr<0b1000, 0b00, 0b101, "pm2sub.h">;
624+ def PM2SADD_H : RVPBinary_rr<0b1000, 0b10, 0b101, "pm2sadd.h">;
625+
626+ def PM2SUBA_H : RVPTernary_rrr<0b1001, 0b00, 0b101, "pm2suba.h">;
627+
628+ def PM2SUB_HX : RVPBinary_rr<0b1010, 0b00, 0b101, "pm2sub.hx">;
629+ def PM2SADD_HX : RVPBinary_rr<0b1010, 0b10, 0b101, "pm2sadd.hx">;
630+
631+ def PM2SUBA_HX : RVPTernary_rrr<0b1011, 0b00, 0b101, "pm2suba.hx">;
632+
633+ def PM2ADDSU_H : RVPBinary_rr<0b1100, 0b00, 0b101, "pm2addsu.h">;
634+ def PM4ADDSU_B : RVPBinary_rr<0b1100, 0b10, 0b101, "pm4addsu.b">;
635+
636+ def PM2ADDASU_H : RVPBinary_rr<0b1101, 0b00, 0b101, "pm2addasu.h">;
637+ def PM4ADDASU_B : RVPBinary_rr<0b1101, 0b10, 0b101, "pm4addasu.b">;
638+ } // Predicates = [HasStdExtP]
639+
640+ let Predicates = [HasStdExtP, IsRV32], DecoderNamespace = "RV32Only" in {
641+ def MQACC_H01 : RVPBinary_rr<0b1111, 0b00, 0b101, "mqacc.h01">;
642+ def MQRACC_H01 : RVPBinary_rr<0b1111, 0b10, 0b101, "mqracc.h01">;
643+ } // // Predicates = [HasStdExtP, IsRV32], DecoderNamespace = "RV32Only"
644+ let Predicates = [HasStdExtP, IsRV64] in {
645+ def PM2ADD_W : RVPBinary_rr<0b0000, 0b01, 0b101, "pm2add.w">;
646+ def PM4ADD_H : RVPBinary_rr<0b0000, 0b11, 0b101, "pm4add.h">;
647+
648+ def PM2ADDA_W : RVPTernary_rrr<0b0001, 0b01, 0b101, "pm2adda.w">;
649+ def PM4ADDA_H : RVPTernary_rrr<0b0001, 0b11, 0b101, "pm4adda.h">;
650+
651+ def PM2ADD_WX : RVPBinary_rr<0b0010, 0b01, 0b101, "pm2add.wx">;
652+
653+ def PM2ADDA_WX : RVPTernary_rrr<0b0011, 0b01, 0b101, "pm2adda.wx">;
654+
655+ def PM2ADDU_W : RVPBinary_rr<0b0100, 0b01, 0b101, "pm2addu.w">;
656+ def PM4ADDU_H : RVPBinary_rr<0b0100, 0b11, 0b101, "pm4addu.h">;
657+
658+ def PM2ADDAU_W : RVPTernary_rrr<0b0101, 0b01, 0b101, "pm2addau.w">;
659+ def PM4ADDAU_H : RVPTernary_rrr<0b0101, 0b11, 0b101, "pm4addau.h">;
660+
661+ def PMQ2ADD_W : RVPBinary_rr<0b0110, 0b01, 0b101, "pmq2add.w">;
662+ def PMQR2ADD_W : RVPBinary_rr<0b0110, 0b11, 0b101, "pmqr2add.w">;
663+
664+ def PMQ2ADDA_W : RVPTernary_rrr<0b0111, 0b01, 0b101, "pmq2adda.w">;
665+ def PMQR2ADDA_W : RVPTernary_rrr<0b0111, 0b11, 0b101, "pmqr2adda.w">;
666+
667+ def PM2SUB_W : RVPBinary_rr<0b1000, 0b01, 0b101, "pm2sub.w">;
668+
669+ def PM2SUBA_W : RVPTernary_rrr<0b1001, 0b01, 0b101, "pm2suba.w">;
670+
671+ def PM2SUB_WX : RVPBinary_rr<0b1010, 0b01, 0b101, "pm2sub.wx">;
672+
673+ def PM2SUBA_WX : RVPBinary_rr<0b1011, 0b01, 0b101, "pm2suba.wx">;
674+
675+ def PM2ADDSU_W : RVPBinary_rr<0b1100, 0b01, 0b101, "pm2addsu.w">;
676+ def PM4ADDSU_H : RVPBinary_rr<0b1100, 0b11, 0b101, "pm4addsu.h">;
677+
678+ def PM2ADDASU_W : RVPTernary_rrr<0b1101, 0b01, 0b101, "pm2addasu.w">;
679+ def PM4ADDASU_H : RVPTernary_rrr<0b1101, 0b11, 0b101, "pm4addasu.h">;
680+
681+ def PMQACC_W_H01 : RVPTernary_rrr<0b1111, 0b00, 0b101, "pmqacc.w.h01">;
682+ def MQACC_W01 : RVPTernary_rrr<0b1111, 0b01, 0b101, "mqacc.w01">;
683+
684+ def PMQRACC_W_H01 : RVPTernary_rrr<0b1111, 0b10, 0b101, "pmqracc.w.h01">;
685+ def MQRACC_W01 : RVPTernary_rrr<0b1111, 0b11, 0b101, "mqracc.w01">;
686+ } // Predicates = [HasStdExtP, IsRV64]
687+
688+ let Predicates = [HasStdExtP] in {
689+ def PAS_HX : RVPBinary_rr<0b0000, 0b00, 0b110, "pas.hx">;
690+ def PSA_HX : RVPBinary_rr<0b0000, 0b10, 0b110, "psa.hx">;
691+
692+ def PSAS_HX : RVPBinary_rr<0b0010, 0b00, 0b110, "psas.hx">;
693+ def PSSA_HX : RVPBinary_rr<0b0010, 0b10, 0b110, "pssa.hx">;
694+
695+ def PAAS_HX : RVPBinary_rr<0b0011, 0b00, 0b110, "paas.hx">;
696+ def PASA_HX : RVPBinary_rr<0b0011, 0b10, 0b110, "pasa.hx">;
697+
698+ def PMSEQ_H : RVPBinary_rr<0b1000, 0b00, 0b110, "pmseq.h">;
699+ def PMSEQ_B : RVPBinary_rr<0b1000, 0b10, 0b110, "pmseq.b">;
700+
701+ def PMSLT_H : RVPBinary_rr<0b1010, 0b00, 0b110, "pmslt.h">;
702+ def PMSLT_B : RVPBinary_rr<0b1010, 0b10, 0b110, "pmslt.b">;
703+
704+ def PMSLTU_H : RVPBinary_rr<0b1011, 0b00, 0b110, "pmsltu.h">;
705+ def PMSLTU_B : RVPBinary_rr<0b1011, 0b10, 0b110, "pmsltu.b">;
706+
707+ def PMIN_H : RVPBinary_rr<0b1100, 0b00, 0b110, "pmin.h">;
708+ def PMIN_B : RVPBinary_rr<0b1100, 0b10, 0b110, "pmin.b">;
709+
710+ def PMINU_H : RVPBinary_rr<0b1101, 0b00, 0b110, "pminu.h">;
711+ def PMINU_B : RVPBinary_rr<0b1101, 0b10, 0b110, "pminu.b">;
712+
713+ def PMAX_H : RVPBinary_rr<0b1110, 0b00, 0b110, "pmax.h">;
714+ def PMAX_B : RVPBinary_rr<0b1110, 0b10, 0b110, "pmax.b">;
715+
716+ def PMAXU_H : RVPBinary_rr<0b1111, 0b00, 0b110, "pmaxu.h">;
717+ def PMAXU_B : RVPBinary_rr<0b1111, 0b10, 0b110, "pmaxu.b">;
718+ } // Predicates = [HasStdExtP]
719+ let Predicates = [HasStdExtP, IsRV32], DecoderNamespace = "RV32Only" in {
720+ def MSEQ : RVPBinary_rr<0b1000, 0b01, 0b110, "mseq">;
721+
722+ def MSLT : RVPBinary_rr<0b1010, 0b01, 0b110, "mslt">;
723+
724+ def MSLTU : RVPBinary_rr<0b1011, 0b01, 0b110, "msltu">;
725+ } // Predicates = [HasStdExtP, IsRV32], DecoderNamespace = "RV32Only"
726+ let Predicates = [HasStdExtP, IsRV64] in {
727+ def PAS_WX : RVPBinary_rr<0b0000, 0b01, 0b110, "pas.wx">;
728+ def PSA_WX : RVPBinary_rr<0b0000, 0b11, 0b110, "psa.wx">;
729+
730+ def PSAS_WX : RVPBinary_rr<0b0010, 0b01, 0b110, "psas.wx">;
731+ def PSSA_WX : RVPBinary_rr<0b0010, 0b11, 0b110, "pssa.wx">;
732+
733+ def PAAS_WX : RVPBinary_rr<0b0011, 0b01, 0b110, "paas.wx">;
734+ def PASA_WX : RVPBinary_rr<0b0011, 0b11, 0b110, "pasa.wx">;
735+
736+ def PMSEQ_W : RVPBinary_rr<0b1000, 0b01, 0b110, "pmseq.w">;
737+
738+ def PMSLT_W : RVPBinary_rr<0b1010, 0b01, 0b110, "pmslt.w">;
739+
740+ def PMSLTU_W : RVPBinary_rr<0b1011, 0b01, 0b110, "pmsltu.w">;
741+
742+ def PMIN_W : RVPBinary_rr<0b1100, 0b01, 0b110, "pmin.w">;
743+
744+ def PMINU_W : RVPBinary_rr<0b1101, 0b01, 0b110, "pminu.w">;
745+
746+ def PMAX_W : RVPBinary_rr<0b1110, 0b01, 0b110, "pmax.w">;
747+
748+ def PMAXU_W : RVPBinary_rr<0b1111, 0b01, 0b110, "pmaxu.w">;
749+ } // Predicates = [HasStdExtP, IsRV64]
750+
751+ let Predicates = [HasStdExtP] in {
752+ def PMULH_H : RVPBinary_rr<0b0000, 0b00, 0b111, "pmulh.h">;
753+ def PMULHR_H : RVPBinary_rr<0b0000, 0b10, 0b111, "pmulhr.h">;
754+
755+ def PMHACC_H : RVPTernary_rrr<0b0001, 0b00, 0b111, "pmhacc.h">;
756+ def PMHRACC_H : RVPTernary_rrr<0b0001, 0b10, 0b111, "pmhracc.h">;
757+
758+ def PMULHU_H : RVPBinary_rr<0b0010, 0b00, 0b111, "pmulhu.h">;
759+ def PMULHRU_H : RVPBinary_rr<0b0010, 0b10, 0b111, "pmulhru.h">;
760+
761+ def PMHACCU_H : RVPTernary_rrr<0b0011, 0b00, 0b111, "pmhaccu.h">;
762+ def PMHRACCU_H : RVPTernary_rrr<0b0011, 0b10, 0b111, "pmhraccu.h">;
763+
764+ def PMULH_H_B0 : RVPBinary_rr<0b0100, 0b00, 0b111, "pmulh.h.b0">;
765+ def PMULHSU_H_B0 : RVPBinary_rr<0b0100, 0b10, 0b111, "pmulhsu.h.b0">;
766+
767+ def PMHACC_H_B0 : RVPTernary_rrr<0b0101, 0b00, 0b111, "pmhacc.h.b0">;
768+ def PMHACCSU_H_B0 : RVPTernary_rrr<0b0101, 0b10, 0b111, "pmhaccsu.h.b0">;
769+
770+ def PMULH_H_B1 : RVPBinary_rr<0b0110, 0b00, 0b111, "pmulh.h.b1">;
771+ def PMULHSU_H_B1 : RVPBinary_rr<0b0110, 0b10, 0b111, "pmulhsu.h.b1">;
772+
773+ def PMHACC_H_B1 : RVPTernary_rrr<0b0111, 0b00, 0b111, "pmhacc.h.b1">;
774+ def PMHACCSU_H_B1 : RVPTernary_rrr<0b0111, 0b10, 0b111, "pmhaccsu.h.b1">;
775+
776+ def PMULHSU_H : RVPBinary_rr<0b1000, 0b00, 0b111, "pmulhsu.h">;
777+ def PMULHRSU_H : RVPBinary_rr<0b1000, 0b10, 0b111, "pmulhrsu.h">;
778+
779+ def PMHACCSU_H : RVPBinary_rr<0b1001, 0b00, 0b111, "pmhaccsu.h">;
780+ def PMHRACCSU_H : RVPBinary_rr<0b1001, 0b10, 0b111, "pmhraccsu.h">;
781+
782+ def PMULQ_H : RVPBinary_rr<0b1010, 0b00, 0b111, "pmulq.h">;
783+ def PMULQR_H : RVPBinary_rr<0b1010, 0b10, 0b111, "pmulqr.h">;
784+ } // Predicates = [HasStdExtP]
785+ let Predicates = [HasStdExtP, IsRV32], DecoderNamespace = "RV32Only" in {
786+ def MULHR : RVPBinary_rr<0b0000, 0b11, 0b111, "mulhr">;
787+
788+ def MHACC : RVPTernary_rrr<0b0001, 0b01, 0b111, "mhacc">;
789+ def MHRACC : RVPTernary_rrr<0b0001, 0b11, 0b111, "mhracc">;
790+
791+ def MULHRU : RVPBinary_rr<0b0010, 0b11, 0b111, "mulhru">;
792+
793+ def MHACCU : RVPTernary_rrr<0b0011, 0b01, 0b111, "mhaccu">;
794+ def MHRACCU : RVPTernary_rrr<0b0011, 0b11, 0b111, "mhraccu">;
795+
796+ def MULH_H0 : RVPBinary_rr<0b0100, 0b01, 0b111, "mulh.h0">;
797+ def MULHSU_H0 : RVPBinary_rr<0b0100, 0b11, 0b111, "mulhsu.h0">;
798+
799+ def MHACC_H0 : RVPTernary_rrr<0b0101, 0b01, 0b111, "mhacc.h0">;
800+ def MHACCSU_H0 : RVPTernary_rrr<0b0101, 0b11, 0b111, "mhaccsu.h0">;
801+
802+ def MULH_H1 : RVPBinary_rr<0b0110, 0b01, 0b111, "mulh.h1">;
803+ def MULHSU_H1 : RVPBinary_rr<0b0110, 0b11, 0b111, "mulhsu.h1">;
804+
805+ def MHACC_H1 : RVPTernary_rrr<0b0111, 0b01, 0b111, "mhacc.h1">;
806+ def MHACCSU_H1 : RVPTernary_rrr<0b0111, 0b11, 0b111, "mhaccsu.h1">;
807+
808+ def MULHRSU : RVPBinary_rr<0b1000, 0b11, 0b111, "mulhrsu">;
809+
810+ def MHACCSU : RVPTernary_rrr<0b1001, 0b01, 0b111, "mhaccsu">;
811+ def MHRACCSU : RVPTernary_rrr<0b1001, 0b11, 0b111, "mhraccsu">;
812+
813+ def MULQ : RVPBinary_rr<0b1010, 0b01, 0b111, "mulq">;
814+ def MULQR : RVPBinary_rr<0b1010, 0b11, 0b111, "mulqr">;
815+
816+ def MQACC_H00 : RVPTernary_rrr<0b1101, 0b00, 0b111, "mqacc.h00">;
817+ def MQRACC_H00 : RVPTernary_rrr<0b1101, 0b10, 0b111, "mqracc.h00">;
818+
819+ def MQACC_H11 : RVPTernary_rrr<0b1111, 0b00, 0b111, "mqacc.h11">;
820+ def MQRACC_H11 : RVPTernary_rrr<0b1111, 0b10, 0b111, "mqracc.h11">;
821+ } // Predicates = [HasStdExtP, IsRV32], DecoderNamespace = "RV32Only" in
822+ let Predicates = [HasStdExtP, IsRV64] in {
823+ def PMULH_W : RVPBinary_rr<0b0000, 0b01, 0b111, "pmulh.w">;
824+ def PMULHR_W : RVPBinary_rr<0b0000, 0b11, 0b111, "pmulhr.w">;
825+
826+ def PMHACC_W : RVPTernary_rrr<0b0001, 0b01, 0b111, "pmhacc.w">;
827+ def PMHRACC_W : RVPTernary_rrr<0b0001, 0b11, 0b111, "pmhracc.w">;
828+
829+ def PMULHU_W : RVPBinary_rr<0b0010, 0b01, 0b111, "pmulhu.w">;
830+ def PMULHRU_W : RVPBinary_rr<0b0010, 0b11, 0b111, "pmulhru.w">;
831+
832+ def PMHACCU_W : RVPTernary_rrr<0b0011, 0b01, 0b111, "pmhaccu.w">;
833+ def PMHRACCU_W : RVPTernary_rrr<0b0011, 0b11, 0b111, "pmhraccu.w">;
834+
835+ def PMULH_W_H0 : RVPBinary_rr<0b0100, 0b01, 0b111, "pmulh.w.h0">;
836+ def PMULHSU_W_H0 : RVPBinary_rr<0b0100, 0b11, 0b111, "pmulhsu.w.h0">;
837+
838+ def PMHACC_W_H0 : RVPBinary_rr<0b0101, 0b01, 0b111, "pmhacc.w.h0">;
839+ def PMHACCSU_W_H0 : RVPBinary_rr<0b0101, 0b11, 0b111, "pmhaccsu.w.h0">;
840+
841+ def PMULH_W_H1 : RVPBinary_rr<0b0110, 0b01, 0b111, "pmulh.w.h1">;
842+ def PMULHSU_W_H1 : RVPBinary_rr<0b0110, 0b11, 0b111, "pmulhsu.w.h1">;
843+
844+ def PMHACC_W_H1 : RVPTernary_rrr<0b0111, 0b01, 0b111, "pmhacc.w.h1">;
845+ def PMHACCSU_W_H1 : RVPTernary_rrr<0b0111, 0b11, 0b111, "pmhaccsu.w.h1">;
846+
847+ def PMULHSU_W : RVPBinary_rr<0b1000, 0b01, 0b111, "pmulhsu.w">;
848+ def PMULHRSU_W : RVPBinary_rr<0b1000, 0b11, 0b111, "pmulhrsu.w">;
849+
850+ def PMHACCSU_W : RVPTernary_rrr<0b1001, 0b01, 0b111, "pmhaccsu.w">;
851+ def PMHRACCSU_W : RVPTernary_rrr<0b1001, 0b11, 0b111, "pmhraccsu.w">;
852+
853+ def PMULQ_W : RVPBinary_rr<0b1010, 0b01, 0b111, "pmulq.w">;
854+ def PMULQR_W : RVPBinary_rr<0b1010, 0b11, 0b111, "pmulqr.w">;
855+
856+ def PMQACC_W_H00 : RVPTernary_rrr<0b1101, 0b00, 0b111, "pmqacc.w.h00">;
857+ def MQACC_W00 : RVPTernary_rrr<0b1101, 0b01, 0b111, "mqacc.w00">;
858+ def PMQRACC_W_H00 : RVPTernary_rrr<0b1101, 0b10, 0b111, "pmqracc.w.h00">;
859+ def MQRACC_W00 : RVPTernary_rrr<0b1101, 0b11, 0b111, "mqracc.w00">;
860+
861+ def PMQACC_W_H11 : RVPTernary_rrr<0b1111, 0b00, 0b111, "pmqacc.w.h11">;
862+ def MQACC_W11 : RVPTernary_rrr<0b1111, 0b01, 0b111, "mqacc.w11">;
863+ def PMQRACC_W_H11 : RVPTernary_rrr<0b1111, 0b10, 0b111, "pmqracc.w.h11">;
864+ def MQRACC_W11 : RVPTernary_rrr<0b1111, 0b11, 0b111, "mqracc.w11">;
865+ } // Predicates = [HasStdExtP, IsRV64]
866+
600867let Predicates = [HasStdExtP, IsRV32] in {
601868 def PLI_DH : RVPPairLoadImm_i<0b0011000, (ins simm10:$imm10), "pli.dh",
602869 "$rd, $imm10"> {
0 commit comments