Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Side by Side Diff: src/IceInstMIPS32.cpp

Issue 2350833002: Subzero, MIPS32: Encoding of FP comparison instructions (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressing review comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceInstMIPS32.h ('k') | tests_lit/assembler/mips32/encoding_test_fcmp.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 template <> void InstMIPS32And::emitIAS(const Cfg *Func) const { 776 template <> void InstMIPS32And::emitIAS(const Cfg *Func) const {
777 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 777 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
778 Asm->and_(getDest(), getSrc(0), getSrc(1)); 778 Asm->and_(getDest(), getSrc(0), getSrc(1));
779 } 779 }
780 780
781 template <> void InstMIPS32Andi::emitIAS(const Cfg *Func) const { 781 template <> void InstMIPS32Andi::emitIAS(const Cfg *Func) const {
782 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 782 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
783 Asm->andi(getDest(), getSrc(0), Imm); 783 Asm->andi(getDest(), getSrc(0), Imm);
784 } 784 }
785 785
786 template <> void InstMIPS32C_eq_d::emitIAS(const Cfg *Func) const {
787 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
788 Asm->c_eq_d(getSrc(0), getSrc(1));
789 }
790
791 template <> void InstMIPS32C_eq_s::emitIAS(const Cfg *Func) const {
792 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
793 Asm->c_eq_s(getSrc(0), getSrc(1));
794 }
795
796 template <> void InstMIPS32C_ole_d::emitIAS(const Cfg *Func) const {
797 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
798 Asm->c_ole_d(getSrc(0), getSrc(1));
799 }
800
801 template <> void InstMIPS32C_ole_s::emitIAS(const Cfg *Func) const {
802 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
803 Asm->c_ole_s(getSrc(0), getSrc(1));
804 }
805
806 template <> void InstMIPS32C_olt_d::emitIAS(const Cfg *Func) const {
807 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
808 Asm->c_olt_d(getSrc(0), getSrc(1));
809 }
810
811 template <> void InstMIPS32C_olt_s::emitIAS(const Cfg *Func) const {
812 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
813 Asm->c_olt_s(getSrc(0), getSrc(1));
814 }
815
816 template <> void InstMIPS32C_ueq_d::emitIAS(const Cfg *Func) const {
817 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
818 Asm->c_ueq_d(getSrc(0), getSrc(1));
819 }
820
821 template <> void InstMIPS32C_ueq_s::emitIAS(const Cfg *Func) const {
822 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
823 Asm->c_ueq_s(getSrc(0), getSrc(1));
824 }
825
826 template <> void InstMIPS32C_ule_d::emitIAS(const Cfg *Func) const {
827 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
828 Asm->c_ule_d(getSrc(0), getSrc(1));
829 }
830
831 template <> void InstMIPS32C_ule_s::emitIAS(const Cfg *Func) const {
832 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
833 Asm->c_ule_s(getSrc(0), getSrc(1));
834 }
835
836 template <> void InstMIPS32C_ult_d::emitIAS(const Cfg *Func) const {
837 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
838 Asm->c_ult_d(getSrc(0), getSrc(1));
839 }
840
841 template <> void InstMIPS32C_ult_s::emitIAS(const Cfg *Func) const {
842 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
843 Asm->c_ult_s(getSrc(0), getSrc(1));
844 }
845
846 template <> void InstMIPS32C_un_d::emitIAS(const Cfg *Func) const {
847 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
848 Asm->c_un_d(getSrc(0), getSrc(1));
849 }
850
851 template <> void InstMIPS32C_un_s::emitIAS(const Cfg *Func) const {
852 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
853 Asm->c_un_s(getSrc(0), getSrc(1));
854 }
855
786 template <> void InstMIPS32Cvt_d_l::emitIAS(const Cfg *Func) const { 856 template <> void InstMIPS32Cvt_d_l::emitIAS(const Cfg *Func) const {
787 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 857 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
788 Asm->cvt_d_l(getDest(), getSrc(0)); 858 Asm->cvt_d_l(getDest(), getSrc(0));
789 } 859 }
790 860
791 template <> void InstMIPS32Cvt_d_s::emitIAS(const Cfg *Func) const { 861 template <> void InstMIPS32Cvt_d_s::emitIAS(const Cfg *Func) const {
792 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 862 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
793 Asm->cvt_d_s(getDest(), getSrc(0)); 863 Asm->cvt_d_s(getDest(), getSrc(0));
794 } 864 }
795 865
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 template <> void InstMIPS32Mov_d::emitIAS(const Cfg *Func) const { 921 template <> void InstMIPS32Mov_d::emitIAS(const Cfg *Func) const {
852 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 922 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
853 Asm->mov_d(getDest(), getSrc(0)); 923 Asm->mov_d(getDest(), getSrc(0));
854 } 924 }
855 925
856 template <> void InstMIPS32Mov_s::emitIAS(const Cfg *Func) const { 926 template <> void InstMIPS32Mov_s::emitIAS(const Cfg *Func) const {
857 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 927 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
858 Asm->mov_s(getDest(), getSrc(0)); 928 Asm->mov_s(getDest(), getSrc(0));
859 } 929 }
860 930
931 template <> void InstMIPS32Movf::emitIAS(const Cfg *Func) const {
932 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
933 Asm->movf(getDest(), getSrc(0), getSrc(1));
934 }
935
861 template <> void InstMIPS32Movn_d::emitIAS(const Cfg *Func) const { 936 template <> void InstMIPS32Movn_d::emitIAS(const Cfg *Func) const {
862 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 937 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
863 Asm->movn_d(getDest(), getSrc(0), getSrc(1)); 938 Asm->movn_d(getDest(), getSrc(0), getSrc(1));
864 } 939 }
865 940
866 template <> void InstMIPS32Movn_s::emitIAS(const Cfg *Func) const { 941 template <> void InstMIPS32Movn_s::emitIAS(const Cfg *Func) const {
867 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 942 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
868 Asm->movn_s(getDest(), getSrc(0), getSrc(1)); 943 Asm->movn_s(getDest(), getSrc(0), getSrc(1));
869 } 944 }
870 945
946 template <> void InstMIPS32Movt::emitIAS(const Cfg *Func) const {
947 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
948 Asm->movt(getDest(), getSrc(0), getSrc(1));
949 }
950
871 template <> void InstMIPS32Movz_d::emitIAS(const Cfg *Func) const { 951 template <> void InstMIPS32Movz_d::emitIAS(const Cfg *Func) const {
872 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 952 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
873 Asm->movz_d(getDest(), getSrc(0), getSrc(1)); 953 Asm->movz_d(getDest(), getSrc(0), getSrc(1));
874 } 954 }
875 955
876 template <> void InstMIPS32Movz_s::emitIAS(const Cfg *Func) const { 956 template <> void InstMIPS32Movz_s::emitIAS(const Cfg *Func) const {
877 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 957 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
878 Asm->movz_s(getDest(), getSrc(0), getSrc(1)); 958 Asm->movz_s(getDest(), getSrc(0), getSrc(1));
879 } 959 }
880 960
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 Asm->xor_(getDest(), getSrc(0), getSrc(1)); 1095 Asm->xor_(getDest(), getSrc(0), getSrc(1));
1016 } 1096 }
1017 1097
1018 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const { 1098 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const {
1019 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 1099 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1020 Asm->xori(getDest(), getSrc(0), Imm); 1100 Asm->xori(getDest(), getSrc(0), Imm);
1021 } 1101 }
1022 1102
1023 } // end of namespace MIPS32 1103 } // end of namespace MIPS32
1024 } // end of namespace Ice 1104 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstMIPS32.h ('k') | tests_lit/assembler/mips32/encoding_test_fcmp.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698