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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 1905813003: [turbofan] Introduce dedicated BitcastWordToTagged machine operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Small fix. Created 4 years, 8 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/code-assembler.h ('k') | src/compiler/machine-operator.h » ('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/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/adapters.h" 9 #include "src/base/adapters.h"
10 #include "src/compiler/instruction-selector-impl.h" 10 #include "src/compiler/instruction-selector-impl.h"
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 case IrOpcode::kInt64LessThanOrEqual: 1007 case IrOpcode::kInt64LessThanOrEqual:
1008 return VisitInt64LessThanOrEqual(node); 1008 return VisitInt64LessThanOrEqual(node);
1009 case IrOpcode::kUint64Div: 1009 case IrOpcode::kUint64Div:
1010 return MarkAsWord64(node), VisitUint64Div(node); 1010 return MarkAsWord64(node), VisitUint64Div(node);
1011 case IrOpcode::kUint64LessThan: 1011 case IrOpcode::kUint64LessThan:
1012 return VisitUint64LessThan(node); 1012 return VisitUint64LessThan(node);
1013 case IrOpcode::kUint64LessThanOrEqual: 1013 case IrOpcode::kUint64LessThanOrEqual:
1014 return VisitUint64LessThanOrEqual(node); 1014 return VisitUint64LessThanOrEqual(node);
1015 case IrOpcode::kUint64Mod: 1015 case IrOpcode::kUint64Mod:
1016 return MarkAsWord64(node), VisitUint64Mod(node); 1016 return MarkAsWord64(node), VisitUint64Mod(node);
1017 case IrOpcode::kBitcastWordToTagged:
1018 return MarkAsReference(node), VisitBitcastWordToTagged(node);
1017 case IrOpcode::kChangeFloat32ToFloat64: 1019 case IrOpcode::kChangeFloat32ToFloat64:
1018 return MarkAsFloat64(node), VisitChangeFloat32ToFloat64(node); 1020 return MarkAsFloat64(node), VisitChangeFloat32ToFloat64(node);
1019 case IrOpcode::kChangeInt32ToFloat64: 1021 case IrOpcode::kChangeInt32ToFloat64:
1020 return MarkAsFloat64(node), VisitChangeInt32ToFloat64(node); 1022 return MarkAsFloat64(node), VisitChangeInt32ToFloat64(node);
1021 case IrOpcode::kChangeUint32ToFloat64: 1023 case IrOpcode::kChangeUint32ToFloat64:
1022 return MarkAsFloat64(node), VisitChangeUint32ToFloat64(node); 1024 return MarkAsFloat64(node), VisitChangeUint32ToFloat64(node);
1023 case IrOpcode::kChangeFloat64ToInt32: 1025 case IrOpcode::kChangeFloat64ToInt32:
1024 return MarkAsWord32(node), VisitChangeFloat64ToInt32(node); 1026 return MarkAsWord32(node), VisitChangeFloat64ToInt32(node);
1025 case IrOpcode::kChangeFloat64ToUint32: 1027 case IrOpcode::kChangeFloat64ToUint32:
1026 return MarkAsWord32(node), VisitChangeFloat64ToUint32(node); 1028 return MarkAsWord32(node), VisitChangeFloat64ToUint32(node);
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 1248
1247 void InstructionSelector::VisitStackSlot(Node* node) { 1249 void InstructionSelector::VisitStackSlot(Node* node) {
1248 int size = 1 << ElementSizeLog2Of(StackSlotRepresentationOf(node->op())); 1250 int size = 1 << ElementSizeLog2Of(StackSlotRepresentationOf(node->op()));
1249 int slot = frame_->AllocateSpillSlot(size); 1251 int slot = frame_->AllocateSpillSlot(size);
1250 OperandGenerator g(this); 1252 OperandGenerator g(this);
1251 1253
1252 Emit(kArchStackSlot, g.DefineAsRegister(node), 1254 Emit(kArchStackSlot, g.DefineAsRegister(node),
1253 sequence()->AddImmediate(Constant(slot)), 0, nullptr); 1255 sequence()->AddImmediate(Constant(slot)), 0, nullptr);
1254 } 1256 }
1255 1257
1258 void InstructionSelector::VisitBitcastWordToTagged(Node* node) {
1259 OperandGenerator g(this);
1260 Node* value = node->InputAt(0);
1261 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value));
1262 }
1263
1256 // 32 bit targets do not implement the following instructions. 1264 // 32 bit targets do not implement the following instructions.
1257 #if V8_TARGET_ARCH_32_BIT 1265 #if V8_TARGET_ARCH_32_BIT
1258 1266
1259 void InstructionSelector::VisitWord64And(Node* node) { UNIMPLEMENTED(); } 1267 void InstructionSelector::VisitWord64And(Node* node) { UNIMPLEMENTED(); }
1260 1268
1261 1269
1262 void InstructionSelector::VisitWord64Or(Node* node) { UNIMPLEMENTED(); } 1270 void InstructionSelector::VisitWord64Or(Node* node) { UNIMPLEMENTED(); }
1263 1271
1264 1272
1265 void InstructionSelector::VisitWord64Xor(Node* node) { UNIMPLEMENTED(); } 1273 void InstructionSelector::VisitWord64Xor(Node* node) { UNIMPLEMENTED(); }
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 return new (instruction_zone()) FrameStateDescriptor( 1815 return new (instruction_zone()) FrameStateDescriptor(
1808 instruction_zone(), state_info.type(), state_info.bailout_id(), 1816 instruction_zone(), state_info.type(), state_info.bailout_id(),
1809 state_info.state_combine(), parameters, locals, stack, 1817 state_info.state_combine(), parameters, locals, stack,
1810 state_info.shared_info(), outer_state); 1818 state_info.shared_info(), outer_state);
1811 } 1819 }
1812 1820
1813 1821
1814 } // namespace compiler 1822 } // namespace compiler
1815 } // namespace internal 1823 } // namespace internal
1816 } // namespace v8 1824 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-assembler.h ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698