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

Side by Side Diff: src/IceInstMIPS32.cpp

Issue 2024183002: Subzero, MIPS32: Floating point load/store and format conversion instructions (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Unimeplemented instructions removed Created 4 years, 6 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // assert(!isNegAddrMode()); 53 // assert(!isNegAddrMode());
54 NumVars = 1; 54 NumVars = 1;
55 Vars = &this->Base; 55 Vars = &this->Base;
56 } 56 }
57 57
58 const char *InstMIPS32::getWidthString(Type Ty) { 58 const char *InstMIPS32::getWidthString(Type Ty) {
59 (void)Ty; 59 (void)Ty;
60 return "TBD"; 60 return "TBD";
61 } 61 }
62 62
63 template <> const char *InstMIPS32Addiu::Opcode = "addiu";
64 template <> const char *InstMIPS32Lui::Opcode = "lui";
65 template <> const char *InstMIPS32La::Opcode = "la";
66 // Three-addr ops
67 template <> const char *InstMIPS32Add::Opcode = "add"; 63 template <> const char *InstMIPS32Add::Opcode = "add";
68 template <> const char *InstMIPS32Add_d::Opcode = "add.d"; 64 template <> const char *InstMIPS32Add_d::Opcode = "add.d";
69 template <> const char *InstMIPS32Add_s::Opcode = "add.s"; 65 template <> const char *InstMIPS32Add_s::Opcode = "add.s";
66 template <> const char *InstMIPS32Addiu::Opcode = "addiu";
70 template <> const char *InstMIPS32Addu::Opcode = "addu"; 67 template <> const char *InstMIPS32Addu::Opcode = "addu";
71 template <> const char *InstMIPS32And::Opcode = "and"; 68 template <> const char *InstMIPS32And::Opcode = "and";
72 template <> const char *InstMIPS32Andi::Opcode = "andi"; 69 template <> const char *InstMIPS32Andi::Opcode = "andi";
70 template <> const char *InstMIPS32Cvt_d_l::Opcode = "cvt.d.l";
71 template <> const char *InstMIPS32Cvt_d_s::Opcode = "cvt.d.s";
72 template <> const char *InstMIPS32Cvt_d_w::Opcode = "cvt.d.w";
73 template <> const char *InstMIPS32Cvt_s_d::Opcode = "cvt.s.d";
74 template <> const char *InstMIPS32Cvt_s_l::Opcode = "cvt.s.l";
75 template <> const char *InstMIPS32Cvt_s_w::Opcode = "cvt.s.w";
73 template <> const char *InstMIPS32Div::Opcode = "div"; 76 template <> const char *InstMIPS32Div::Opcode = "div";
74 template <> const char *InstMIPS32Div_d::Opcode = "div.d"; 77 template <> const char *InstMIPS32Div_d::Opcode = "div.d";
75 template <> const char *InstMIPS32Div_s::Opcode = "div.s"; 78 template <> const char *InstMIPS32Div_s::Opcode = "div.s";
76 template <> const char *InstMIPS32Divu::Opcode = "divu"; 79 template <> const char *InstMIPS32Divu::Opcode = "divu";
80 template <> const char *InstMIPS32La::Opcode = "la";
81 template <> const char *InstMIPS32Ldc1::Opcode = "ldc1";
82 template <> const char *InstMIPS32Lui::Opcode = "lui";
83 template <> const char *InstMIPS32Lwc1::Opcode = "lwc1";
77 template <> const char *InstMIPS32Mfc1::Opcode = "mfc1"; 84 template <> const char *InstMIPS32Mfc1::Opcode = "mfc1";
78 template <> const char *InstMIPS32Mfhi::Opcode = "mfhi"; 85 template <> const char *InstMIPS32Mfhi::Opcode = "mfhi";
79 template <> const char *InstMIPS32Mflo::Opcode = "mflo"; 86 template <> const char *InstMIPS32Mflo::Opcode = "mflo";
80 template <> const char *InstMIPS32Mov_d::Opcode = "mov.d"; 87 template <> const char *InstMIPS32Mov_d::Opcode = "mov.d";
81 template <> const char *InstMIPS32Mov_s::Opcode = "mov.s"; 88 template <> const char *InstMIPS32Mov_s::Opcode = "mov.s";
82 template <> const char *InstMIPS32Mtc1::Opcode = "mtc1"; 89 template <> const char *InstMIPS32Mtc1::Opcode = "mtc1";
83 template <> const char *InstMIPS32Mthi::Opcode = "mthi"; 90 template <> const char *InstMIPS32Mthi::Opcode = "mthi";
84 template <> const char *InstMIPS32Mtlo::Opcode = "mtlo"; 91 template <> const char *InstMIPS32Mtlo::Opcode = "mtlo";
85 template <> const char *InstMIPS32Mul::Opcode = "mul"; 92 template <> const char *InstMIPS32Mul::Opcode = "mul";
86 template <> const char *InstMIPS32Mul_d::Opcode = "mul.d"; 93 template <> const char *InstMIPS32Mul_d::Opcode = "mul.d";
87 template <> const char *InstMIPS32Mul_s::Opcode = "mul.s"; 94 template <> const char *InstMIPS32Mul_s::Opcode = "mul.s";
88 template <> const char *InstMIPS32Mult::Opcode = "mult"; 95 template <> const char *InstMIPS32Mult::Opcode = "mult";
89 template <> const char *InstMIPS32Multu::Opcode = "multu"; 96 template <> const char *InstMIPS32Multu::Opcode = "multu";
90 template <> const char *InstMIPS32Or::Opcode = "or"; 97 template <> const char *InstMIPS32Or::Opcode = "or";
91 template <> const char *InstMIPS32Ori::Opcode = "ori"; 98 template <> const char *InstMIPS32Ori::Opcode = "ori";
99 template <> const char *InstMIPS32Sdc1::Opcode = "sdc1";
92 template <> const char *InstMIPS32Sll::Opcode = "sll"; 100 template <> const char *InstMIPS32Sll::Opcode = "sll";
93 template <> const char *InstMIPS32Sllv::Opcode = "sllv"; 101 template <> const char *InstMIPS32Sllv::Opcode = "sllv";
94 template <> const char *InstMIPS32Slt::Opcode = "slt"; 102 template <> const char *InstMIPS32Slt::Opcode = "slt";
95 template <> const char *InstMIPS32Slti::Opcode = "slti"; 103 template <> const char *InstMIPS32Slti::Opcode = "slti";
96 template <> const char *InstMIPS32Sltiu::Opcode = "sltiu"; 104 template <> const char *InstMIPS32Sltiu::Opcode = "sltiu";
97 template <> const char *InstMIPS32Sltu::Opcode = "sltu"; 105 template <> const char *InstMIPS32Sltu::Opcode = "sltu";
98 template <> const char *InstMIPS32Sra::Opcode = "sra"; 106 template <> const char *InstMIPS32Sra::Opcode = "sra";
99 template <> const char *InstMIPS32Srav::Opcode = "srav"; 107 template <> const char *InstMIPS32Srav::Opcode = "srav";
100 template <> const char *InstMIPS32Srl::Opcode = "srl"; 108 template <> const char *InstMIPS32Srl::Opcode = "srl";
101 template <> const char *InstMIPS32Srlv::Opcode = "srlv"; 109 template <> const char *InstMIPS32Srlv::Opcode = "srlv";
102 template <> const char *InstMIPS32Sub::Opcode = "sub"; 110 template <> const char *InstMIPS32Sub::Opcode = "sub";
103 template <> const char *InstMIPS32Sub_d::Opcode = "sub.d"; 111 template <> const char *InstMIPS32Sub_d::Opcode = "sub.d";
104 template <> const char *InstMIPS32Sub_s::Opcode = "sub.s"; 112 template <> const char *InstMIPS32Sub_s::Opcode = "sub.s";
105 template <> const char *InstMIPS32Subu::Opcode = "subu"; 113 template <> const char *InstMIPS32Subu::Opcode = "subu";
106 template <> const char *InstMIPS32Sw::Opcode = "sw"; 114 template <> const char *InstMIPS32Sw::Opcode = "sw";
115 template <> const char *InstMIPS32Swc1::Opcode = "swc1";
116 template <> const char *InstMIPS32Trunc_l_d::Opcode = "trunc.l.d";
117 template <> const char *InstMIPS32Trunc_l_s::Opcode = "trunc.l.s";
118 template <> const char *InstMIPS32Trunc_w_d::Opcode = "trunc.w.d";
119 template <> const char *InstMIPS32Trunc_w_s::Opcode = "trunc.w.s";
107 template <> const char *InstMIPS32Xor::Opcode = "xor"; 120 template <> const char *InstMIPS32Xor::Opcode = "xor";
108 template <> const char *InstMIPS32Xori::Opcode = "xori"; 121 template <> const char *InstMIPS32Xori::Opcode = "xori";
109 122
110 template <> void InstMIPS32Mflo::emit(const Cfg *Func) const { 123 template <> void InstMIPS32Mflo::emit(const Cfg *Func) const {
111 if (!BuildDefs::dump()) 124 if (!BuildDefs::dump())
112 return; 125 return;
113 emitUnaryopGPRFLoHi(Opcode, this, Func); 126 emitUnaryopGPRFLoHi(Opcode, this, Func);
114 } 127 }
115 128
116 template <> void InstMIPS32Mfhi::emit(const Cfg *Func) const { 129 template <> void InstMIPS32Mfhi::emit(const Cfg *Func) const {
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 } 572 }
560 573
561 Str << "\t"; 574 Str << "\t";
562 getDest()->emit(Func); 575 getDest()->emit(Func);
563 Str << ", "; 576 Str << ", ";
564 getSrc(0)->emit(Func); 577 getSrc(0)->emit(Func);
565 } 578 }
566 579
567 } // end of namespace MIPS32 580 } // end of namespace MIPS32
568 } // end of namespace Ice 581 } // 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