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

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

Issue 2816743003: [turbofan] Add alignment parameter to StackSlot operator (Closed)
Patch Set: Small fixes in test Created 3 years, 7 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/ia32/instruction-selector-ia32.cc ('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/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/base/adapters.h" 10 #include "src/base/adapters.h"
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 inputs[1] = g.Label(sw.default_branch); 1893 inputs[1] = g.Label(sw.default_branch);
1894 for (size_t index = 0; index < sw.case_count; ++index) { 1894 for (size_t index = 0; index < sw.case_count; ++index) {
1895 int32_t value = sw.case_values[index]; 1895 int32_t value = sw.case_values[index];
1896 BasicBlock* branch = sw.case_branches[index]; 1896 BasicBlock* branch = sw.case_branches[index];
1897 inputs[index * 2 + 2 + 0] = g.TempImmediate(value); 1897 inputs[index * 2 + 2 + 0] = g.TempImmediate(value);
1898 inputs[index * 2 + 2 + 1] = g.Label(branch); 1898 inputs[index * 2 + 2 + 1] = g.Label(branch);
1899 } 1899 }
1900 Emit(kArchLookupSwitch, 0, nullptr, input_count, inputs, 0, nullptr); 1900 Emit(kArchLookupSwitch, 0, nullptr, input_count, inputs, 0, nullptr);
1901 } 1901 }
1902 1902
1903 void InstructionSelector::VisitStackSlot(Node* node) {
1904 int size = StackSlotSizeOf(node->op());
1905 int slot = frame_->AllocateSpillSlot(size);
1906 OperandGenerator g(this);
1907
1908 Emit(kArchStackSlot, g.DefineAsRegister(node),
1909 sequence()->AddImmediate(Constant(slot)), 0, nullptr);
1910 }
1911 1903
1912 void InstructionSelector::VisitBitcastTaggedToWord(Node* node) { 1904 void InstructionSelector::VisitBitcastTaggedToWord(Node* node) {
1913 EmitIdentity(node); 1905 EmitIdentity(node);
1914 } 1906 }
1915 1907
1916 void InstructionSelector::VisitBitcastWordToTagged(Node* node) { 1908 void InstructionSelector::VisitBitcastWordToTagged(Node* node) {
1917 OperandGenerator g(this); 1909 OperandGenerator g(this);
1918 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(node->InputAt(0))); 1910 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(node->InputAt(0)));
1919 } 1911 }
1920 1912
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
2849 return new (instruction_zone()) FrameStateDescriptor( 2841 return new (instruction_zone()) FrameStateDescriptor(
2850 instruction_zone(), state_info.type(), state_info.bailout_id(), 2842 instruction_zone(), state_info.type(), state_info.bailout_id(),
2851 state_info.state_combine(), parameters, locals, stack, 2843 state_info.state_combine(), parameters, locals, stack,
2852 state_info.shared_info(), outer_state); 2844 state_info.shared_info(), outer_state);
2853 } 2845 }
2854 2846
2855 2847
2856 } // namespace compiler 2848 } // namespace compiler
2857 } // namespace internal 2849 } // namespace internal
2858 } // namespace v8 2850 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698