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

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

Issue 758073002: [turbofan] Use special constant type for RPO block number operands. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « no previous file | src/compiler/arm64/code-generator-arm64.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 6
7 #include "src/arm/macro-assembler-arm.h" 7 #include "src/arm/macro-assembler-arm.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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return Operand(constant.ToInt32()); 70 return Operand(constant.ToInt32());
71 case Constant::kFloat32: 71 case Constant::kFloat32:
72 return Operand( 72 return Operand(
73 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); 73 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED));
74 case Constant::kFloat64: 74 case Constant::kFloat64:
75 return Operand( 75 return Operand(
76 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED)); 76 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED));
77 case Constant::kInt64: 77 case Constant::kInt64:
78 case Constant::kExternalReference: 78 case Constant::kExternalReference:
79 case Constant::kHeapObject: 79 case Constant::kHeapObject:
80 case Constant::kRpoNumber:
80 break; 81 break;
81 } 82 }
82 UNREACHABLE(); 83 UNREACHABLE();
83 return Operand::Zero(); 84 return Operand::Zero();
84 } 85 }
85 86
86 Operand InputOperand2(int first_index) { 87 Operand InputOperand2(int first_index) {
87 const int index = first_index; 88 const int index = first_index;
88 switch (AddressingModeField::decode(instr_->opcode())) { 89 switch (AddressingModeField::decode(instr_->opcode())) {
89 case kMode_None: 90 case kMode_None:
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 case Constant::kFloat64: 815 case Constant::kFloat64:
815 __ Move(dst, 816 __ Move(dst,
816 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); 817 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED));
817 break; 818 break;
818 case Constant::kExternalReference: 819 case Constant::kExternalReference:
819 __ mov(dst, Operand(src.ToExternalReference())); 820 __ mov(dst, Operand(src.ToExternalReference()));
820 break; 821 break;
821 case Constant::kHeapObject: 822 case Constant::kHeapObject:
822 __ Move(dst, src.ToHeapObject()); 823 __ Move(dst, src.ToHeapObject());
823 break; 824 break;
825 case Constant::kRpoNumber:
826 UNREACHABLE(); // TODO(dcarney): loading RPO constants on arm.
827 break;
824 } 828 }
825 if (destination->IsStackSlot()) __ str(dst, g.ToMemOperand(destination)); 829 if (destination->IsStackSlot()) __ str(dst, g.ToMemOperand(destination));
826 } else if (src.type() == Constant::kFloat32) { 830 } else if (src.type() == Constant::kFloat32) {
827 SwVfpRegister dst = destination->IsDoubleRegister() 831 SwVfpRegister dst = destination->IsDoubleRegister()
828 ? g.ToFloat32Register(destination) 832 ? g.ToFloat32Register(destination)
829 : kScratchDoubleReg.low(); 833 : kScratchDoubleReg.low();
830 // TODO(turbofan): Can we do better here? 834 // TODO(turbofan): Can we do better here?
831 __ mov(ip, Operand(bit_cast<int32_t>(src.ToFloat32()))); 835 __ mov(ip, Operand(bit_cast<int32_t>(src.ToFloat32())));
832 __ vmov(dst, ip); 836 __ vmov(dst, ip);
833 if (destination->IsDoubleStackSlot()) { 837 if (destination->IsDoubleStackSlot()) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 } 962 }
959 } 963 }
960 MarkLazyDeoptSite(); 964 MarkLazyDeoptSite();
961 } 965 }
962 966
963 #undef __ 967 #undef __
964 968
965 } // namespace compiler 969 } // namespace compiler
966 } // namespace internal 970 } // namespace internal
967 } // namespace v8 971 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/arm64/code-generator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698