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

Unified Diff: src/compiler/instruction-selector.cc

Issue 2367413002: [turbofan] Introduces the BitcastWordToTaggedSigned and BitcastTaggedToWord opcodes. (Closed)
Patch Set: Update. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/code-assembler.h ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index f233cae5b5ac89e324c159daaf7fd71c54127ee1..e4faca5a6692b572875374ad51a63bfc8957fc65 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -1104,8 +1104,14 @@ void InstructionSelector::VisitNode(Node* node) {
return VisitUint64LessThanOrEqual(node);
case IrOpcode::kUint64Mod:
return MarkAsWord64(node), VisitUint64Mod(node);
+ case IrOpcode::kBitcastTaggedToWord:
+ return MarkAsRepresentation(MachineType::PointerRepresentation(), node),
+ VisitBitcastTaggedToWord(node);
case IrOpcode::kBitcastWordToTagged:
return MarkAsReference(node), VisitBitcastWordToTagged(node);
+ case IrOpcode::kBitcastWordToTaggedSigned:
+ return MarkAsRepresentation(MachineRepresentation::kTaggedSigned, node),
+ EmitIdentity(node);
case IrOpcode::kChangeFloat32ToFloat64:
return MarkAsFloat64(node), VisitChangeFloat32ToFloat64(node);
case IrOpcode::kChangeInt32ToFloat64:
@@ -1501,6 +1507,11 @@ void InstructionSelector::VisitStackSlot(Node* node) {
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
}
+void InstructionSelector::VisitBitcastTaggedToWord(Node* node) {
+ OperandGenerator g(this);
+ Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(node->InputAt(0)));
+}
+
void InstructionSelector::VisitBitcastWordToTagged(Node* node) {
OperandGenerator g(this);
Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(node->InputAt(0)));
« 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