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

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

Issue 1775083002: [turbofan] Fix register constraint for memory barrier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix other platforms, too Created 4 years, 9 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
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-impl.h" 5 #include "src/compiler/instruction-selector-impl.h"
6 #include "src/compiler/node-matchers.h" 6 #include "src/compiler/node-matchers.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 // OutOfLineRecordWrite uses the index in an arithmetic instruction, so we 411 // OutOfLineRecordWrite uses the index in an arithmetic instruction, so we
412 // must check kArithmeticImm as well as kLoadStoreImm64. 412 // must check kArithmeticImm as well as kLoadStoreImm64.
413 if (g.CanBeImmediate(index, kArithmeticImm) && 413 if (g.CanBeImmediate(index, kArithmeticImm) &&
414 g.CanBeImmediate(index, kLoadStoreImm64)) { 414 g.CanBeImmediate(index, kLoadStoreImm64)) {
415 inputs[input_count++] = g.UseImmediate(index); 415 inputs[input_count++] = g.UseImmediate(index);
416 addressing_mode = kMode_MRI; 416 addressing_mode = kMode_MRI;
417 } else { 417 } else {
418 inputs[input_count++] = g.UseUniqueRegister(index); 418 inputs[input_count++] = g.UseUniqueRegister(index);
419 addressing_mode = kMode_MRR; 419 addressing_mode = kMode_MRR;
420 } 420 }
421 inputs[input_count++] = (write_barrier_kind == kMapWriteBarrier) 421 inputs[input_count++] = g.UseUniqueRegister(value);
422 ? g.UseRegister(value)
423 : g.UseUniqueRegister(value);
424 RecordWriteMode record_write_mode = RecordWriteMode::kValueIsAny; 422 RecordWriteMode record_write_mode = RecordWriteMode::kValueIsAny;
425 switch (write_barrier_kind) { 423 switch (write_barrier_kind) {
426 case kNoWriteBarrier: 424 case kNoWriteBarrier:
427 UNREACHABLE(); 425 UNREACHABLE();
428 break; 426 break;
429 case kMapWriteBarrier: 427 case kMapWriteBarrier:
430 record_write_mode = RecordWriteMode::kValueIsMap; 428 record_write_mode = RecordWriteMode::kValueIsMap;
431 break; 429 break;
432 case kPointerWriteBarrier: 430 case kPointerWriteBarrier:
433 record_write_mode = RecordWriteMode::kValueIsPointer; 431 record_write_mode = RecordWriteMode::kValueIsPointer;
(...skipping 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after
2265 MachineOperatorBuilder::kWord32ShiftIsSafe | 2263 MachineOperatorBuilder::kWord32ShiftIsSafe |
2266 MachineOperatorBuilder::kInt32DivIsSafe | 2264 MachineOperatorBuilder::kInt32DivIsSafe |
2267 MachineOperatorBuilder::kUint32DivIsSafe | 2265 MachineOperatorBuilder::kUint32DivIsSafe |
2268 MachineOperatorBuilder::kWord32ReverseBits | 2266 MachineOperatorBuilder::kWord32ReverseBits |
2269 MachineOperatorBuilder::kWord64ReverseBits; 2267 MachineOperatorBuilder::kWord64ReverseBits;
2270 } 2268 }
2271 2269
2272 } // namespace compiler 2270 } // namespace compiler
2273 } // namespace internal 2271 } // namespace internal
2274 } // namespace v8 2272 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/ia32/instruction-selector-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698