OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 | 6 |
7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
10 | 10 |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 | 417 |
418 | 418 |
419 void CodeGenerator::AddTranslationForOperand(Translation* translation, | 419 void CodeGenerator::AddTranslationForOperand(Translation* translation, |
420 Instruction* instr, | 420 Instruction* instr, |
421 InstructionOperand* op, | 421 InstructionOperand* op, |
422 MachineType type) { | 422 MachineType type) { |
423 if (op->IsStackSlot()) { | 423 if (op->IsStackSlot()) { |
424 if (type == kMachBool || type == kMachInt32 || type == kMachInt8 || | 424 if (type == kMachBool || type == kMachInt32 || type == kMachInt8 || |
425 type == kMachInt16) { | 425 type == kMachInt16) { |
426 translation->StoreInt32StackSlot(op->index()); | 426 translation->StoreInt32StackSlot(op->index()); |
427 } else if (type == kMachUint32) { | 427 } else if (type == kMachUint32 || type == kMachUint16 || |
| 428 type == kMachUint8) { |
428 translation->StoreUint32StackSlot(op->index()); | 429 translation->StoreUint32StackSlot(op->index()); |
429 } else if ((type & kRepMask) == kRepTagged) { | 430 } else if ((type & kRepMask) == kRepTagged) { |
430 translation->StoreStackSlot(op->index()); | 431 translation->StoreStackSlot(op->index()); |
431 } else { | 432 } else { |
432 CHECK(false); | 433 CHECK(false); |
433 } | 434 } |
434 } else if (op->IsDoubleStackSlot()) { | 435 } else if (op->IsDoubleStackSlot()) { |
435 DCHECK((type & (kRepFloat32 | kRepFloat64)) != 0); | 436 DCHECK((type & (kRepFloat32 | kRepFloat64)) != 0); |
436 translation->StoreDoubleStackSlot(op->index()); | 437 translation->StoreDoubleStackSlot(op->index()); |
437 } else if (op->IsRegister()) { | 438 } else if (op->IsRegister()) { |
438 InstructionOperandConverter converter(this, instr); | 439 InstructionOperandConverter converter(this, instr); |
439 if (type == kMachBool || type == kMachInt32 || type == kMachInt8 || | 440 if (type == kMachBool || type == kMachInt32 || type == kMachInt8 || |
440 type == kMachInt16) { | 441 type == kMachInt16) { |
441 translation->StoreInt32Register(converter.ToRegister(op)); | 442 translation->StoreInt32Register(converter.ToRegister(op)); |
442 } else if (type == kMachUint32) { | 443 } else if (type == kMachUint32 || type == kMachUint16 || |
| 444 type == kMachUint8) { |
443 translation->StoreUint32Register(converter.ToRegister(op)); | 445 translation->StoreUint32Register(converter.ToRegister(op)); |
444 } else if ((type & kRepMask) == kRepTagged) { | 446 } else if ((type & kRepMask) == kRepTagged) { |
445 translation->StoreRegister(converter.ToRegister(op)); | 447 translation->StoreRegister(converter.ToRegister(op)); |
446 } else { | 448 } else { |
447 CHECK(false); | 449 CHECK(false); |
448 } | 450 } |
449 } else if (op->IsDoubleRegister()) { | 451 } else if (op->IsDoubleRegister()) { |
450 DCHECK((type & (kRepFloat32 | kRepFloat64)) != 0); | 452 DCHECK((type & (kRepFloat32 | kRepFloat64)) != 0); |
451 InstructionOperandConverter converter(this, instr); | 453 InstructionOperandConverter converter(this, instr); |
452 translation->StoreDoubleRegister(converter.ToDoubleRegister(op)); | 454 translation->StoreDoubleRegister(converter.ToDoubleRegister(op)); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 } | 527 } |
526 | 528 |
527 | 529 |
528 void CodeGenerator::AddNopForSmiCodeInlining() { UNIMPLEMENTED(); } | 530 void CodeGenerator::AddNopForSmiCodeInlining() { UNIMPLEMENTED(); } |
529 | 531 |
530 #endif // !V8_TURBOFAN_BACKEND | 532 #endif // !V8_TURBOFAN_BACKEND |
531 | 533 |
532 } // namespace compiler | 534 } // namespace compiler |
533 } // namespace internal | 535 } // namespace internal |
534 } // namespace v8 | 536 } // namespace v8 |
OLD | NEW |