OLD | NEW |
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 | 6 |
7 #include "src/compilation-info.h" | 7 #include "src/compilation-info.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \ | 580 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \ |
581 } while (0) | 581 } while (0) |
582 | 582 |
583 | 583 |
584 #define ASSEMBLE_STORE_FLOAT32() \ | 584 #define ASSEMBLE_STORE_FLOAT32() \ |
585 do { \ | 585 do { \ |
586 size_t index = 0; \ | 586 size_t index = 0; \ |
587 AddressingMode mode = kMode_None; \ | 587 AddressingMode mode = kMode_None; \ |
588 MemOperand operand = i.MemoryOperand(&mode, &index); \ | 588 MemOperand operand = i.MemoryOperand(&mode, &index); \ |
589 DoubleRegister value = i.InputDoubleRegister(index); \ | 589 DoubleRegister value = i.InputDoubleRegister(index); \ |
590 __ frsp(kScratchDoubleReg, value); \ | 590 /* removed frsp as instruction-selector checked */ \ |
| 591 /* value to be kFloat32 */ \ |
591 if (mode == kMode_MRI) { \ | 592 if (mode == kMode_MRI) { \ |
592 __ stfs(kScratchDoubleReg, operand); \ | 593 __ stfs(value, operand); \ |
593 } else { \ | 594 } else { \ |
594 __ stfsx(kScratchDoubleReg, operand); \ | 595 __ stfsx(value, operand); \ |
595 } \ | 596 } \ |
596 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \ | 597 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \ |
597 } while (0) | 598 } while (0) |
598 | 599 |
599 | 600 |
600 #define ASSEMBLE_STORE_DOUBLE() \ | 601 #define ASSEMBLE_STORE_DOUBLE() \ |
601 do { \ | 602 do { \ |
602 size_t index = 0; \ | 603 size_t index = 0; \ |
603 AddressingMode mode = kMode_None; \ | 604 AddressingMode mode = kMode_None; \ |
604 MemOperand operand = i.MemoryOperand(&mode, &index); \ | 605 MemOperand operand = i.MemoryOperand(&mode, &index); \ |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 DCHECK_EQ(kMode_MRR, mode); \ | 693 DCHECK_EQ(kMode_MRR, mode); \ |
693 Register offset = operand.rb(); \ | 694 Register offset = operand.rb(); \ |
694 if (HasRegisterInput(instr, 2)) { \ | 695 if (HasRegisterInput(instr, 2)) { \ |
695 __ cmplw(offset, i.InputRegister(2)); \ | 696 __ cmplw(offset, i.InputRegister(2)); \ |
696 } else { \ | 697 } else { \ |
697 __ cmplwi(offset, i.InputImmediate(2)); \ | 698 __ cmplwi(offset, i.InputImmediate(2)); \ |
698 } \ | 699 } \ |
699 __ bge(&done); \ | 700 __ bge(&done); \ |
700 DoubleRegister value = i.InputDoubleRegister(3); \ | 701 DoubleRegister value = i.InputDoubleRegister(3); \ |
701 __ frsp(kScratchDoubleReg, value); \ | 702 __ frsp(kScratchDoubleReg, value); \ |
| 703 /* removed frsp as instruction-selector checked */ \ |
| 704 /* value to be kFloat32 */ \ |
702 if (mode == kMode_MRI) { \ | 705 if (mode == kMode_MRI) { \ |
703 __ stfs(kScratchDoubleReg, operand); \ | 706 __ stfs(value, operand); \ |
704 } else { \ | 707 } else { \ |
705 CleanUInt32(offset); \ | 708 CleanUInt32(offset); \ |
706 __ stfsx(kScratchDoubleReg, operand); \ | 709 __ stfsx(value, operand); \ |
707 } \ | 710 } \ |
708 __ bind(&done); \ | 711 __ bind(&done); \ |
709 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \ | 712 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \ |
710 } while (0) | 713 } while (0) |
711 | 714 |
712 #define ASSEMBLE_CHECKED_STORE_DOUBLE() \ | 715 #define ASSEMBLE_CHECKED_STORE_DOUBLE() \ |
713 do { \ | 716 do { \ |
714 Label done; \ | 717 Label done; \ |
715 size_t index = 0; \ | 718 size_t index = 0; \ |
716 AddressingMode mode = kMode_None; \ | 719 AddressingMode mode = kMode_None; \ |
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2615 padding_size -= v8::internal::Assembler::kInstrSize; | 2618 padding_size -= v8::internal::Assembler::kInstrSize; |
2616 } | 2619 } |
2617 } | 2620 } |
2618 } | 2621 } |
2619 | 2622 |
2620 #undef __ | 2623 #undef __ |
2621 | 2624 |
2622 } // namespace compiler | 2625 } // namespace compiler |
2623 } // namespace internal | 2626 } // namespace internal |
2624 } // namespace v8 | 2627 } // namespace v8 |
OLD | NEW |