OLD | NEW |
1 //===- subzero/src/IceInstMips32.cpp - Mips32 instruction implementation --===// | 1 //===- subzero/src/IceInstMips32.cpp - Mips32 instruction implementation --===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 /// \file | 10 /// \file |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 template <> void InstMIPS32And::emitIAS(const Cfg *Func) const { | 775 template <> void InstMIPS32And::emitIAS(const Cfg *Func) const { |
776 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 776 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
777 Asm->and_(getDest(), getSrc(0), getSrc(1)); | 777 Asm->and_(getDest(), getSrc(0), getSrc(1)); |
778 } | 778 } |
779 | 779 |
780 template <> void InstMIPS32Andi::emitIAS(const Cfg *Func) const { | 780 template <> void InstMIPS32Andi::emitIAS(const Cfg *Func) const { |
781 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 781 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
782 Asm->andi(getDest(), getSrc(0), Imm); | 782 Asm->andi(getDest(), getSrc(0), Imm); |
783 } | 783 } |
784 | 784 |
| 785 template <> void InstMIPS32C_eq_d::emitIAS(const Cfg *Func) const { |
| 786 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 787 Asm->c_eq_d(getSrc(0), getSrc(1)); |
| 788 } |
| 789 |
| 790 template <> void InstMIPS32C_eq_s::emitIAS(const Cfg *Func) const { |
| 791 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 792 Asm->c_eq_s(getSrc(0), getSrc(1)); |
| 793 } |
| 794 |
| 795 template <> void InstMIPS32C_ole_d::emitIAS(const Cfg *Func) const { |
| 796 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 797 Asm->c_ole_d(getSrc(0), getSrc(1)); |
| 798 } |
| 799 |
| 800 template <> void InstMIPS32C_ole_s::emitIAS(const Cfg *Func) const { |
| 801 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 802 Asm->c_ole_s(getSrc(0), getSrc(1)); |
| 803 } |
| 804 |
| 805 template <> void InstMIPS32C_olt_d::emitIAS(const Cfg *Func) const { |
| 806 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 807 Asm->c_olt_d(getSrc(0), getSrc(1)); |
| 808 } |
| 809 |
| 810 template <> void InstMIPS32C_olt_s::emitIAS(const Cfg *Func) const { |
| 811 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 812 Asm->c_olt_s(getSrc(0), getSrc(1)); |
| 813 } |
| 814 |
| 815 template <> void InstMIPS32C_ueq_d::emitIAS(const Cfg *Func) const { |
| 816 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 817 Asm->c_ueq_d(getSrc(0), getSrc(1)); |
| 818 } |
| 819 |
| 820 template <> void InstMIPS32C_ueq_s::emitIAS(const Cfg *Func) const { |
| 821 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 822 Asm->c_ueq_s(getSrc(0), getSrc(1)); |
| 823 } |
| 824 |
| 825 template <> void InstMIPS32C_ule_d::emitIAS(const Cfg *Func) const { |
| 826 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 827 Asm->c_ule_d(getSrc(0), getSrc(1)); |
| 828 } |
| 829 |
| 830 template <> void InstMIPS32C_ule_s::emitIAS(const Cfg *Func) const { |
| 831 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 832 Asm->c_ule_s(getSrc(0), getSrc(1)); |
| 833 } |
| 834 |
| 835 template <> void InstMIPS32C_ult_d::emitIAS(const Cfg *Func) const { |
| 836 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 837 Asm->c_ult_d(getSrc(0), getSrc(1)); |
| 838 } |
| 839 |
| 840 template <> void InstMIPS32C_ult_s::emitIAS(const Cfg *Func) const { |
| 841 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 842 Asm->c_ult_s(getSrc(0), getSrc(1)); |
| 843 } |
| 844 |
| 845 template <> void InstMIPS32C_un_d::emitIAS(const Cfg *Func) const { |
| 846 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 847 Asm->c_un_d(getSrc(0), getSrc(1)); |
| 848 } |
| 849 |
| 850 template <> void InstMIPS32C_un_s::emitIAS(const Cfg *Func) const { |
| 851 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 852 Asm->c_un_s(getSrc(0), getSrc(1)); |
| 853 } |
| 854 |
785 template <> void InstMIPS32Cvt_d_l::emitIAS(const Cfg *Func) const { | 855 template <> void InstMIPS32Cvt_d_l::emitIAS(const Cfg *Func) const { |
786 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 856 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
787 Asm->cvt_d_l(getDest(), getSrc(0)); | 857 Asm->cvt_d_l(getDest(), getSrc(0)); |
788 } | 858 } |
789 | 859 |
790 template <> void InstMIPS32Cvt_d_s::emitIAS(const Cfg *Func) const { | 860 template <> void InstMIPS32Cvt_d_s::emitIAS(const Cfg *Func) const { |
791 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 861 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
792 Asm->cvt_d_s(getDest(), getSrc(0)); | 862 Asm->cvt_d_s(getDest(), getSrc(0)); |
793 } | 863 } |
794 | 864 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 template <> void InstMIPS32Mov_d::emitIAS(const Cfg *Func) const { | 920 template <> void InstMIPS32Mov_d::emitIAS(const Cfg *Func) const { |
851 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 921 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
852 Asm->mov_d(getDest(), getSrc(0)); | 922 Asm->mov_d(getDest(), getSrc(0)); |
853 } | 923 } |
854 | 924 |
855 template <> void InstMIPS32Mov_s::emitIAS(const Cfg *Func) const { | 925 template <> void InstMIPS32Mov_s::emitIAS(const Cfg *Func) const { |
856 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 926 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
857 Asm->mov_s(getDest(), getSrc(0)); | 927 Asm->mov_s(getDest(), getSrc(0)); |
858 } | 928 } |
859 | 929 |
| 930 template <> void InstMIPS32Movf::emitIAS(const Cfg *Func) const { |
| 931 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 932 Asm->movf(getDest(), getSrc(0), getSrc(1)); |
| 933 } |
| 934 |
860 template <> void InstMIPS32Movn_d::emitIAS(const Cfg *Func) const { | 935 template <> void InstMIPS32Movn_d::emitIAS(const Cfg *Func) const { |
861 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 936 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
862 Asm->movn_d(getDest(), getSrc(0), getSrc(1)); | 937 Asm->movn_d(getDest(), getSrc(0), getSrc(1)); |
863 } | 938 } |
864 | 939 |
865 template <> void InstMIPS32Movn_s::emitIAS(const Cfg *Func) const { | 940 template <> void InstMIPS32Movn_s::emitIAS(const Cfg *Func) const { |
866 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 941 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
867 Asm->movn_s(getDest(), getSrc(0), getSrc(1)); | 942 Asm->movn_s(getDest(), getSrc(0), getSrc(1)); |
868 } | 943 } |
869 | 944 |
| 945 template <> void InstMIPS32Movt::emitIAS(const Cfg *Func) const { |
| 946 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 947 Asm->movt(getDest(), getSrc(0), getSrc(1)); |
| 948 } |
| 949 |
870 template <> void InstMIPS32Movz_d::emitIAS(const Cfg *Func) const { | 950 template <> void InstMIPS32Movz_d::emitIAS(const Cfg *Func) const { |
871 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 951 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
872 Asm->movz_d(getDest(), getSrc(0), getSrc(1)); | 952 Asm->movz_d(getDest(), getSrc(0), getSrc(1)); |
873 } | 953 } |
874 | 954 |
875 template <> void InstMIPS32Movz_s::emitIAS(const Cfg *Func) const { | 955 template <> void InstMIPS32Movz_s::emitIAS(const Cfg *Func) const { |
876 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 956 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
877 Asm->movz_s(getDest(), getSrc(0), getSrc(1)); | 957 Asm->movz_s(getDest(), getSrc(0), getSrc(1)); |
878 } | 958 } |
879 | 959 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 Asm->xor_(getDest(), getSrc(0), getSrc(1)); | 1094 Asm->xor_(getDest(), getSrc(0), getSrc(1)); |
1015 } | 1095 } |
1016 | 1096 |
1017 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const { | 1097 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const { |
1018 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 1098 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
1019 Asm->xori(getDest(), getSrc(0), Imm); | 1099 Asm->xori(getDest(), getSrc(0), Imm); |
1020 } | 1100 } |
1021 | 1101 |
1022 } // end of namespace MIPS32 | 1102 } // end of namespace MIPS32 |
1023 } // end of namespace Ice | 1103 } // end of namespace Ice |
OLD | NEW |