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

Side by Side Diff: src/IceInstMIPS32.cpp

Issue 2354293002: Subzero, MIPS32: Intrinsic call Ctlz for i32 (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressing review comments Created 4 years, 2 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') | src/IceTargetLoweringMIPS32.h » ('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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 template <> const char *InstMIPS32C_olt_d::Opcode = "c.olt.d"; 76 template <> const char *InstMIPS32C_olt_d::Opcode = "c.olt.d";
77 template <> const char *InstMIPS32C_olt_s::Opcode = "c.olt.s"; 77 template <> const char *InstMIPS32C_olt_s::Opcode = "c.olt.s";
78 template <> const char *InstMIPS32C_ueq_d::Opcode = "c.ueq.d"; 78 template <> const char *InstMIPS32C_ueq_d::Opcode = "c.ueq.d";
79 template <> const char *InstMIPS32C_ueq_s::Opcode = "c.ueq.s"; 79 template <> const char *InstMIPS32C_ueq_s::Opcode = "c.ueq.s";
80 template <> const char *InstMIPS32C_ule_d::Opcode = "c.ule.d"; 80 template <> const char *InstMIPS32C_ule_d::Opcode = "c.ule.d";
81 template <> const char *InstMIPS32C_ule_s::Opcode = "c.ule.s"; 81 template <> const char *InstMIPS32C_ule_s::Opcode = "c.ule.s";
82 template <> const char *InstMIPS32C_ult_d::Opcode = "c.ult.d"; 82 template <> const char *InstMIPS32C_ult_d::Opcode = "c.ult.d";
83 template <> const char *InstMIPS32C_ult_s::Opcode = "c.ult.s"; 83 template <> const char *InstMIPS32C_ult_s::Opcode = "c.ult.s";
84 template <> const char *InstMIPS32C_un_d::Opcode = "c.un.d"; 84 template <> const char *InstMIPS32C_un_d::Opcode = "c.un.d";
85 template <> const char *InstMIPS32C_un_s::Opcode = "c.un.s"; 85 template <> const char *InstMIPS32C_un_s::Opcode = "c.un.s";
86 template <> const char *InstMIPS32Clz::Opcode = "clz";
86 template <> const char *InstMIPS32Cvt_d_l::Opcode = "cvt.d.l"; 87 template <> const char *InstMIPS32Cvt_d_l::Opcode = "cvt.d.l";
87 template <> const char *InstMIPS32Cvt_d_s::Opcode = "cvt.d.s"; 88 template <> const char *InstMIPS32Cvt_d_s::Opcode = "cvt.d.s";
88 template <> const char *InstMIPS32Cvt_d_w::Opcode = "cvt.d.w"; 89 template <> const char *InstMIPS32Cvt_d_w::Opcode = "cvt.d.w";
89 template <> const char *InstMIPS32Cvt_s_d::Opcode = "cvt.s.d"; 90 template <> const char *InstMIPS32Cvt_s_d::Opcode = "cvt.s.d";
90 template <> const char *InstMIPS32Cvt_s_l::Opcode = "cvt.s.l"; 91 template <> const char *InstMIPS32Cvt_s_l::Opcode = "cvt.s.l";
91 template <> const char *InstMIPS32Cvt_s_w::Opcode = "cvt.s.w"; 92 template <> const char *InstMIPS32Cvt_s_w::Opcode = "cvt.s.w";
92 template <> const char *InstMIPS32Div::Opcode = "div"; 93 template <> const char *InstMIPS32Div::Opcode = "div";
93 template <> const char *InstMIPS32Div_d::Opcode = "div.d"; 94 template <> const char *InstMIPS32Div_d::Opcode = "div.d";
94 template <> const char *InstMIPS32Div_s::Opcode = "div.s"; 95 template <> const char *InstMIPS32Div_s::Opcode = "div.s";
95 template <> const char *InstMIPS32Divu::Opcode = "divu"; 96 template <> const char *InstMIPS32Divu::Opcode = "divu";
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 template <> void InstMIPS32C_un_d::emitIAS(const Cfg *Func) const { 848 template <> void InstMIPS32C_un_d::emitIAS(const Cfg *Func) const {
848 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 849 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
849 Asm->c_un_d(getSrc(0), getSrc(1)); 850 Asm->c_un_d(getSrc(0), getSrc(1));
850 } 851 }
851 852
852 template <> void InstMIPS32C_un_s::emitIAS(const Cfg *Func) const { 853 template <> void InstMIPS32C_un_s::emitIAS(const Cfg *Func) const {
853 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 854 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
854 Asm->c_un_s(getSrc(0), getSrc(1)); 855 Asm->c_un_s(getSrc(0), getSrc(1));
855 } 856 }
856 857
858 template <> void InstMIPS32Clz::emitIAS(const Cfg *Func) const {
859 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
860 Asm->clz(getDest(), getSrc(0));
861 }
862
857 template <> void InstMIPS32Cvt_d_l::emitIAS(const Cfg *Func) const { 863 template <> void InstMIPS32Cvt_d_l::emitIAS(const Cfg *Func) const {
858 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 864 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
859 Asm->cvt_d_l(getDest(), getSrc(0)); 865 Asm->cvt_d_l(getDest(), getSrc(0));
860 } 866 }
861 867
862 template <> void InstMIPS32Cvt_d_s::emitIAS(const Cfg *Func) const { 868 template <> void InstMIPS32Cvt_d_s::emitIAS(const Cfg *Func) const {
863 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 869 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
864 Asm->cvt_d_s(getDest(), getSrc(0)); 870 Asm->cvt_d_s(getDest(), getSrc(0));
865 } 871 }
866 872
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 template <> void InstMIPS32Mov_s::emitIAS(const Cfg *Func) const { 933 template <> void InstMIPS32Mov_s::emitIAS(const Cfg *Func) const {
928 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 934 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
929 Asm->mov_s(getDest(), getSrc(0)); 935 Asm->mov_s(getDest(), getSrc(0));
930 } 936 }
931 937
932 template <> void InstMIPS32Movf::emitIAS(const Cfg *Func) const { 938 template <> void InstMIPS32Movf::emitIAS(const Cfg *Func) const {
933 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 939 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
934 Asm->movf(getDest(), getSrc(1), getSrc(2)); 940 Asm->movf(getDest(), getSrc(1), getSrc(2));
935 } 941 }
936 942
943 template <> void InstMIPS32Movn::emitIAS(const Cfg *Func) const {
944 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
945 Asm->movn(getDest(), getSrc(0), getSrc(1));
946 }
947
937 template <> void InstMIPS32Movn_d::emitIAS(const Cfg *Func) const { 948 template <> void InstMIPS32Movn_d::emitIAS(const Cfg *Func) const {
938 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 949 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
939 Asm->movn_d(getDest(), getSrc(0), getSrc(1)); 950 Asm->movn_d(getDest(), getSrc(0), getSrc(1));
940 } 951 }
941 952
942 template <> void InstMIPS32Movn_s::emitIAS(const Cfg *Func) const { 953 template <> void InstMIPS32Movn_s::emitIAS(const Cfg *Func) const {
943 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 954 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
944 Asm->movn_s(getDest(), getSrc(0), getSrc(1)); 955 Asm->movn_s(getDest(), getSrc(0), getSrc(1));
945 } 956 }
946 957
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 Asm->xor_(getDest(), getSrc(0), getSrc(1)); 1117 Asm->xor_(getDest(), getSrc(0), getSrc(1));
1107 } 1118 }
1108 1119
1109 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const { 1120 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const {
1110 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 1121 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1111 Asm->xori(getDest(), getSrc(0), Imm); 1122 Asm->xori(getDest(), getSrc(0), Imm);
1112 } 1123 }
1113 1124
1114 } // end of namespace MIPS32 1125 } // end of namespace MIPS32
1115 } // end of namespace Ice 1126 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstMIPS32.h ('k') | src/IceTargetLoweringMIPS32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698