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

Side by Side Diff: src/compiler/mips64/code-generator-mips64.cc

Issue 1088993003: Replace OVERRIDE->override and FINAL->final since we now require C++11. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 #include "src/compiler/code-generator-impl.h" 6 #include "src/compiler/code-generator-impl.h"
7 #include "src/compiler/gap-resolver.h" 7 #include "src/compiler/gap-resolver.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/mips/macro-assembler-mips.h" 9 #include "src/mips/macro-assembler-mips.h"
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 15 matching lines...) Expand all
26 #define TRACE_MSG(msg) \ 26 #define TRACE_MSG(msg) \
27 PrintF("code_gen: \'%s\' in function %s at line %d\n", msg, __FUNCTION__, \ 27 PrintF("code_gen: \'%s\' in function %s at line %d\n", msg, __FUNCTION__, \
28 __LINE__) 28 __LINE__)
29 29
30 #define TRACE_UNIMPL() \ 30 #define TRACE_UNIMPL() \
31 PrintF("UNIMPLEMENTED code_generator_mips: %s at line %d\n", __FUNCTION__, \ 31 PrintF("UNIMPLEMENTED code_generator_mips: %s at line %d\n", __FUNCTION__, \
32 __LINE__) 32 __LINE__)
33 33
34 34
35 // Adds Mips-specific methods to convert InstructionOperands. 35 // Adds Mips-specific methods to convert InstructionOperands.
36 class MipsOperandConverter FINAL : public InstructionOperandConverter { 36 class MipsOperandConverter final : public InstructionOperandConverter {
37 public: 37 public:
38 MipsOperandConverter(CodeGenerator* gen, Instruction* instr) 38 MipsOperandConverter(CodeGenerator* gen, Instruction* instr)
39 : InstructionOperandConverter(gen, instr) {} 39 : InstructionOperandConverter(gen, instr) {}
40 40
41 FloatRegister OutputSingleRegister(size_t index = 0) { 41 FloatRegister OutputSingleRegister(size_t index = 0) {
42 return ToSingleRegister(instr_->OutputAt(index)); 42 return ToSingleRegister(instr_->OutputAt(index));
43 } 43 }
44 44
45 FloatRegister InputSingleRegister(size_t index) { 45 FloatRegister InputSingleRegister(size_t index) {
46 return ToSingleRegister(instr_->InputAt(index)); 46 return ToSingleRegister(instr_->InputAt(index));
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 }; 117 };
118 118
119 119
120 static inline bool HasRegisterInput(Instruction* instr, size_t index) { 120 static inline bool HasRegisterInput(Instruction* instr, size_t index) {
121 return instr->InputAt(index)->IsRegister(); 121 return instr->InputAt(index)->IsRegister();
122 } 122 }
123 123
124 124
125 namespace { 125 namespace {
126 126
127 class OutOfLineLoadSingle FINAL : public OutOfLineCode { 127 class OutOfLineLoadSingle final : public OutOfLineCode {
128 public: 128 public:
129 OutOfLineLoadSingle(CodeGenerator* gen, FloatRegister result) 129 OutOfLineLoadSingle(CodeGenerator* gen, FloatRegister result)
130 : OutOfLineCode(gen), result_(result) {} 130 : OutOfLineCode(gen), result_(result) {}
131 131
132 void Generate() FINAL { 132 void Generate() final {
133 __ Move(result_, std::numeric_limits<float>::quiet_NaN()); 133 __ Move(result_, std::numeric_limits<float>::quiet_NaN());
134 } 134 }
135 135
136 private: 136 private:
137 FloatRegister const result_; 137 FloatRegister const result_;
138 }; 138 };
139 139
140 140
141 class OutOfLineLoadDouble FINAL : public OutOfLineCode { 141 class OutOfLineLoadDouble final : public OutOfLineCode {
142 public: 142 public:
143 OutOfLineLoadDouble(CodeGenerator* gen, DoubleRegister result) 143 OutOfLineLoadDouble(CodeGenerator* gen, DoubleRegister result)
144 : OutOfLineCode(gen), result_(result) {} 144 : OutOfLineCode(gen), result_(result) {}
145 145
146 void Generate() FINAL { 146 void Generate() final {
147 __ Move(result_, std::numeric_limits<double>::quiet_NaN()); 147 __ Move(result_, std::numeric_limits<double>::quiet_NaN());
148 } 148 }
149 149
150 private: 150 private:
151 DoubleRegister const result_; 151 DoubleRegister const result_;
152 }; 152 };
153 153
154 154
155 class OutOfLineLoadInteger FINAL : public OutOfLineCode { 155 class OutOfLineLoadInteger final : public OutOfLineCode {
156 public: 156 public:
157 OutOfLineLoadInteger(CodeGenerator* gen, Register result) 157 OutOfLineLoadInteger(CodeGenerator* gen, Register result)
158 : OutOfLineCode(gen), result_(result) {} 158 : OutOfLineCode(gen), result_(result) {}
159 159
160 void Generate() FINAL { __ mov(result_, zero_reg); } 160 void Generate() final { __ mov(result_, zero_reg); }
161 161
162 private: 162 private:
163 Register const result_; 163 Register const result_;
164 }; 164 };
165 165
166 166
167 class OutOfLineRound : public OutOfLineCode { 167 class OutOfLineRound : public OutOfLineCode {
168 public: 168 public:
169 OutOfLineRound(CodeGenerator* gen, DoubleRegister result) 169 OutOfLineRound(CodeGenerator* gen, DoubleRegister result)
170 : OutOfLineCode(gen), result_(result) {} 170 : OutOfLineCode(gen), result_(result) {}
171 171
172 void Generate() FINAL { 172 void Generate() final {
173 // Handle rounding to zero case where sign has to be preserved. 173 // Handle rounding to zero case where sign has to be preserved.
174 // High bits of double input already in kScratchReg. 174 // High bits of double input already in kScratchReg.
175 __ dsrl(at, kScratchReg, 31); 175 __ dsrl(at, kScratchReg, 31);
176 __ dsll(at, at, 31); 176 __ dsll(at, at, 31);
177 __ mthc1(at, result_); 177 __ mthc1(at, result_);
178 } 178 }
179 179
180 private: 180 private:
181 DoubleRegister const result_; 181 DoubleRegister const result_;
182 }; 182 };
183 183
184 184
185 class OutOfLineTruncate FINAL : public OutOfLineRound { 185 class OutOfLineTruncate final : public OutOfLineRound {
186 public: 186 public:
187 OutOfLineTruncate(CodeGenerator* gen, DoubleRegister result) 187 OutOfLineTruncate(CodeGenerator* gen, DoubleRegister result)
188 : OutOfLineRound(gen, result) {} 188 : OutOfLineRound(gen, result) {}
189 }; 189 };
190 190
191 191
192 class OutOfLineFloor FINAL : public OutOfLineRound { 192 class OutOfLineFloor final : public OutOfLineRound {
193 public: 193 public:
194 OutOfLineFloor(CodeGenerator* gen, DoubleRegister result) 194 OutOfLineFloor(CodeGenerator* gen, DoubleRegister result)
195 : OutOfLineRound(gen, result) {} 195 : OutOfLineRound(gen, result) {}
196 }; 196 };
197 197
198 198
199 class OutOfLineCeil FINAL : public OutOfLineRound { 199 class OutOfLineCeil final : public OutOfLineRound {
200 public: 200 public:
201 OutOfLineCeil(CodeGenerator* gen, DoubleRegister result) 201 OutOfLineCeil(CodeGenerator* gen, DoubleRegister result)
202 : OutOfLineRound(gen, result) {} 202 : OutOfLineRound(gen, result) {}
203 }; 203 };
204 204
205 205
206 Condition FlagsConditionToConditionCmp(FlagsCondition condition) { 206 Condition FlagsConditionToConditionCmp(FlagsCondition condition) {
207 switch (condition) { 207 switch (condition) {
208 case kEqual: 208 case kEqual:
209 return eq; 209 return eq;
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 } 1365 }
1366 } 1366 }
1367 MarkLazyDeoptSite(); 1367 MarkLazyDeoptSite();
1368 } 1368 }
1369 1369
1370 #undef __ 1370 #undef __
1371 1371
1372 } // namespace compiler 1372 } // namespace compiler
1373 } // namespace internal 1373 } // namespace internal
1374 } // namespace v8 1374 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/mips64/instruction-selector-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698