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

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

Issue 2799863002: [Atomics] use TFJ builtins for atomic add, sub, and, or, and xor (Closed)
Patch Set: [Atomics] use TFJ builtins for atomic add, sub, and, or, and xor Created 3 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
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 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 MarkAsWord32(node); 1455 MarkAsWord32(node);
1456 MarkPairProjectionsAsWord32(node); 1456 MarkPairProjectionsAsWord32(node);
1457 return VisitWord32PairSar(node); 1457 return VisitWord32PairSar(node);
1458 case IrOpcode::kAtomicLoad: { 1458 case IrOpcode::kAtomicLoad: {
1459 LoadRepresentation type = LoadRepresentationOf(node->op()); 1459 LoadRepresentation type = LoadRepresentationOf(node->op());
1460 MarkAsRepresentation(type.representation(), node); 1460 MarkAsRepresentation(type.representation(), node);
1461 return VisitAtomicLoad(node); 1461 return VisitAtomicLoad(node);
1462 } 1462 }
1463 case IrOpcode::kAtomicStore: 1463 case IrOpcode::kAtomicStore:
1464 return VisitAtomicStore(node); 1464 return VisitAtomicStore(node);
1465 case IrOpcode::kAtomicExchange: { 1465 #define ATOMIC_CASE(name) \
1466 MachineType type = AtomicExchangeRepresentationOf(node->op()); 1466 case IrOpcode::kAtomic##name: { \
1467 MarkAsRepresentation(type.representation(), node); 1467 MachineType type = AtomicOpRepresentationOf(node->op()); \
1468 return VisitAtomicExchange(node); 1468 MarkAsRepresentation(type.representation(), node); \
1469 } 1469 return VisitAtomic##name(node); \
1470 case IrOpcode::kAtomicCompareExchange: { 1470 }
1471 MachineType type = AtomicCompareExchangeRepresentationOf(node->op()); 1471 ATOMIC_CASE(Exchange)
1472 MarkAsRepresentation(type.representation(), node); 1472 ATOMIC_CASE(CompareExchange)
1473 return VisitAtomicCompareExchange(node); 1473 ATOMIC_CASE(Add)
1474 } 1474 ATOMIC_CASE(Sub)
1475 ATOMIC_CASE(And)
1476 ATOMIC_CASE(Or)
1477 ATOMIC_CASE(Xor)
1478 #undef ATOMIC_CASE
1475 case IrOpcode::kProtectedLoad: { 1479 case IrOpcode::kProtectedLoad: {
1476 LoadRepresentation type = LoadRepresentationOf(node->op()); 1480 LoadRepresentation type = LoadRepresentationOf(node->op());
1477 MarkAsRepresentation(type.representation(), node); 1481 MarkAsRepresentation(type.representation(), node);
1478 return VisitProtectedLoad(node); 1482 return VisitProtectedLoad(node);
1479 } 1483 }
1480 case IrOpcode::kUnsafePointerAdd: 1484 case IrOpcode::kUnsafePointerAdd:
1481 MarkAsRepresentation(MachineType::PointerRepresentation(), node); 1485 MarkAsRepresentation(MachineType::PointerRepresentation(), node);
1482 return VisitUnsafePointerAdd(node); 1486 return VisitUnsafePointerAdd(node);
1483 case IrOpcode::kF32x4Splat: 1487 case IrOpcode::kF32x4Splat:
1484 return MarkAsSimd128(node), VisitF32x4Splat(node); 1488 return MarkAsSimd128(node), VisitF32x4Splat(node);
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
2704 return new (instruction_zone()) FrameStateDescriptor( 2708 return new (instruction_zone()) FrameStateDescriptor(
2705 instruction_zone(), state_info.type(), state_info.bailout_id(), 2709 instruction_zone(), state_info.type(), state_info.bailout_id(),
2706 state_info.state_combine(), parameters, locals, stack, 2710 state_info.state_combine(), parameters, locals, stack,
2707 state_info.shared_info(), outer_state); 2711 state_info.shared_info(), outer_state);
2708 } 2712 }
2709 2713
2710 2714
2711 } // namespace compiler 2715 } // namespace compiler
2712 } // namespace internal 2716 } // namespace internal
2713 } // namespace v8 2717 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698