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

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

Issue 1323763002: MIPS: Fixing illegal use of at register (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 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/compiler/mips/code-generator-mips.cc ('k') | src/mips/assembler-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/compiler/osr.h" 9 #include "src/compiler/osr.h"
10 #include "src/mips/macro-assembler-mips.h" 10 #include "src/mips/macro-assembler-mips.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } // namespace 298 } // namespace
299 299
300 300
301 #define ASSEMBLE_CHECKED_LOAD_FLOAT(width, asm_instr) \ 301 #define ASSEMBLE_CHECKED_LOAD_FLOAT(width, asm_instr) \
302 do { \ 302 do { \
303 auto result = i.Output##width##Register(); \ 303 auto result = i.Output##width##Register(); \
304 auto ool = new (zone()) OutOfLineLoad##width(this, result); \ 304 auto ool = new (zone()) OutOfLineLoad##width(this, result); \
305 if (instr->InputAt(0)->IsRegister()) { \ 305 if (instr->InputAt(0)->IsRegister()) { \
306 auto offset = i.InputRegister(0); \ 306 auto offset = i.InputRegister(0); \
307 __ Branch(USE_DELAY_SLOT, ool->entry(), hs, offset, i.InputOperand(1)); \ 307 __ Branch(USE_DELAY_SLOT, ool->entry(), hs, offset, i.InputOperand(1)); \
308 __ Daddu(at, i.InputRegister(2), offset); \ 308 __ Daddu(kScratchReg, i.InputRegister(2), offset); \
309 __ asm_instr(result, MemOperand(at, 0)); \ 309 __ asm_instr(result, MemOperand(kScratchReg, 0)); \
310 } else { \ 310 } else { \
311 int offset = static_cast<int>(i.InputOperand(0).immediate()); \ 311 int offset = static_cast<int>(i.InputOperand(0).immediate()); \
312 __ Branch(ool->entry(), ls, i.InputRegister(1), Operand(offset)); \ 312 __ Branch(ool->entry(), ls, i.InputRegister(1), Operand(offset)); \
313 __ asm_instr(result, MemOperand(i.InputRegister(2), offset)); \ 313 __ asm_instr(result, MemOperand(i.InputRegister(2), offset)); \
314 } \ 314 } \
315 __ bind(ool->exit()); \ 315 __ bind(ool->exit()); \
316 } while (0) 316 } while (0)
317 317
318 318
319 #define ASSEMBLE_CHECKED_LOAD_INTEGER(asm_instr) \ 319 #define ASSEMBLE_CHECKED_LOAD_INTEGER(asm_instr) \
320 do { \ 320 do { \
321 auto result = i.OutputRegister(); \ 321 auto result = i.OutputRegister(); \
322 auto ool = new (zone()) OutOfLineLoadInteger(this, result); \ 322 auto ool = new (zone()) OutOfLineLoadInteger(this, result); \
323 if (instr->InputAt(0)->IsRegister()) { \ 323 if (instr->InputAt(0)->IsRegister()) { \
324 auto offset = i.InputRegister(0); \ 324 auto offset = i.InputRegister(0); \
325 __ Branch(USE_DELAY_SLOT, ool->entry(), hs, offset, i.InputOperand(1)); \ 325 __ Branch(USE_DELAY_SLOT, ool->entry(), hs, offset, i.InputOperand(1)); \
326 __ Daddu(at, i.InputRegister(2), offset); \ 326 __ Daddu(kScratchReg, i.InputRegister(2), offset); \
327 __ asm_instr(result, MemOperand(at, 0)); \ 327 __ asm_instr(result, MemOperand(kScratchReg, 0)); \
328 } else { \ 328 } else { \
329 int offset = static_cast<int>(i.InputOperand(0).immediate()); \ 329 int offset = static_cast<int>(i.InputOperand(0).immediate()); \
330 __ Branch(ool->entry(), ls, i.InputRegister(1), Operand(offset)); \ 330 __ Branch(ool->entry(), ls, i.InputRegister(1), Operand(offset)); \
331 __ asm_instr(result, MemOperand(i.InputRegister(2), offset)); \ 331 __ asm_instr(result, MemOperand(i.InputRegister(2), offset)); \
332 } \ 332 } \
333 __ bind(ool->exit()); \ 333 __ bind(ool->exit()); \
334 } while (0) 334 } while (0)
335 335
336 336
337 #define ASSEMBLE_CHECKED_STORE_FLOAT(width, asm_instr) \ 337 #define ASSEMBLE_CHECKED_STORE_FLOAT(width, asm_instr) \
338 do { \ 338 do { \
339 Label done; \ 339 Label done; \
340 if (instr->InputAt(0)->IsRegister()) { \ 340 if (instr->InputAt(0)->IsRegister()) { \
341 auto offset = i.InputRegister(0); \ 341 auto offset = i.InputRegister(0); \
342 auto value = i.Input##width##Register(2); \ 342 auto value = i.Input##width##Register(2); \
343 __ Branch(USE_DELAY_SLOT, &done, hs, offset, i.InputOperand(1)); \ 343 __ Branch(USE_DELAY_SLOT, &done, hs, offset, i.InputOperand(1)); \
344 __ Daddu(at, i.InputRegister(3), offset); \ 344 __ Daddu(kScratchReg, i.InputRegister(3), offset); \
345 __ asm_instr(value, MemOperand(at, 0)); \ 345 __ asm_instr(value, MemOperand(kScratchReg, 0)); \
346 } else { \ 346 } else { \
347 int offset = static_cast<int>(i.InputOperand(0).immediate()); \ 347 int offset = static_cast<int>(i.InputOperand(0).immediate()); \
348 auto value = i.Input##width##Register(2); \ 348 auto value = i.Input##width##Register(2); \
349 __ Branch(&done, ls, i.InputRegister(1), Operand(offset)); \ 349 __ Branch(&done, ls, i.InputRegister(1), Operand(offset)); \
350 __ asm_instr(value, MemOperand(i.InputRegister(3), offset)); \ 350 __ asm_instr(value, MemOperand(i.InputRegister(3), offset)); \
351 } \ 351 } \
352 __ bind(&done); \ 352 __ bind(&done); \
353 } while (0) 353 } while (0)
354 354
355 355
356 #define ASSEMBLE_CHECKED_STORE_INTEGER(asm_instr) \ 356 #define ASSEMBLE_CHECKED_STORE_INTEGER(asm_instr) \
357 do { \ 357 do { \
358 Label done; \ 358 Label done; \
359 if (instr->InputAt(0)->IsRegister()) { \ 359 if (instr->InputAt(0)->IsRegister()) { \
360 auto offset = i.InputRegister(0); \ 360 auto offset = i.InputRegister(0); \
361 auto value = i.InputRegister(2); \ 361 auto value = i.InputRegister(2); \
362 __ Branch(USE_DELAY_SLOT, &done, hs, offset, i.InputOperand(1)); \ 362 __ Branch(USE_DELAY_SLOT, &done, hs, offset, i.InputOperand(1)); \
363 __ Daddu(at, i.InputRegister(3), offset); \ 363 __ Daddu(kScratchReg, i.InputRegister(3), offset); \
364 __ asm_instr(value, MemOperand(at, 0)); \ 364 __ asm_instr(value, MemOperand(kScratchReg, 0)); \
365 } else { \ 365 } else { \
366 int offset = static_cast<int>(i.InputOperand(0).immediate()); \ 366 int offset = static_cast<int>(i.InputOperand(0).immediate()); \
367 auto value = i.InputRegister(2); \ 367 auto value = i.InputRegister(2); \
368 __ Branch(&done, ls, i.InputRegister(1), Operand(offset)); \ 368 __ Branch(&done, ls, i.InputRegister(1), Operand(offset)); \
369 __ asm_instr(value, MemOperand(i.InputRegister(3), offset)); \ 369 __ asm_instr(value, MemOperand(i.InputRegister(3), offset)); \
370 } \ 370 } \
371 __ bind(&done); \ 371 __ bind(&done); \
372 } while (0) 372 } while (0)
373 373
374 374
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 padding_size -= v8::internal::Assembler::kInstrSize; 1515 padding_size -= v8::internal::Assembler::kInstrSize;
1516 } 1516 }
1517 } 1517 }
1518 } 1518 }
1519 1519
1520 #undef __ 1520 #undef __
1521 1521
1522 } // namespace compiler 1522 } // namespace compiler
1523 } // namespace internal 1523 } // namespace internal
1524 } // namespace v8 1524 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/code-generator-mips.cc ('k') | src/mips/assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698