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

Side by Side Diff: src/compiler/mips/code-generator-mips.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 | « src/compiler/instruction-selector-impl.h ('k') | src/compiler/mips64/code-generator-mips64.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/node-properties-inl.h" 9 #include "src/compiler/node-properties-inl.h"
10 #include "src/mips/macro-assembler-mips.h" 10 #include "src/mips/macro-assembler-mips.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); 63 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED));
64 case Constant::kFloat64: 64 case Constant::kFloat64:
65 return Operand( 65 return Operand(
66 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED)); 66 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED));
67 case Constant::kInt64: 67 case Constant::kInt64:
68 case Constant::kExternalReference: 68 case Constant::kExternalReference:
69 case Constant::kHeapObject: 69 case Constant::kHeapObject:
70 // TODO(plind): Maybe we should handle ExtRef & HeapObj here? 70 // TODO(plind): Maybe we should handle ExtRef & HeapObj here?
71 // maybe not done on arm due to const pool ?? 71 // maybe not done on arm due to const pool ??
72 break; 72 break;
73 case Constant::kRpoNumber:
74 UNREACHABLE(); // TODO(titzer): RPO immediates on mips?
75 break;
73 } 76 }
74 UNREACHABLE(); 77 UNREACHABLE();
75 return Operand(zero_reg); 78 return Operand(zero_reg);
76 } 79 }
77 80
78 Operand InputOperand(int index) { 81 Operand InputOperand(int index) {
79 InstructionOperand* op = instr_->InputAt(index); 82 InstructionOperand* op = instr_->InputAt(index);
80 if (op->IsRegister()) { 83 if (op->IsRegister()) {
81 return Operand(ToRegister(op)); 84 return Operand(ToRegister(op));
82 } 85 }
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 break; 792 break;
790 case Constant::kFloat64: 793 case Constant::kFloat64:
791 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); 794 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED));
792 break; 795 break;
793 case Constant::kExternalReference: 796 case Constant::kExternalReference:
794 __ li(dst, Operand(src.ToExternalReference())); 797 __ li(dst, Operand(src.ToExternalReference()));
795 break; 798 break;
796 case Constant::kHeapObject: 799 case Constant::kHeapObject:
797 __ li(dst, src.ToHeapObject()); 800 __ li(dst, src.ToHeapObject());
798 break; 801 break;
802 case Constant::kRpoNumber:
803 UNREACHABLE(); // TODO(titzer): loading RPO numbers on mips.
804 break;
799 } 805 }
800 if (destination->IsStackSlot()) __ sw(dst, g.ToMemOperand(destination)); 806 if (destination->IsStackSlot()) __ sw(dst, g.ToMemOperand(destination));
801 } else if (src.type() == Constant::kFloat32) { 807 } else if (src.type() == Constant::kFloat32) {
802 FPURegister dst = destination->IsDoubleRegister() 808 FPURegister dst = destination->IsDoubleRegister()
803 ? g.ToDoubleRegister(destination) 809 ? g.ToDoubleRegister(destination)
804 : kScratchDoubleReg.low(); 810 : kScratchDoubleReg.low();
805 // TODO(turbofan): Can we do better here? 811 // TODO(turbofan): Can we do better here?
806 __ li(at, Operand(bit_cast<int32_t>(src.ToFloat32()))); 812 __ li(at, Operand(bit_cast<int32_t>(src.ToFloat32())));
807 __ mtc1(at, dst); 813 __ mtc1(at, dst);
808 if (destination->IsDoubleStackSlot()) { 814 if (destination->IsDoubleStackSlot()) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 } 942 }
937 } 943 }
938 MarkLazyDeoptSite(); 944 MarkLazyDeoptSite();
939 } 945 }
940 946
941 #undef __ 947 #undef __
942 948
943 } // namespace compiler 949 } // namespace compiler
944 } // namespace internal 950 } // namespace internal
945 } // namespace v8 951 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector-impl.h ('k') | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698