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

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

Issue 1902433003: [Atomics] Remove Atomics code stubs; use TF ops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix mips compile 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/mips/code-generator-mips.cc ('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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 1445
1446 1446
1447 void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { 1447 void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) {
1448 MipsOperandGenerator g(this); 1448 MipsOperandGenerator g(this);
1449 Node* left = node->InputAt(0); 1449 Node* left = node->InputAt(0);
1450 Node* right = node->InputAt(1); 1450 Node* right = node->InputAt(1);
1451 Emit(kMipsFloat64InsertHighWord32, g.DefineSameAsFirst(node), 1451 Emit(kMipsFloat64InsertHighWord32, g.DefineSameAsFirst(node),
1452 g.UseRegister(left), g.UseRegister(right)); 1452 g.UseRegister(left), g.UseRegister(right));
1453 } 1453 }
1454 1454
1455 void InstructionSelector::VisitAtomicLoad(Node* node) {
1456 LoadRepresentation load_rep = LoadRepresentationOf(node->op());
1457 OperandGenerator g(this);
1458 Node* base = node->InputAt(0);
1459 Node* index = node->InputAt(1);
1460 ArchOpcode opcode = kArchNop;
1461 switch (load_rep.representation()) {
1462 case MachineRepresentation::kWord8:
1463 opcode = load_rep.IsSigned() ? kAtomicLoadInt8 : kAtomicLoadUint8;
1464 break;
1465 case MachineRepresentation::kWord16:
1466 opcode = load_rep.IsSigned() ? kAtomicLoadInt16 : kAtomicLoadUint16;
1467 break;
1468 case MachineRepresentation::kWord32:
1469 opcode = kAtomicLoadWord32;
1470 break;
1471 default:
1472 UNREACHABLE();
1473 return;
1474 }
1475 Emit(opcode | AddressingModeField::encode(kMode_MRI),
1476 g.DefineAsRegister(node), g.UseRegister(base), g.UseRegister(index));
1477 }
1455 1478
1456 // static 1479 // static
1457 MachineOperatorBuilder::Flags 1480 MachineOperatorBuilder::Flags
1458 InstructionSelector::SupportedMachineOperatorFlags() { 1481 InstructionSelector::SupportedMachineOperatorFlags() {
1459 MachineOperatorBuilder::Flags flags = MachineOperatorBuilder::kNoFlags; 1482 MachineOperatorBuilder::Flags flags = MachineOperatorBuilder::kNoFlags;
1460 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && 1483 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
1461 IsFp64Mode()) { 1484 IsFp64Mode()) {
1462 flags |= MachineOperatorBuilder::kFloat64RoundDown | 1485 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1463 MachineOperatorBuilder::kFloat64RoundUp | 1486 MachineOperatorBuilder::kFloat64RoundUp |
1464 MachineOperatorBuilder::kFloat64RoundTruncate | 1487 MachineOperatorBuilder::kFloat64RoundTruncate |
(...skipping 10 matching lines...) Expand all
1475 MachineOperatorBuilder::kFloat32Max | 1498 MachineOperatorBuilder::kFloat32Max |
1476 MachineOperatorBuilder::kFloat32RoundDown | 1499 MachineOperatorBuilder::kFloat32RoundDown |
1477 MachineOperatorBuilder::kFloat32RoundUp | 1500 MachineOperatorBuilder::kFloat32RoundUp |
1478 MachineOperatorBuilder::kFloat32RoundTruncate | 1501 MachineOperatorBuilder::kFloat32RoundTruncate |
1479 MachineOperatorBuilder::kFloat32RoundTiesEven; 1502 MachineOperatorBuilder::kFloat32RoundTiesEven;
1480 } 1503 }
1481 1504
1482 } // namespace compiler 1505 } // namespace compiler
1483 } // namespace internal 1506 } // namespace internal
1484 } // namespace v8 1507 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/code-generator-mips.cc ('k') | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698